Search Messages
curl --request GET \
--url https://api.puppeteerai.com/threads/{thread_id}/messages/search \
--header 'Authorization: <authorization>'import requests
url = "https://api.puppeteerai.com/threads/{thread_id}/messages/search"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.puppeteerai.com/threads/{thread_id}/messages/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.puppeteerai.com/threads/{thread_id}/messages/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.puppeteerai.com/threads/{thread_id}/messages/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.puppeteerai.com/threads/{thread_id}/messages/search")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.puppeteerai.com/threads/{thread_id}/messages/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"matches": [
{
"message_id": "<string>",
"prev_cursor": "<string>",
"next_cursor": "<string>",
"context": [
{
"message_id": "<string>",
"role": "<string>",
"message": "<string>",
"timestamp": 123,
"conversation_id": 123,
"conversation_end_time": "<string>"
}
]
}
],
"pagination": {
"cursor": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Messages
Search Messages
Search for messages within a thread that contain the given text query.
GET
/
threads
/
{thread_id}
/
messages
/
search
Search Messages
curl --request GET \
--url https://api.puppeteerai.com/threads/{thread_id}/messages/search \
--header 'Authorization: <authorization>'import requests
url = "https://api.puppeteerai.com/threads/{thread_id}/messages/search"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.puppeteerai.com/threads/{thread_id}/messages/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.puppeteerai.com/threads/{thread_id}/messages/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.puppeteerai.com/threads/{thread_id}/messages/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.puppeteerai.com/threads/{thread_id}/messages/search")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.puppeteerai.com/threads/{thread_id}/messages/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"matches": [
{
"message_id": "<string>",
"prev_cursor": "<string>",
"next_cursor": "<string>",
"context": [
{
"message_id": "<string>",
"role": "<string>",
"message": "<string>",
"timestamp": 123,
"conversation_id": 123,
"conversation_end_time": "<string>"
}
]
}
],
"pagination": {
"cursor": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
Path Parameters
Query Parameters
The text to search for within messages.
Base64-encoded pagination cursor. If not provided, retrieves the first batch of results.
Maximum number of search results to return per page.
Number of messages to include before and after each match to provide conversation context.
⌘I