List Searches
Retrieve a paginated list of expert searches.
GET /api/search
Parameters
| page | Optional — page number (default: 1). Page size is 100. |
| show | Optional — all (default) | completed | running |
Request Example
curl -X GET "https://rolli.ai/api/search?page=1" \
-H "X-ROLLI-TOKEN: your_token" \
-H "X-ROLLI-USER-ID: your_user_id" \
-H "Content-Type: application/json"
fetch("https://rolli.ai/api/search?page=1", {
method: "GET",
headers: {
"X-ROLLI-TOKEN": "your_token",
"X-ROLLI-USER-ID": "your_user_id",
"Content-Type": "application/json"
},
})
.then(res => res.json())
.then(console.log);
require "net/http"
require "uri"
require "json"
uri = URI("https://rolli.ai/api/search?page=1")
req = Net::HTTP::Get.new(uri)
req["X-ROLLI-TOKEN"] = "your_token"
req["X-ROLLI-USER-ID"] = "your_user_id"
req["Content-Type"] = "application/json"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
puts res.body
import requests
import json
url = "https://rolli.ai/api/search?page=1"
headers = {
"X-ROLLI-TOKEN": "your_token",
"X-ROLLI-USER-ID": "your_user_id",
"Content-Type": "application/json"
}response = requests.get(url, headers=headers)
print(response.json())
Response Example
{
"searches": [
{
"id": 8723,
"query": "example search query",
"created_at": "2023-10-01T12:00:00Z",
"updated_at": "2023-10-01T12:00:00Z",
"status": "running"
},
{
"id": 8724,
"query": "another search query",
"created_at": "2023-10-01T12:05:00Z",
"updated_at": "2023-10-01T12:05:00Z",
"status": "completed"
},
{
"id": 8725,
"query": "yet another search query",
"created_at": "2023-10-01T12:10:00Z",
"updated_at": "2023-10-01T12:10:00Z",
"status": "completed"
}
]
}