AI
Research API
Call the JSON API, read the shared operations, and allow fresh research on purpose.
Applications send JSON to POST https://app.searchcub.com/api/ai/search.
curl 'https://app.searchcub.com/api/ai/search' \
-H 'Authorization: Bearer YOUR_SEARCHCUB_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"operation":"search_keywords","query":{"keyword":"running shoes","country":"SG","language":"en"},"allowFresh":false}'allowFresh is false, so this request does not start fresh research. operation selects a capability. query holds its inputs.
The MCP tools are the same capabilities. A tool takes the same object without operation, and the tool name is the operation name.
{
"query": { "keyword": "running shoes", "country": "SG", "language": "en" },
"allowFresh": false
}The bearer token is an OAuth access token whose resource is https://app.searchcub.com/api/mcp. A connected MCP client receives it during browser sign-in. The curl example shows where the token goes. The SearchCub connection page does not display a token to copy.
Read the contract
- Current capabilities, operation names and input schemas.
- OpenAPI document, for generating a client.
The list under Operations is that same catalogue.
Operations
- Supported research regions
list_regionsRead-only - List the selectable countries for new research. Select one or several countries; Worldwide is retired. Research language is English.
- Keyword research
search_keywords - Find keyword suggestions, related terms, questions and autocomplete with available demand, difficulty, intent and history. Initial suggestions/all/related searches automatically research up to three selected relevant first-layer keywords per country and include up to eight new related keywords per parent. keywordBranches preserves parent reasons, child relationships and incomplete status; this second layer is part of the original search and does not expand recursively. Continuation cursors cover only the original discovery streams. Optional countries selects multiple regions; additive estimates are summed and rates are volume-weighted. New research requires countries; Worldwide is retired. regionalPages preserves each country continuation. Reads existing data by default. Fresh research needs explicit allowFresh, a fresh-enabled token and an idempotency key; the shared daily tool search allowance and provider cost limits apply.
- Niche finder
find_niches - Split one interest into up to six narrower niches for one country in English. Each niche has a label, title, the anchor phrase it was researched with, a fixed-rule explanation built only from its own rows, typical monthly searches, difficulty and 12-month change (medians of rows with a value), a count of easy, rising rows and up to eight keyword and question rows in the shared keywords list, easiest niche first. Grouping reads shared words and provider topic labels, not meaning: niches are estimates to check, not a verdict. An interest that cannot be split returns NICHES_NOT_FOUND. incomplete:true marks a result where a keyword source could not be reached, so niches may hold fewer keywords than usual. Reads existing data by default. Fresh research needs explicit allowFresh, a fresh-enabled token and an idempotency key, and counts as one tool search when it successfully uses provider data from a fresh call.
- Domain and page keyword research
research_domain - Read rankings for a domain or exact page, or compare domain keyword gaps. Default ranking order is monthly searches descending. For one country in ranked mode, keywordView supplies keyword search, nested filter conditions and up to two sorts. Numeric filters compare missing values as zero. Conditions that match zero can return a short or empty page with a nextOffset and a null totalCount. Preserve keywordView and use the returned nextOffset on later pages. Restart at offset zero when criteria change. Computed grouping/history/combined-intent controls and global combined-country ordering are unavailable. Free accounts can page 100 rows at a time to a 1,000-row depth, counting candidate rows when conditions match zero. Paid accounts can request up to 1,000 rows at once. Limits apply to every API/MCP request. Optional countries combines selected country estimates with per-country regionalPages from loaded regional samples. Reads use existing data by default. Fresh research needs explicit authorization and normal plan allowances. Select one or more countries.
- Search result snapshot
inspect_serp - Inspect a localized Google desktop organic results snapshot and available result features. A specific country is required. Reads existing data by default; fresh research needs explicit authorization and the normal plan allowances.
- Domain search estimates
domain_insights - Read ranking distribution, top pages or the supplied twelve-month traffic history for a domain and country. Optional countries sums compatible selected-country metrics and retains missing-region coverage. New research requires countries; Worldwide is retired. Estimates and missing observations remain explicit. Reads existing data by default; fresh research needs explicit authorization and the normal plan allowances.
- AI visibility and keyword demand estimates
ai_metrics - Read AI metrics for one country in English. mode:keywords returns a question-based AI demand estimate and monthly history for up to 1,000 normalized unique keywords within the existing request-byte limit (split longer batches); this is not measured prompts or a platform-specific count. mode:domain returns cited-source mentions and associated volume separately for Google AI Overviews and ChatGPT; ChatGPT supports US English only. mode:analysis adds, for one site, up to 12 complete months of cited answers per platform, its cited pages, up to 75 collected questions with an answer excerpt, the cited source and other sources, search intent estimates for those questions, ChatGPT related searches and brands, the keywords whose Google AI Overview cites the site or does not, and the sites cited alongside it. Questions are provider-collected records, not prompts typed by real people. Monthly figures swing with the provider collection batches, so compare several months. A successful run that needs a fresh provider call uses one tool search, including in batch and analysis modes. Associated volume is not visits, domain searches or unique reach. Unsupported coverage and missing values remain unavailable, not zero. Without allowFresh, keyword batches return rows that are already available, at any batch size; missing rows stay unavailable and never start providers. Fresh requests need allowFresh, fresh scope and a retry-stable idempotencyKey; existing account, supplier-rights and provider-budget gates apply.
- Backlinks and page research details
research_details - Read the selected backlink summary/list/history, referring domains, linked pages, page HTML checks, mobile browser performance measurements and derived page issues, page comparison or keyword visits history. Performance issues describe one lab test, not site-wide Core Web Vitals. Each operation preserves its target, coverage and activation gates. Reads existing data by default; fresh research needs explicit authorization and the normal plan allowances.
- Organic competitors
organic_competitors - Read provider-known organic competitors for a domain and country. Provider index coverage is bounded. Reads existing data by default; fresh research needs explicit authorization and the normal plan allowances.
- Saved research
list_researchRead-only - List the connected account's saved research results, with an optional offset.
- Saved Keywords
list_saved_keywords - List the connected account's permanently saved keywords, market, list identity and optional offset. Optional listIds (1–100 of the account's list ids; other ids match nothing) returns only those lists' keywords, and the first page reports the matching total plus, when filtered, the chosen lists that exist with their item counts. By default, keyword metrics that are not available stay unavailable. Explicit allowFresh with a fresh-enabled token and retry-stable idempotency key refreshes unavailable keyword metrics on the requested page under the shared daily tool search allowance, counting one successful managed run that needs provider work. Refresh failures preserve saved keywords. Never deletes keywords.
- Read or export saved research
get_researchRead-only - Read one saved research run owned by the connected account as normalized JSON with source, market, dates, coverage and missing-data information.
- Saved site audits
list_auditsRead-only - List the connected account's saved site audits.
- Read a saved site audit
get_auditRead-only - Read one saved site audit owned by the connected account, preserving crawl limits, coverage, page issues and observation dates.
Read existing data
Leave allowFresh false, or omit it. The call returns existing data for that query. If SearchCub does not already have the research, the call is refused and no provider search starts. The stable error code is ANALYSIS_NOT_CACHED.
Fresh research
All three are required:
- The token includes the
research:freshscope. - The call sets
allowFreshto true. - The call sends
idempotencyKey, 8 to 100 characters, using letters, numbers, underscores or hyphens.
Reuse the key when you retry the same action. Use a new key for a new search. The plan allowance still applies. Permission to run fresh research still lets SearchCub answer from existing data first. It does not require a new provider call.
{
"operation": "search_keywords",
"query": { "keyword": "sourdough", "country": "US", "language": "en" },
"allowFresh": true,
"idempotencyKey": "sourdough-us-2026-11-28-a"
}Countries
list_regions returns the countries new research can use. search_keywords takes country and an optional countries array that includes that primary country. Niche finding takes one country. A new Worldwide request is rejected.