Skip to main content
The querying.ai MCP server exposes the API as Model Context Protocol tools. It uses the same engines, queue, result shapes and API keys as the REST API, and it does not store your key or your tasks.

Connect a client

Put your key in the QUERYING_API_KEY environment variable first. Get one from API keys.
Keep the single quotes. With double quotes your shell expands the key once and Claude Code stores the value in its config file.
Any other Streamable HTTP client works if it sends these headers on every request:
A request without a bearer header returns 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. 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.

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.

Errors

Tool errors come back as JSON in the tool result:

Billing

Every tool call is billed to the account that owns the key, at the same prices as the REST API. Key settings apply: an engine scope or daily credit limit on the key limits what the agent can spend. Give an agent its own scoped key with a daily limit.