{"openapi":"3.1.0","info":{"title":"TabAPI — Domain and Web Data API","version":"1.0.0","description":"Credit-metered domain and web data: traffic, WHOIS/RDAP, DNS, backlinks, domain rating, hosted favicons, reverse-AdSense, Google web search, provider-neutral URL-to-Markdown conversion, first-viewport screenshots, page HTML (as served or rendered), SEO and GEO audits, and keyword density of public pages. Authenticate with a per-user `sk_` key as `Authorization: Bearer`. Successful responses are the bare resource; failures use `{ error: { code, ... } }`. Every response carries a `Request-Id`; a successful one also says what it cost in `Credits-Charged`, and `GET /balance` (free) returns the credits left. See /docs for the interactive reference and console.","contact":{"name":"API support","url":"https://tabapi.com/docs"}},"servers":[{"url":"https://tabapi.com/api/v1","description":"v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Domains","description":"Per-domain data"},{"name":"Search","description":"Google web search results"},{"name":"Publishers","description":"AdSense publisher lookups"},{"name":"Markdown","description":"Convert public URLs into Markdown"},{"name":"Screenshot","description":"Capture public URLs into stable hosted image assets"},{"name":"HTML","description":"Fetch the HTML of public URLs, as served or rendered"},{"name":"Audit","description":"Audit public pages for search engine (SEO) and AI search (GEO) readiness"},{"name":"Keywords","description":"Keyword density of public pages"},{"name":"Datasets","description":"Which release of a periodically published dataset is current"},{"name":"Account","description":"Your credit balance"}],"paths":{"/domains/{domain}/traffic":{"get":{"operationId":"getTraffic","tags":["Domains"],"summary":"Website traffic","description":"Modeled traffic estimates: monthly visits, engagement, sources, top regions and keywords. The hostname is looked up as given, so a subdomain returns its own figures, not its parent domain's. Cost: one credit per month actually returned, from 3 to 12 credits.","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain or hostname (e.g. vercel.com), not a URL. Normalized to punycode lowercase; endpoint descriptions state when the registrable root is used.","schema":{"type":"string","examples":["vercel.com"]}},{"name":"months","in":"query","required":false,"description":"Trailing months of history in monthly_visits (3–12). Billing uses the number of months actually returned.","schema":{"type":"integer","minimum":3,"maximum":12,"default":3}}],"responses":{"200":{"description":"Traffic estimates.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Traffic"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/domains/{domain}/whois":{"get":{"operationId":"getWhois","tags":["Domains"],"summary":"Raw WHOIS (port-43)","description":"Raw port-43 WHOIS text. For structured data use /rdap. Cost: 1 credit.","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain or hostname (e.g. vercel.com), not a URL. Normalized to punycode lowercase; endpoint descriptions state when the registrable root is used.","schema":{"type":"string","examples":["vercel.com"]}}],"responses":{"200":{"description":"Raw WHOIS text.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Whois"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/domains/{domain}/rdap":{"get":{"operationId":"getRdap","tags":["Domains"],"summary":"Registration data (RDAP)","description":"Structured registration data (RFC 9083). RDAP-first; port-43-only records are converted to an RDAP-compatible object. Cost: 1 credit.","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain or hostname (e.g. vercel.com), not a URL. Normalized to punycode lowercase; endpoint descriptions state when the registrable root is used.","schema":{"type":"string","examples":["vercel.com"]}}],"responses":{"200":{"description":"RDAP domain object.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RdapDomain"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/domains/{domain}/dns":{"get":{"operationId":"getDns","tags":["Domains"],"summary":"DNS records","description":"DNS records over DoH with Cloudflare and Google queried in parallel. A NOERROR response is preferred over an earlier DNS error. Cost: 1 credit.","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain or hostname (e.g. vercel.com), not a URL. Normalized to punycode lowercase; endpoint descriptions state when the registrable root is used.","schema":{"type":"string","examples":["vercel.com"]}},{"name":"type","in":"query","required":false,"description":"Case-insensitive RR type, or `all` to fan out A, AAAA, MX, NS, TXT, CNAME.","schema":{"type":"string","enum":["NS","A","AAAA","MX","TXT","CNAME","all"],"default":"NS"}}],"responses":{"200":{"description":"DNS records.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dns"},"example":{"domain":"vercel.com","status":"NOERROR","resolver":"cloudflare","records":[{"type":"A","name":"vercel.com.","ttl":300,"value":"76.76.21.21"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/domains/{domain}/backlinks":{"get":{"operationId":"getBacklinks","tags":["Domains"],"summary":"Backlinks","description":"Backlink profile for the submitted hostname and its subdomains: rating, overview counts and a sample of referring links. Cost: 5 credits. Optionally streamable as SSE (`Accept: text/event-stream` or `?stream=true`): frames meta → [rating] → overview → backlinks → done. The optional `rating` frame is a streaming-only supplemental value, emitted only on a full-profile cache miss when ready before overview. The supplemental lookup has its own 24-hour cache and never delays overview. Full-profile cache hits skip the rating frame and supplemental lookup. JSON requests do not perform that supplemental lookup; `overview.domain_rating` remains the canonical profile value.","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain or hostname (e.g. vercel.com), not a URL. Normalized to punycode lowercase; endpoint descriptions state when the registrable root is used.","schema":{"type":"string","examples":["vercel.com"]}},{"name":"stream","in":"query","required":false,"description":"If `true` (or Accept: text/event-stream), stream the result as SSE.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Backlink profile as JSON, or an SSE stream when Accept is text/event-stream.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Backlinks"}},"text/event-stream":{"schema":{"type":"string","description":"SSE frames: `event: meta|rating|overview|backlinks|done|error`, with JSON `data:` for each frame. Business-event payloads are `rating` `{ domain, rating }`, `overview` `{ domain, overview }`, and `backlinks` `{ domain, backlinks }`; `rating` is optional and, when available, is emitted before `overview`. Control-event payloads for `meta`, `error`, and `done` do not include `domain`. A successful stream ends with `event: done`, whose data is `{ credits_charged }` because the charge settles after the headers are sent."}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/domains/{domain}/domain-rating":{"get":{"operationId":"getDomainRating","tags":["Domains"],"summary":"Domain rating","description":"Domain rating of the submitted hostname: a 0-100 score for the strength of its backlink profile, where higher means more, and stronger, referring domains. The hostname is rated as given, not reduced to its registrable root. A rating of 0 means no measurable backlink profile and is a successful response. Cost: 1 credit. For referring-domain counts and top links, use `GET /domains/{domain}/backlinks` instead.","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain or hostname (e.g. vercel.com), not a URL. Normalized to punycode lowercase; endpoint descriptions state when the registrable root is used.","schema":{"type":"string","examples":["vercel.com"]}}],"responses":{"200":{"description":"Domain rating.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainRating"},"example":{"domain":"vercel.com","domain_rating":92}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/domains/{domain}/favicon":{"get":{"operationId":"getFavicon","tags":["Domains"],"summary":"Favicon","description":"The favicon of the submitted hostname, as a hosted copy. The home page is read as a browser reads it (redirects followed, HTTP when HTTPS does not answer); the icons it and its web app manifest declare are tried largest first, then `/apple-touch-icon.png` and `/favicon.ico`, and the first file that is a real PNG, ICO, GIF, JPEG, WebP or SVG image is kept. When the site yields none, a public favicon service is the last resort (`source.type` `fallback`). Raster icons are preferred; an SVG is used only when no raster icon of 64 px or more is found, and only if it carries no script. `icon.url` stays available for at least 24 hours, like screenshot URLs. Results are cached for up to 3 days. A domain with no icon anywhere is 404 `not_found`. Cost: 1 credit.","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain or hostname (e.g. vercel.com), not a URL. Normalized to punycode lowercase; endpoint descriptions state when the registrable root is used.","schema":{"type":"string","examples":["vercel.com"]}}],"responses":{"200":{"description":"The favicon.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Favicon"},"example":{"domain":"vercel.com","site_url":"https://vercel.com/","icon":{"url":"https://files.tabapi.com/favicon/v1/b676cf806fb9e93c8281f3eb6e8c640c8d9976634e03abe1a3daaceaeced694d.png","format":"png","mime_type":"image/png","width":512,"height":512,"size_bytes":2612},"source":{"type":"manifest","url":"https://py8fhxnkzwtsqdo9.public.blob.vercel-storage.com/front/favicon/vercel/android-chrome-512x512.png"},"declared_icons":[{"url":"https://assets.vercel.com/image/upload/q_auto/front/favicon/vercel/favicon.ico","rel":"icon shortcut","sizes":null,"type":"image/x-icon"},{"url":"https://py8fhxnkzwtsqdo9.public.blob.vercel-storage.com/front/favicon/vercel/android-chrome-512x512.png","rel":"manifest","sizes":"512x512","type":"image/png"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/search/google":{"get":{"operationId":"searchGoogle","tags":["Search"],"summary":"Google web search","description":"Provider-neutral Google web results: organic listings, ads, answer box, knowledge graph, People Also Ask, and related searches. Returns 10 results per page. Cost: 1 credit per page by default.","parameters":[{"name":"q","in":"query","required":true,"description":"Google search query. Search operators such as `site:` and `inurl:` are preserved.","schema":{"type":"string","minLength":1,"maxLength":500,"examples":["png to svg","markdown editor","image upscaler"]}},{"name":"country","in":"query","required":false,"description":"Two-letter country code used to localize results.","schema":{"type":"string","pattern":"^[a-z]{2}$","default":"us"}},{"name":"language","in":"query","required":false,"description":"Language code used to localize results, such as `en` or `zh-cn`.","schema":{"type":"string","pattern":"^[a-z]{2,3}(-[a-z0-9]{2,8})*$","default":"en"}},{"name":"page","in":"query","required":false,"description":"One-based result page; every page contains 10 results.","schema":{"type":"integer","minimum":1,"maximum":10,"default":1}}],"responses":{"200":{"description":"Stable Google search result.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleSearch"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/publishers/{pub_id}/sites":{"get":{"operationId":"getPublisherSites","tags":["Publishers"],"summary":"Reverse AdSense","description":"Domains observed carrying a given AdSense publisher id on their homepage. The returned list can be a subset; compare `sites.length` with `total_sites` to determine completeness. Cost: 3 credits by default.","parameters":[{"name":"pub_id","in":"path","required":true,"description":"A 16-digit AdSense publisher id, with or without the `pub-` prefix.","schema":{"type":"string","pattern":"^(?:pub-)?\\d{16}$","examples":["pub-1313834454494130","pub-4658181883112071"]}}],"responses":{"200":{"description":"Observed publisher sites.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublisherSites"},"example":{"publisher_id":"pub-1313834454494130","total_sites":4,"sites":["gachacute.com","sprunkin.com","zorse-game.com","gachanebula.io"]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/markdown":{"post":{"operationId":"extractMarkdown","tags":["Markdown"],"summary":"Convert a public URL to Markdown","description":"Fetch a public HTTP/HTTPS URL and return provider-neutral Markdown. Cost: 1 credit by default.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkdownRequest"},"example":{"url":"https://vercel.com/"}}}},"responses":{"200":{"description":"Stable URL-to-Markdown result.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkdownResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/screenshot":{"post":{"operationId":"captureScreenshot","tags":["Screenshot"],"summary":"Capture a public URL","description":"Capture the first viewport of a public HTTP/HTTPS URL as PNG. Provider-owned URLs are downloaded, validated, and copied to configured storage. The returned URL is temporary and guaranteed for at least 24 hours after the API response; download it to your own storage if you need to keep it longer. Cost: 1 credit by default.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenshotRequest"},"example":{"url":"https://news.ycombinator.com/","options":{"viewport":{"width":1920,"height":1080}}}}}},"responses":{"200":{"description":"Screenshot result with a hosted PNG asset.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenshotResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/html":{"post":{"operationId":"fetchHtml","tags":["HTML"],"summary":"Fetch the HTML of a public URL, raw or rendered","description":"Fetch a public HTTP/HTTPS URL and return its HTML decoded to UTF-8. By default it is exactly what the server sent, before any JavaScript runs, so client-rendered content is absent; with render: true it is the DOM after a real browser ran the page's scripts. Prefer extractMarkdown to read a page; use this when you need the markup itself (meta tags, JSON-LD, links), or compare both modes to find content that only exists after JavaScript. Content can be up to 5 MiB. Cost: 1 credit by default.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HtmlRequest"},"example":{"url":"https://example.com/"}}}},"responses":{"200":{"description":"The page HTML.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HtmlResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/audit/seo":{"post":{"operationId":"auditSeo","tags":["Audit"],"summary":"Audit a page for technical SEO","description":"Audit a public page for technical SEO: whether search engines can crawl, index and show it well, judged by what Google Search Central, the Bing Webmaster Guidelines and Lighthouse publish. 23 checks in five weighted categories (crawling & indexing, search appearance, page content, links, mobile & international) read the page once as its server answers it, which is what every crawler gets (status, X-Robots-Tag and Link headers, the HTML before JavaScript runs), and its robots.txt and sitemap.xml. A failed blocker (a 404 or 410, a noindex rule) caps the score at 39; a page whose HTML is almost empty until JavaScript runs is capped at 59. Returns a 0-100 score, a letter grade, every check with its status, finding and sources, and a Markdown report to hand to a coding assistant. Does not measure rankings, backlinks or content quality. Cost: 2 credits by default.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageAuditRequest"},"example":{"url":"https://example.com/"}}}},"responses":{"200":{"description":"The SEO audit.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageAuditResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/audit/geo":{"post":{"operationId":"auditGeo","tags":["Audit"],"summary":"Audit a page for AI search readiness (GEO)","description":"Audit a public page for GEO (Generative Engine Optimization): how ready it is to be crawled, understood and cited by AI answer engines such as ChatGPT, Perplexity, Claude and Google AI Overviews. 33 checks in five weighted categories read the page once as its server answers it, which is what AI crawlers get (X-Robots-Tag and Link headers, the HTML before JavaScript runs), and its robots.txt, llms.txt and sitemap.xml. A failed blocker (a noindex rule, or every AI search crawler blocked in robots.txt) caps the score at 39; a page whose HTML is almost empty until JavaScript runs is capped at 59. Returns a 0-100 score, a letter grade, every check with its status, finding and sources, and a Markdown report to hand to a coding assistant. Cost: 2 credits by default.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageAuditRequest"},"example":{"url":"https://example.com/"}}}},"responses":{"200":{"description":"The GEO audit.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageAuditResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/keyword-density":{"post":{"operationId":"analyzeKeywordDensity","tags":["Keywords"],"summary":"Keyword density of a page","description":"Keyword density of a public page: the words and phrases it repeats most. Counts the HTML the server sends, before JavaScript runs (text a script adds is not counted), split at Unicode word boundaries (Chinese, Japanese and Thai by dictionary). Stop words are those of the page's declared language, of the language its words read as, and of English; numbers are not keywords. Phrases of 2-5 words never cross punctuation or a block of the page and neither start nor end with a stop word or a number. Returns the total word count (the density denominator) and, for each phrase size 1-5, how many distinct phrases there are and the most frequent `limit` of them with their count, density (count / total words) and whether they also appear in the page's title, meta description and H1. Takes 1-5 seconds. Cost: 1 credit by default.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordDensityRequest"},"example":{"url":"https://example.com/","limit":20}}}},"responses":{"200":{"description":"The keyword density.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordDensityResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"500":{"$ref":"#/components/responses/E500"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"},"504":{"$ref":"#/components/responses/E504"}}}},"/datasets/traffic":{"get":{"operationId":"getTrafficDataset","tags":["Datasets"],"summary":"Current traffic release","description":"Which month the traffic data currently covers. Traffic is published monthly, on no fixed day; compare `latest_period` with the `overview.month` of traffic you cached and fetch again only when it is newer. Free: it never spends credits. The response carries `ETag: \"<latest_period>\"` and `Cache-Control: private, max-age=3600`; send `If-None-Match` with that tag to get an empty 304 until the next release.","x-free":true,"responses":{"200":{"description":"The current release of the traffic dataset.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrafficDataset"},"example":{"name":"traffic","latest_period":"2026-10","granularity":"month"}}}},"304":{"description":"Not modified: `If-None-Match` names the current release. No body."},"401":{"$ref":"#/components/responses/E401"},"500":{"$ref":"#/components/responses/E500"},"503":{"$ref":"#/components/responses/E503"}}}},"/balance":{"get":{"operationId":"getBalance","tags":["Account"],"summary":"Credit balance","description":"Credits left on the account that owns the key. Free: it never spends credits. Check it before a task that needs many calls.","x-free":true,"responses":{"200":{"description":"Remaining credits.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Credits-Charged":{"$ref":"#/components/headers/CreditsCharged"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"},"example":{"credits":1250}}}},"401":{"$ref":"#/components/responses/E401"},"500":{"$ref":"#/components/responses/E500"},"503":{"$ref":"#/components/responses/E503"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sk_ key","description":"A per-user API key. Send as `Authorization: Bearer sk_...`. Keys in the query string are rejected."}},"headers":{"RequestId":{"description":"Unique request id (also echoed in error bodies as request_id).","schema":{"type":"string","pattern":"^req_[0-9]+$","examples":["req_84773430911418147"]}},"RetryAfter":{"description":"Whole seconds to wait before retrying the request.","schema":{"type":"integer","minimum":1}},"CreditsCharged":{"description":"Credits this request spent, after any partial refund: 0 for a free operation. Sent on successful API-key responses; errors are never charged.","schema":{"type":"integer","minimum":0}}},"responses":{"E400":{"description":"Malformed request or invalid parameter.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E401":{"description":"Missing or invalid API key.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E402":{"description":"Insufficient credits; nothing was charged.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E404":{"description":"Unknown route, or (for /rdap) an unregistered domain, or (for /favicon) a domain with no icon.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E422":{"description":"Valid domain the service cannot fulfil (e.g. a TLD with no WHOIS/RDAP).","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E500":{"description":"Unexpected server error.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E502":{"description":"An upstream data source failed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E503":{"description":"The service is temporarily busy; retry after Retry-After seconds.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E504":{"description":"An upstream data source timed out.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","status","request_id","docs_url"],"properties":{"code":{"type":"string","description":"Stable, machine-readable error code. Branch on this.","enum":["invalid_request","invalid_domain","unauthorized","invalid_api_key","insufficient_credits","not_found","method_not_allowed","unprocessable","internal_error","service_unavailable","upstream_error","upstream_timeout"]},"message":{"type":"string","description":"Human-readable; may change. Do not parse."},"status":{"type":"integer","minimum":400,"maximum":599,"description":"Mirror of the HTTP status."},"request_id":{"type":"string","pattern":"^req_[0-9]+$"},"docs_url":{"type":"string","format":"uri","description":"Deep link to the docs entry for this code."},"details":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetail"}}}}}},"ErrorDetail":{"type":"object","additionalProperties":false,"required":["field","issue"],"properties":{"field":{"type":"string"},"issue":{"type":"string"}}},"MarkdownRequest":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri","maxLength":4096,"description":"A public HTTP/HTTPS URL. Private, local and credential-bearing URLs are rejected.","examples":["https://vercel.com/","https://supabase.com/","https://railway.com/"]}}},"MarkdownResult":{"type":"object","additionalProperties":false,"required":["source","page","output","warnings"],"properties":{"source":{"$ref":"#/components/schemas/WebSource"},"page":{"$ref":"#/components/schemas/WebPage"},"output":{"$ref":"#/components/schemas/MarkdownOutput"},"warnings":{"type":"array","items":{"type":"string"}}}},"PageAuditRequest":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri","maxLength":4096,"description":"A public HTTP/HTTPS page. Private, local and credential-bearing URLs are rejected.","examples":["https://example.com/","https://www.python.org/"]}}},"PageAuditResult":{"type":"object","additionalProperties":false,"description":"An SEO or GEO audit: both answer in this shape, with their own categories and checks.","required":["source","score","grade","cap","totals","categories","report","warnings"],"properties":{"source":{"$ref":"#/components/schemas/WebSource"},"score":{"type":"integer","minimum":0,"maximum":100,"description":"Weighted composite of the category scores, after any cap; categories whose checks were all skipped do not count."},"grade":{"type":"object","additionalProperties":false,"required":["letter","label"],"properties":{"letter":{"type":"string","enum":["A","B","C","D","F"]},"label":{"type":"string"}}},"cap":{"type":["object","null"],"additionalProperties":false,"required":["max","reason","blocked"],"description":"The ceiling that lowered the score, or null. A failed blocker check caps it at 39; server HTML or a robots.txt that could not be read caps it at 69 or 84.","properties":{"max":{"type":"integer","minimum":0,"maximum":100},"reason":{"type":"string"},"blocked":{"type":"boolean","description":"True when a failed blocker makes the page ineligible to appear, rather than data that could not be read."}}},"totals":{"type":"object","additionalProperties":false,"required":["passed","warnings","failed"],"description":"Check counts; info and skipped checks are not counted.","properties":{"passed":{"type":"integer","minimum":0},"warnings":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0}}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/AuditCategory"}},"report":{"type":"string","description":"The audit as Markdown, failures first, for pasting into an AI coding assistant."},"warnings":{"type":"array","items":{"type":"string"},"description":"Notes such as server HTML that could not be fetched, which skips the checks that read it."}}},"AuditCategory":{"type":"object","additionalProperties":false,"required":["id","name","weight","score","checks"],"properties":{"id":{"type":"string","description":"SEO: indexing, appearance, content, links, mobile. GEO: crawlers, readability, structured, citability, trust.","enum":["indexing","appearance","content","links","mobile","crawlers","readability","structured","citability","trust"]},"name":{"type":"string"},"weight":{"type":"integer","description":"Weight in the composite score; the five sum to 100."},"score":{"type":["integer","null"],"minimum":0,"maximum":100,"description":"null when every check in the category was skipped."},"checks":{"type":"array","items":{"$ref":"#/components/schemas/AuditCheck"}}}},"AuditCheck":{"type":"object","additionalProperties":false,"required":["id","title","status","message","weight"],"properties":{"id":{"type":"string","examples":["indexability","canonical","ai-search-crawlers"]},"title":{"type":"string"},"status":{"type":"string","enum":["passed","warning","failed","info","skipped"],"description":"passed scores 1, warning 0.5, failed 0; info and skipped never count."},"message":{"type":"string","description":"What the check found."},"weight":{"type":"number","description":"Relative weight inside its category."},"sources":{"type":"array","description":"The documents the rule rests on, the primary one first.","items":{"type":"object","additionalProperties":false,"required":["label","url"],"properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri"}}}},"blocker":{"type":"boolean","description":"Present on checks that cap the score at 39 when they fail."}}},"KeywordDensityRequest":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri","maxLength":4096,"description":"A public HTTP/HTTPS page. Private, local and credential-bearing URLs are rejected.","examples":["https://example.com/","https://go.dev/"]},"limit":{"type":"integer","minimum":1,"maximum":1000,"default":50,"description":"Keywords returned per phrase size, the most frequent first. `distinct` always counts them all."}}},"KeywordDensityResult":{"type":"object","additionalProperties":false,"required":["source","total_words","phrase_sizes","warnings"],"properties":{"source":{"$ref":"#/components/schemas/WebSource"},"total_words":{"type":"integer","minimum":0,"description":"The server HTML's word count (stop words and numbers included), the denominator of every density."},"phrase_sizes":{"type":"array","minItems":5,"maxItems":5,"description":"One entry per phrase size, 1 to 5 words.","items":{"$ref":"#/components/schemas/KeywordPhraseSize"}},"warnings":{"type":"array","items":{"type":"string"},"description":"Notes such as server HTML past a million characters or 50,000 tags, or text past 200,000 characters, which is not analyzed, and server HTML with no words."}}},"KeywordPhraseSize":{"type":"object","additionalProperties":false,"required":["size","distinct","keywords"],"properties":{"size":{"type":"integer","minimum":1,"maximum":5},"distinct":{"type":"integer","minimum":0,"description":"Distinct phrases of this size on the page."},"keywords":{"type":"array","description":"The most frequent first; ties keep the order of first appearance.","items":{"$ref":"#/components/schemas/DensityKeyword"}}}},"DensityKeyword":{"type":"object","additionalProperties":false,"required":["keyword","count","density","found_in"],"properties":{"keyword":{"type":"string","examples":["golang","open source"]},"count":{"type":"integer","minimum":1},"density":{"type":"number","minimum":0,"description":"count / total_words, as a fraction (0.0143 is 1.43%)."},"found_in":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["title","description","h1"]},"description":"Where else in the server HTML the keyword appears, in this order: its title, meta description and H1 headings. Found whole ('car' is not in 'cars'), ignoring case and punctuation."}}},"WebSource":{"type":"object","additionalProperties":false,"required":["requested_url","resolved_url","http_status"],"properties":{"requested_url":{"type":"string","format":"uri"},"resolved_url":{"type":"string","format":"uri"},"http_status":{"type":"integer","minimum":100,"maximum":399}}},"WebPage":{"type":"object","additionalProperties":false,"required":["title","description","language","published_at","metadata"],"properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"language":{"type":["string","null"]},"published_at":{"type":["string","null"],"format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Sanitized page metadata, capped in size."}}},"MarkdownOutput":{"type":"object","additionalProperties":false,"required":["format","mime_type","content","truncated"],"properties":{"format":{"type":"string","enum":["markdown"]},"mime_type":{"type":"string","const":"text/markdown; charset=utf-8"},"content":{"type":"string","minLength":1,"description":"Provider-normalized Markdown content."},"truncated":{"type":"boolean","description":"True when content reached the service safety limit."}}},"HtmlRequest":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri","maxLength":4096,"description":"A public HTTP/HTTPS URL. Private, local and credential-bearing URLs are rejected.","examples":["https://example.com/","https://www.wikipedia.org/","https://news.ycombinator.com/"]},"render":{"type":"boolean","default":false,"description":"Return the DOM after a real browser loaded the page and ran its scripts, instead of the bytes the server sent. Slower: typically 5-15 seconds."}}},"HtmlResult":{"type":"object","additionalProperties":false,"required":["source","output","warnings"],"properties":{"source":{"$ref":"#/components/schemas/WebSource"},"output":{"$ref":"#/components/schemas/HtmlOutput"},"warnings":{"type":"array","items":{"type":"string"}}}},"HtmlOutput":{"type":"object","additionalProperties":false,"required":["format","mime_type","rendered","encoding","content","truncated"],"properties":{"format":{"type":"string","enum":["html"]},"mime_type":{"type":"string","const":"text/html; charset=utf-8"},"rendered":{"type":"boolean","description":"true when content is the DOM after the page's scripts ran (render: true)."},"encoding":{"type":"string","description":"Encoding the page was served in (e.g. utf-8, gbk, shift_jis). content is always decoded, so a <meta charset> inside it describes the original bytes, not this string."},"content":{"type":"string","minLength":1,"description":"The HTML document: as the server sent it, or the serialized DOM when rendered is true."},"truncated":{"type":"boolean","description":"True when the page exceeded 5 MiB and was cut."}}},"ScreenshotRequest":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri","maxLength":4096,"description":"A public HTTP/HTTPS URL. Private, local and credential-bearing URLs are rejected.","examples":["https://news.ycombinator.com/","https://canva.com/","https://railway.com/"]},"options":{"$ref":"#/components/schemas/ScreenshotOptions"}}},"ScreenshotOptions":{"type":"object","additionalProperties":false,"properties":{"viewport":{"$ref":"#/components/schemas/ScreenshotViewport"}}},"ScreenshotViewport":{"type":"object","additionalProperties":false,"properties":{"width":{"type":"integer","minimum":320,"maximum":2560,"default":1920},"height":{"type":"integer","minimum":240,"maximum":2160,"default":1080}}},"ScreenshotResult":{"type":"object","additionalProperties":false,"required":["source","page","output","warnings"],"properties":{"source":{"$ref":"#/components/schemas/WebSource"},"page":{"$ref":"#/components/schemas/WebPage"},"output":{"$ref":"#/components/schemas/ScreenshotOutput"},"warnings":{"type":"array","items":{"type":"string"}}}},"ScreenshotOutput":{"type":"object","additionalProperties":false,"required":["format","mime_type","url","width","height","size_bytes"],"properties":{"format":{"type":"string","enum":["png"]},"mime_type":{"type":"string","const":"image/png"},"url":{"type":"string","format":"uri","description":"Temporary hosted image URL, guaranteed for at least 24 hours after the API response. Download it to your own storage for longer retention. The provider-owned URL is never exposed."},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1},"size_bytes":{"type":"integer","minimum":1,"maximum":5242880}}},"GoogleSearch":{"type":"object","additionalProperties":false,"required":["search_parameters","organic_results","paid_results","answer_box","knowledge_graph","people_also_ask","related_searches"],"properties":{"search_parameters":{"$ref":"#/components/schemas/GoogleSearchParameters"},"organic_results":{"type":"array","items":{"$ref":"#/components/schemas/GoogleOrganicResult"}},"paid_results":{"type":"array","items":{"$ref":"#/components/schemas/GooglePaidResult"}},"answer_box":{"oneOf":[{"$ref":"#/components/schemas/GoogleAnswerBox"},{"type":"null"}]},"knowledge_graph":{"oneOf":[{"$ref":"#/components/schemas/GoogleKnowledgeGraph"},{"type":"null"}]},"people_also_ask":{"type":"array","items":{"$ref":"#/components/schemas/GooglePeopleAlsoAsk"}},"related_searches":{"type":"array","items":{"$ref":"#/components/schemas/GoogleRelatedSearch"}}}},"GoogleSearchParameters":{"type":"object","additionalProperties":false,"required":["query","country","language","page","results_per_page"],"properties":{"query":{"type":"string"},"country":{"type":"string"},"language":{"type":"string"},"page":{"type":"integer"},"results_per_page":{"type":"integer","const":10}}},"GoogleSitelink":{"type":"object","additionalProperties":false,"required":["title","link"],"properties":{"title":{"type":"string"},"link":{"type":"string","format":"uri"}}},"GoogleOrganicResult":{"type":"object","additionalProperties":false,"required":["position","title","link","displayed_link","snippet","date","sitelinks","attributes"],"properties":{"position":{"type":"integer","minimum":1},"title":{"type":"string"},"link":{"type":"string","format":"uri"},"displayed_link":{"type":["string","null"]},"snippet":{"type":["string","null"]},"date":{"type":["string","null"]},"sitelinks":{"type":"array","items":{"$ref":"#/components/schemas/GoogleSitelink"}},"attributes":{"type":"object","additionalProperties":{"type":"string"}}}},"GooglePaidResult":{"type":"object","additionalProperties":false,"required":["position","title","link","displayed_link","snippet","placement","sitelinks"],"properties":{"position":{"type":"integer","minimum":1},"title":{"type":"string"},"link":{"type":"string","format":"uri"},"displayed_link":{"type":["string","null"]},"snippet":{"type":["string","null"]},"placement":{"type":"string","enum":["top","bottom","unknown"]},"sitelinks":{"type":"array","items":{"$ref":"#/components/schemas/GoogleSitelink"}}}},"GoogleAnswerBox":{"type":"object","additionalProperties":false,"required":["type","title","answer","snippet","link"],"properties":{"type":{"type":"string","enum":["featured_snippet","direct_answer","calculator","dictionary","other"]},"title":{"type":["string","null"]},"answer":{"type":["string","null"]},"snippet":{"type":["string","null"]},"link":{"type":["string","null"],"format":"uri"}}},"GoogleKnowledgeGraph":{"type":"object","additionalProperties":false,"required":["title","type","website","image_url","description","description_source","description_link","attributes"],"properties":{"title":{"type":"string"},"type":{"type":["string","null"]},"website":{"type":["string","null"],"format":"uri"},"image_url":{"type":["string","null"],"format":"uri"},"description":{"type":["string","null"]},"description_source":{"type":["string","null"]},"description_link":{"type":["string","null"],"format":"uri"},"attributes":{"type":"object","additionalProperties":{"type":"string"}}}},"GooglePeopleAlsoAsk":{"type":"object","additionalProperties":false,"required":["position","question","answer","title","link"],"properties":{"position":{"type":"integer","minimum":1},"question":{"type":"string"},"answer":{"type":["string","null"]},"title":{"type":["string","null"]},"link":{"type":["string","null"],"format":"uri"}}},"GoogleRelatedSearch":{"type":"object","additionalProperties":false,"required":["position","query","link"],"properties":{"position":{"type":"integer","minimum":1},"query":{"type":"string"},"link":{"type":["string","null"],"format":"uri"}}},"Traffic":{"type":"object","description":"Normalized, modeled website traffic estimates.","additionalProperties":false,"required":["domain","title","description","overview","monthly_visits","traffic_sources","top_keywords","top_regions","ai_traffic"],"properties":{"domain":{"type":"string","description":"The site these figures describe. Usually the requested hostname; a www. hostname returns its root domain."},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"overview":{"type":"object","description":"Headline metrics for the reporting month (overview.month): popularity (ranks), volume (visits) and behaviour.","additionalProperties":false,"required":["global_rank","country_rank","visits","bounce_rate","pages_per_visit","time_on_site_seconds","month"],"properties":{"global_rank":{"type":["integer","null"]},"country_rank":{"type":["object","null"],"description":"Rank within the top country; country and rank travel together.","additionalProperties":false,"required":["country","rank"],"properties":{"country":{"type":"string"},"rank":{"type":"integer"}}},"visits":{"type":["number","null"]},"bounce_rate":{"type":["number","null"]},"pages_per_visit":{"type":["number","null"]},"time_on_site_seconds":{"type":["number","null"]},"month":{"type":["string","null"],"description":"The month this overview represents, \"YYYY-MM\"."}}},"monthly_visits":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["month","visits"],"properties":{"month":{"type":"string"},"visits":{"type":"number"}}}},"traffic_sources":{"type":"object","description":"Share of traffic per channel (fractions [0,1]). Full fidelity: `search`/`social` are totals, with `*_organic`/`*_paid`/`gen_ai`/`affiliate` breakdowns on the newer upstream schema (null on the legacy one). All channels always present; null when unknown.","properties":{"direct":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"search":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"search_organic":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"search_paid":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"social":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"social_organic":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"social_paid":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"referrals":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"paid_referrals":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"mail":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"gen_ai":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"affiliate":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."},"other":{"type":["number","null"],"description":"Share of traffic, fraction [0,1]; null if unknown."}},"required":["direct","search","search_organic","search_paid","social","social_organic","social_paid","referrals","paid_referrals","mail","gen_ai","affiliate","other"],"additionalProperties":false},"top_keywords":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","volume","cpc","estimated_value"],"properties":{"name":{"type":"string"},"volume":{"type":"number"},"cpc":{"type":"number","description":"Estimated cost-per-click, in USD."},"estimated_value":{"type":"number","description":"Estimated monthly traffic value, in USD."}}}},"top_regions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["country","name","share"],"properties":{"country":{"type":"string"},"name":{"type":"string"},"share":{"type":"number"}}}},"ai_traffic":{"type":["object","null"],"description":"AI-assistant referral trends; null when unavailable. Each history point `date` is an upstream ISO date (monthly granularity).","additionalProperties":false,"required":["trends"],"properties":{"trends":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","history"],"properties":{"name":{"type":"string"},"history":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["date","value"],"properties":{"date":{"type":"string","format":"date"},"value":{"type":"number"}}}}}}}}}}},"TrafficDataset":{"type":"object","additionalProperties":false,"required":["name","latest_period","granularity"],"properties":{"name":{"type":"string","const":"traffic","description":"The dataset, as in its path."},"latest_period":{"type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])$","description":"The period the newest release covers, ISO 8601 for its granularity (`YYYY-MM` for a month). Not the release date: October data is published in early November. Compares as a string.","examples":["2026-10"]},"granularity":{"type":"string","enum":["month"],"description":"How often the dataset is published, and so the format of `latest_period`."}}},"Balance":{"type":"object","additionalProperties":false,"required":["credits"],"properties":{"credits":{"type":"integer","minimum":0,"description":"Credits available to spend now."}}},"Whois":{"type":"object","additionalProperties":false,"required":["domain","whois_server","raw"],"properties":{"domain":{"type":"string"},"whois_server":{"type":["string","null"],"description":"Port-43 server that answered."},"raw":{"type":"string","description":"Verbatim WHOIS text."}}},"RdapDomain":{"type":"object","description":"Upstream-owned RDAP domain object, or a best-effort RDAP-compatible WHOIS conversion. Only ldhName is guaranteed; other documented and extension fields are optional.","additionalProperties":true,"required":["ldhName"],"properties":{"objectClassName":{"type":"string","examples":["domain"]},"ldhName":{"type":"string"},"unicodeName":{"type":"string"},"status":{"type":"array","items":{"type":"string"}},"events":{"type":"array","items":{"type":"object","properties":{"eventAction":{"type":"string"},"eventDate":{"type":"string","format":"date-time"}}}},"entities":{"type":"array","items":{"type":"object","additionalProperties":true}},"nameservers":{"type":"array","items":{"type":"object","additionalProperties":true}},"secureDNS":{"type":"object","additionalProperties":true},"port43":{"type":"string"},"raw":{"type":"string","description":"Original WHOIS text, only when resolved via port-43 fallback."}}},"DnsRecord":{"type":"object","additionalProperties":false,"required":["type","name","ttl","value"],"properties":{"type":{"type":"string","description":"DNS record type by name."},"name":{"type":"string","description":"Owner name as returned by the resolver, commonly an FQDN ending in a dot."},"ttl":{"type":"integer","description":"Authoritative record TTL in seconds."},"value":{"type":"string","description":"Resolver-provided record data. DNS names may end in a dot and TXT data may retain quotes."}}},"Dns":{"type":"object","additionalProperties":false,"required":["domain","status","resolver","records"],"properties":{"domain":{"type":"string"},"status":{"type":"string","description":"DNS rcode name, e.g. NOERROR/NXDOMAIN. For type=all, NOERROR means at least one sub-query returned NOERROR."},"resolver":{"type":"string","enum":["cloudflare","google"],"description":"Selected DoH resolver. For type=all, this is the resolver selected for the A sub-query; other record types may come from the other resolver."},"records":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}}}},"Backlinks":{"type":"object","description":"Normalized backlink overview and a sample of top referring pages.","additionalProperties":false,"required":["domain","overview","backlinks"],"properties":{"domain":{"type":"string","description":"Normalized submitted domain or hostname."},"overview":{"type":"object","additionalProperties":false,"required":["domain_rating","backlinks","referring_domains","dofollow_backlinks_pct","dofollow_referring_domains_pct"],"properties":{"domain_rating":{"type":"number","minimum":0,"maximum":100},"backlinks":{"type":"integer","minimum":0},"referring_domains":{"type":"integer","minimum":0},"dofollow_backlinks_pct":{"type":"number","minimum":0,"maximum":100},"dofollow_referring_domains_pct":{"type":"number","minimum":0,"maximum":100}}},"backlinks":{"type":"array","description":"Top-link sample; overview.backlinks is the total indexed count.","items":{"type":"object","additionalProperties":false,"required":["from_url","to_url","title","anchor","domain_rating"],"properties":{"from_url":{"type":"string","format":"uri"},"to_url":{"type":"string","format":"uri"},"title":{"type":"string"},"anchor":{"type":"string"},"domain_rating":{"type":"number","minimum":0,"maximum":100}}}}}},"Favicon":{"type":"object","additionalProperties":false,"required":["domain","site_url","icon","source","declared_icons"],"properties":{"domain":{"type":"string","description":"The hostname, normalized."},"site_url":{"type":["string","null"],"format":"uri","description":"The home page that was read, after redirects; null when it could not be reached."},"icon":{"type":"object","additionalProperties":false,"required":["url","format","mime_type","width","height","size_bytes"],"properties":{"url":{"type":"string","format":"uri","description":"Temporary hosted copy of the icon, available for at least 24 hours. Identical icons share one URL. Copy the file to keep it longer."},"format":{"type":"string","enum":["png","ico","gif","jpeg","webp","svg"],"description":"Read from the file itself, not its extension."},"mime_type":{"type":"string"},"width":{"type":["integer","null"],"minimum":1,"description":"Pixels (an ICO reports its largest image); null for an SVG that states no size."},"height":{"type":["integer","null"],"minimum":1},"size_bytes":{"type":"integer","minimum":1}}},"source":{"type":"object","additionalProperties":false,"required":["type","url"],"properties":{"type":{"type":"string","enum":["link","manifest","default_path","fallback"],"description":"`link`: a `<link rel=icon|apple-touch-icon>` on the home page; `manifest`: the web app manifest; `default_path`: `/apple-touch-icon.png` or `/favicon.ico`; `fallback`: a public favicon service, used when the site yields none."},"url":{"type":["string","null"],"format":"uri","description":"The icon’s address on the site; null for `fallback`."}}},"declared_icons":{"type":"array","description":"Icons the home page and its manifest declare, as written and unverified, in page order.","items":{"type":"object","additionalProperties":false,"required":["url","rel","sizes","type"],"properties":{"url":{"type":"string","format":"uri"},"rel":{"type":"string","description":"The link’s rel (`icon`, `shortcut icon`, `apple-touch-icon`, …), or `manifest`."},"sizes":{"type":["string","null"],"description":"As declared, e.g. `32x32` or `any`."},"type":{"type":["string","null"],"description":"Declared MIME type."}}}}}},"DomainRating":{"type":"object","additionalProperties":false,"required":["domain","domain_rating"],"properties":{"domain":{"type":"string","description":"The rated hostname, normalized."},"domain_rating":{"type":"number","minimum":0,"maximum":100,"description":"Domain rating, 0-100. Higher means a stronger backlink profile; 0 means no measurable profile."}}},"PublisherSites":{"type":"object","additionalProperties":false,"required":["publisher_id","total_sites","sites"],"properties":{"publisher_id":{"type":"string","pattern":"^pub-\\d{16}$","description":"Normalized AdSense publisher id."},"total_sites":{"type":"integer","minimum":0,"description":"Total number of homepage matches reported by the configured data source."},"sites":{"type":"array","uniqueItems":true,"items":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?!-)[a-z0-9-]{1,63}(?<!-)(?:\\.(?!-)[a-z0-9-]{1,63}(?<!-))+$"},"description":"Returned sample of normalized domains whose homepage was observed carrying the publisher id."}}}}}}