Search Intelligence API endpoints
Run a single query across Google plus the major AI search platforms (ChatGPT, Perplexity, Gemini, Claude, Grok, Bing) and get structured per-platform results in one call. Includes brand and domain…
Run a single query across Google plus the major AI search platforms (ChatGPT, Perplexity, Gemini, Claude, Grok, Bing) and get structured per-platform results in one call. Includes brand and domain extraction.
The Search Intelligence agent API lets you run a single search query in parallel across Google and the major AI platforms, then get back a structured response with per-platform results, citations, and (optionally) brand/domain extraction. Use it to power external dashboards, citation monitors, and AI-search visibility reports.
Endpoints at a glance
Section titled “Endpoints at a glance”| Method & Path | Scope | Purpose |
|---|---|---|
POST /api/agent/v1/search-intelligence/query |
search_intelligence:query |
Run a query across the requested platforms. Synchronous — returns once all platforms settle or the 90s budget expires. |
GET /api/agent/v1/search-intelligence/query/:runId |
search_intelligence:query |
Fetch a previously-run query by runId. Useful when the original POST timed out at the wall-clock budget but partial state is in the DB. |
Authentication and scope
Section titled “Authentication and scope”Both endpoints use the standard agent API auth: Authorization: Bearer rk_live_.... Add the search_intelligence:query scope to your API key under Settings > API keys (the scope name in the picker is exactly search_intelligence:query).
Before provider work, read the current usage contract and call GET /api/agent/v1/usage/estimate?operation=search_intelligence_query&platform_count=4 with the intended provider count. The estimate starts no query. Full-platform pooled accounts receive standard or high impact; the current legacy Agent API contract reports no customer credit deduction but the query still invokes providers and requires approval in an agent workflow.
Supported platforms
Section titled “Supported platforms”The platforms field accepts any subset of the following (max 7):
google_organic— Google organic SERP results (parsed)chatgpt— ChatGPT response with citationsperplexity— Perplexity answer with sourcesgemini— Google Gemini responseclaude— Anthropic Claude responsegrok— xAI Grok responsebing— Bing organic SERP results
If platforms is omitted, the default set is ["google_organic", "chatgpt", "perplexity", "gemini"].
Run a query
Section titled “Run a query”POST /api/agent/v1/search-intelligence/queryAuthorization: Bearer rk_live_YOUR_KEYContent-Type: application/json
{ "query": "best crm for small business", "platforms": ["google_organic", "chatgpt", "perplexity", "gemini"], "location": "United States", "gl": "us", "language": "en", "hl": "en", "device": "desktop", "includeRaw": false, "extract": { "brands": ["HubSpot", "Salesforce", "Pipedrive"], "domains": ["hubspot.com", "salesforce.com", "pipedrive.com"] }}| Field | Type | Required | Default | Description |
|---|---|---|---|---|
query |
string | Yes | — | The search query. 1–250 characters. |
platforms |
array | No | see above | Up to 7 platform identifiers. Duplicates rejected. |
location |
string | No | "United States" |
Display name of the search location (max 255 chars). |
gl |
string | No | "us" |
Two-letter country code for SERP context. |
language |
string | No | "en" |
Language code (e.g. en, es, de). |
hl |
string | No | "en" |
UI language hint passed to providers that accept it. |
device |
enum | No | "desktop" |
"desktop" or "mobile". |
includeRaw |
boolean | No | false |
If true, the response includes the raw upstream payload per platform (larger payload). |
extract.brands |
array | No | — | Up to 20 brand names to detect mentions of in each platform’s response. |
extract.domains |
array | No | — | Up to 20 domains to detect citations of in each platform’s response. |
Response (200 OK)
Section titled “Response (200 OK)”The response includes the runId, the query parameters, the requested platforms, and a per-platform result array. Each platform entry contains its raw answer (when includeRaw: true), parsed citations, and — when extract was provided — brand-mention and domain-citation flags.
{ "runId": "0a1b2c3d-...", "query": "best crm for small business", "requestedPlatforms": ["google_organic", "chatgpt", "perplexity", "gemini"], "completedPlatforms": ["google_organic", "chatgpt", "perplexity", "gemini"], "failedPlatforms": [], "parameters": { "location": "United States", "gl": "us", "language": "en", "hl": "en", "device": "desktop" }, "results": [ { "platform": "google_organic", "status": "success", "answer": null, "citations": [ { "url": "https://hubspot.com/...", "title": "..." }, ... ], "extract": { "brands": { "HubSpot": true, "Salesforce": true }, "domains": { "hubspot.com": true } } }, { "platform": "chatgpt", "status": "success", "answer": "For small businesses, HubSpot is often recommended ...", "citations": [ ... ], "extract": { ... } } ], "createdAt": "2026-05-12T15:32:00.000Z"}Limits and timing
Section titled “Limits and timing”- Per-platform timeout: 45 seconds.
- Total endpoint budget: 90 seconds. If the orchestrator overruns, the POST returns
504 timeout. The 504 envelope does not include arunId, so retry the POST rather than trying to hydrate a partial run. - Concurrency: Up to 4 platforms run in parallel internally.
- Brand / domain extraction: Up to 20 entries each.
Partial-failure behaviour
Section titled “Partial-failure behaviour”If some platforms succeed and others fail, the response is still 200 OK. Failed platforms appear in failedPlatforms with an error code, and successful platforms appear in results with status: "success".
If all requested platforms fail, the endpoint returns 502 with a top-level runId so you can still hydrate the partial DB state. The body shape is:
{ "runId": "0a1b2c3d-...", "error": { "code": "all_platforms_failed", "message": "All requested platforms failed" }, "response": { ...same shape as the success response... }}Hydrate a previous run
Section titled “Hydrate a previous run”GET /api/agent/v1/search-intelligence/query/{runId}?includeRaw=trueAuthorization: Bearer rk_live_YOUR_KEYThe includeRaw query parameter is optional and defaults to false. The response is the same shape as the POST response.
AI results can also include researchTrace: normalized, provider-returned search queries and their available source URLs. This field is preserved on the saved run and available in full view without includeRaw. New Grok, OpenAI, Claude, Gemini, and Perplexity captures retain available source inventories separately from answer citations. Claude uses citations attached to answer text, Gemini uses grounding support links to answer passages, and Perplexity maps the answer’s reference numbers to its citation inventory. Repeated citation occurrences remain separate. Available citation fields include startIndex, endIndex, answerText, citedText, sourceIndex, and responseIndex; fields vary by provider.
Each trace action retains its query/source association and, when available, its tool-call ID, kind (web_search or x_search), and sourcesStatus (captured, partial, or not_exposed). queryAssociation distinguishes an exact query, a search batch, an answer-level query set, and queries that were not exposed. Perplexity source actions can contain an empty queries array; this does not establish zero searches. sourceScope distinguishes search results from Gemini grounding references. Available source metadata includes snippets, dates, page ages, and original redirect URLs. citationStatus identifies captured, partial, or unavailable answer citation evidence. Missing source lists are not evidence of zero retrievals. Traces are bounded and do not contain private reasoning. Enabling capture does not enable additional provider tools or start another search request.
Add view=summary to either the POST or GET route for a bounded operational response. Summary view retains run identity, requested/completed/failed platforms, parameters, timestamps, per-platform status, latency, citation and organic-result counts, answer presence, extracted-entity flags, and errors. It omits answer text, citations, organic-result rows, and raw provider payloads. view=full preserves the normalized response; includeRaw=true is honored only with full view.
Send a stable Idempotency-Key header on POST retries. Rankability replays the saved response within the Agent API idempotency window instead of repeating the provider fan-out.
MCP equivalents
Section titled “MCP equivalents”Use search_intelligence_run to start the synchronous provider fan-out and search_intelligence_get to read the saved run. MCP defaults to summary view; request full normalized evidence only after the run is known, and keep raw provider payloads off unless they are specifically required. Estimate search_intelligence_query, show the selected platform count and current usage state, obtain approval, and reuse one idempotency key.
Error codes
Section titled “Error codes”| HTTP | Code | When |
|---|---|---|
| 400 | invalid_input |
Missing or oversized query, unknown platform identifier, duplicate platforms, brands/domains array over 20. |
| 401 | unauthorized |
Missing or invalid Authorization header. |
| 403 | forbidden |
API key is missing the search_intelligence:query scope. |
| 404 | not_found |
runId not found in your org. |
| 429 | rate_limited |
Per-minute rate limit exceeded. |
| 502 | all_platforms_failed |
All requested platforms failed. runId is still returned at the top level. |
| 504 | timeout |
Wall-clock budget (90s) exceeded. The 504 envelope does not return a runId — retry the POST rather than hydrating. |
Common gotcha
Section titled “Common gotcha”The endpoint is POST .../search-intelligence/query — not GET .../search-intelligence. A GET on the bare path returns the unknown-route fallthrough; make sure you’re posting JSON to the /query sub-path.
Related articles
Section titled “Related articles”- Getting started with the API — Overview of the agent API and authentication.
- Authentication and API keys — How to create keys and add scopes.
- API usage, rate limits, and errors — Pooled usage, rate limits, and error codes.
- Page Auditor API endpoints — The other recently-published agent endpoint.
