Connect a client
Put your key in theQUERYING_API_KEY environment variable first. Get one from API keys.
- Claude Code
- Codex
- mcp.json
401. An invalid key is reported by the first tool call, as a tool error.
Tools
Tools that submit tasks cost what the same API call costs. Read-only tools are free.Tasks and research
run_prompt and submit_prompt take taskType, prompt, and optional country, idempotencyKey, include and page (1 to 10, for GOOGLE_SERP and NAVER_SERP). See Engines for the engines and their prices, and Prompt Research for the research inputs.
For COMMERCE_SERP, send site and query in place of prompt, with optional limit (1 to 40); see Commerce Search. read_product takes url and optional country and idempotencyKey; see Commerce Product.
Choose run_prompt and submit_prompt values from the tool’s taskType schema. CLAUDE, GROK, AMAZON_ALEXA and AMAZON are not submission choices. Existing tasks remain readable when the API authorizes the caller.
get_task also reads REST-created tasks, including WEB_MAP, WEB_CRAWL and AI_RENDERING. A readable result type is not necessarily a prompt submission option. Use scrape_page, read_product and research_prompts for their respective inputs. Submit WEB_MAP and WEB_CRAWL through REST POST /v1/async/task; use the AI Rendering routes for AI_RENDERING.
run_product_lookup takes product, country and optional competitors, prompts, engines and idempotencyKey; see Product Lookup. It returns a summary: for each product, the engines that list it, its price range, the top 10 merchants and cited sites, and one row per engine; for each shopper prompt, the products each engine showed or named. That is about a tenth of the full response. Pass detail: "full" for every listing, cited page and task id.
GEO monitors
Each monitor tool makes one API call with your key, so ownership, key scope and plan limits apply as they do over REST. See GEO monitoring.Location, grids and samples
create_monitor and update_monitor accept these REST settings:
location: one WGS84 point withlatitude(−90 to 90) andlongitude(−180 to 180).grid: acenterpoint,sizeof 3, 5, 7 or 9 points per side, andradiusMetersof 100 to 50,000 meters from the center to the middle of an edge.engineSettings: overrides keyed by selected engine.samplesis 1–10 answers per prompt and point, each a separately billed task. Per-engineintervalHoursmust be a multiple of the monitor’s interval, up to 168 hours. Defaults are one answer and participation in every run.
CHATGPT, GEMINI, GOOGLE and AIMODE support location or grid; do not send both. On update, setting one clears the other, null clears the specified field, and omission preserves it. engineSettings replaces all saved overrides; {} or null restores defaults, while omission preserves them. The API validates the resulting configuration, key scope and plan limits.
Runs repeat until the monitor is paused or deleted. For each participating engine, answer tasks cost prompts × points × samples × engine credits per run; sum across those engines. See the linked monitor billing guide for other monitor charges. Without a grid, points is 1. Per-engine cadence determines which runs an engine joins. Read get_monitor_capabilities before creating or expanding a schedule.
Read per-point results through REST GET /v1/monitors/{id}/grid. Setting webhookUrl or analysis also requires REST; these options have no MCP tool input. See GEO monitoring for the REST contract.
Timeouts
run_prompt, scrape_page, read_product and research_prompts poll until the task finishes. They wait timeoutSeconds (default 180, maximum 900). If the task is still running, the tool returns a TASK_TIMEOUT error with the taskId. The task keeps running; call get_task with that id to collect it.
run_product_lookup polls the lookup the same way. It waits 210 seconds by default so the call ends inside a 240-second client timeout, and most lookups finish in 2 to 3 minutes. If the lookup is still running, the tool returns a LOOKUP_TIMEOUT error with the lookupId; call get_product_lookup with it.
Set your client’s tool timeout longer than timeoutSeconds. The Codex example uses tool_timeout_sec = 240 for the 180-second default. If your client allows only short tool calls, use submit_prompt and then get_task.