Competitor Keyword Gap
competitor_gap_extractorCompares the target and competitor domains across a caller-supplied keyword list; it does not discover a competitor's full keyword set. Domains match a result's host and its subdomains (example.com also finds blog.example.com; a listed subdomain matches only itself and below, a leading www. is dropped so www.example.com means example.com, and the most specific listed domain claims a result). results holds one row per keyword, once; top_opportunities (opportunity_score 60 or more, highest first, ties by keyword), missing_keywords and shared_keywords (in the order you supplied) name keywords of those rows. A position is a number when the site was observed and null when it was not, never 0; target_rank_status and competitor_rank_status say ranked, not_in_results (absent from a sample that proves it: outside the top verified_depth) or unknown; competitor_urls gives the result URL behind each competitor position, and top_domains the first 5 sites the sample shows with their positions, so a keyword where no listed competitor ranks still says who does. keyword_difficulty_note states once what each row's keyword_difficulty estimate is. Every row carries its sample: serp_results_returned, strict serp_complete, observed_at, cache_age_seconds and verified_depth, the N for which an absent site is proven to be outside the top N (often a little less than the requested depth: Google's pages carry eight to ten organic results). A category that claims an absence (missing, neither, target_only) is provisional only when the sample proves none: a results page could not be fetched or a result could not be tied to a site. opportunity_score is a documented heuristic; score_inputs and score_method show how it was computed. Credits: per Google results page actually fetched (5 live, 0 cached) for audited keywords; depth defaults to 10 results (one page, 5 credits a keyword when live) and deeper samples cost more (30 results = 3 pages, up to 15 credits a keyword). When the daily live-page allowance or the balance does not cover live pages, cached keywords are still served at no charge and the rest are not sampled (error_code DAILY_LIVE_LIMIT or INSUFFICIENT_CREDITS). market_check says whether the country the results are for is confirmed: confirmed (market_evidence.method says by what: page_data or page_footer, Google's own page states it; provider_echo, the search provider states the country it searched), or unconfirmed (nothing states it; the page is returned but never recorded as a rank observation). A page produced for another country is discarded and fetched again; MARKET_MISMATCH means no fetch gave the requested country. With project_id, only a page fetched for the call is recorded as an observation of the project's saved keywords: a page answered from storage (cache_hit) is not a new observation, and project_link.note says so; freshness "fresh" observes now. Each row's keyword_difficulty is DataFluxor's own estimate of how hard that search is to rank for (score 0-100, band, confidence, signals), from the results page the row was read from; it is not a backlink-based or Google figure. The result is returned here and may also be kept for up to 30 days as a completed run: retained.run_id reads it again for free with scraper_run_get (retained.available false says why it was not kept). Saved synchronous results can be evicted earlier when storage is needed; set background true (with an idempotency_key) to start the work as a saved run at once. If the call would outlast the connection (many items, deep or fresh SERPs) or the platform has no free capacity, it is not failed: the result is an accepted answer (accepted true, run_id, state, next_step) and the work runs as a saved run; ask scraper_run_get about run_id (view status) as often as retry_after_seconds says. A batch tool's run is charged item by item as each item finishes (failed items are free); any other run once, when it completes. The same idempotency_key prevents a second charge during its retry window; a later new call may be charged.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target_domain": "<target_domain>",
"competitor_domains": "<competitor_domains>",
"keywords": "<keywords>",
"country": "<country>"
},
"name": "competitor_gap_extractor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Organic results sampled per keyword (1-100, default 10: the top 10, one page, 5 credits a keyword). Every 10 results is one Google results page: 5 credits when fetched live, 0 when served from cache. | |
| country | Yes | Two-letter country code of a supported Google market; see GET /api/v1/serp/markets. | |
| keywords | Yes | Keywords to analyze | |
| language | No | Result language (Google hl). Defaults to the market's own language; markets served through the managed SERP API accept any language code, e.g. en for English results in DE. | |
| freshness | No | Reuse of stored Google results pages. standard (default): a page fetched within this tool's window (24 hours; 6 hours with project_id unless max_age_seconds says otherwise) may answer, at 0 credits instead of 5. fresh: every page is fetched live now. A result says what it used at its top level: cache_hit, with cache_age_seconds (one search) or rows_from_cache and oldest_page_age_seconds (several searches). | |
| verbosity | No | concise: short summary of the answer; full: the whole answer. Only shapes the output. Send idempotency_key to read the other form later without a new charge. | |
| background | No | Optional. true starts this work as a saved background run and answers at once with run_id instead of the result; read it with scraper_run_get. Needs an idempotency_key: the same key returns the same run and never charges twice, for the 30 days the run is kept. Charged like the direct call, as the run's work completes. Without it, a call that would take too long is also answered as a saved run. | |
| project_id | No | Optional: a project of this organization (projects_list shows them). The result is then linked to the project's saved keywords that it observed, so saved_keyword_get can answer from it later, and it carries project_link (the saved keywords matched). Costs nothing extra. Omit it for a call that belongs to no project. | |
| target_domain | Yes | Your target domain. A domain such as example.com also matches its subdomains (blog.example.com); a subdomain such as blog.example.com matches only itself and below; a leading www. is dropped | |
| idempotency_key | No | Optional retry key bound to this customer and these arguments. Matching retries replay the first result and do not reserve a second credit; the replay says so in billing (replayed true, credits_charged_this_call 0, original_credits_used). | |
| max_age_seconds | No | Oldest stored results page that may answer, in seconds (60 to 86400); older pages are fetched live. Default: this tool's window (24 hours), or 6 hours (21600) when project_id is given and max_age_seconds is not, because a day-old page is not where a site ranks now. | |
| competitor_domains | Yes | List of competitor domains, matched the same way as target_domain |