{"openapi":"3.1.0","info":{"title":"ScrapeNest","description":"AI search + scraping as an API for developers and AI agents.","version":"0.1.0"},"paths":{"/v1/me":{"get":{"tags":["auth"],"summary":"Return current API key info","operationId":"me_v1_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"tags":["auth"],"summary":"Return current API key info","operationId":"me_v1_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scrape/url":{"post":{"tags":["scrape"],"summary":"Fetch a single URL and return clean JSON","operationId":"post_scrape_url_v1_scrape_url_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scrape/batch":{"post":{"tags":["scrape"],"summary":"Fetch up to 10 URLs in one call","operationId":"post_scrape_batch_v1_scrape_batch_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchScrapeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchScrapeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scrape/google-maps/reviews":{"post":{"tags":["scrape:google-maps"],"summary":"Google Maps reviews. Returns up to ~10,000 unique reviews, deduplicated and sorted newest-first. Practical per-place ceiling lands around ~10K on places with >20K total reviews. Auto-downgrades to 40c when 50 or fewer reviews are returned. For pulls above ~700 reviews, use the /async endpoint.","operationId":"post_google_maps_reviews_v1_scrape_google_maps_reviews_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapsReviewsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapsReviewsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scrape/google-maps/reviews/async":{"post":{"tags":["scrape:google-maps"],"summary":"Submit a Maps reviews scrape for background processing. Returns immediately with run_id; poll /v1/scrape/runs/{run_id} for the result. Use this when max_reviews > 700 (the synchronous request can exceed the request time limit).","operationId":"post_google_maps_reviews_async_v1_scrape_google_maps_reviews_async_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapsReviewsRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeRunCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scrape/gas-prices":{"post":{"tags":["scrape:gas-prices"],"summary":"Live US gas prices by ZIP or City, ST. Parsed JSON, all fuel grades. 10 credits flat.","operationId":"post_gas_prices_v1_scrape_gas_prices_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GasPricesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GasPricesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scrape/runs/{run_id}":{"get":{"tags":["scrape:runs"],"summary":"Poll an async scrape run by id.","description":"Returns the current status of a run created via /v1/scrape/*/async endpoints. When status='completed', the `result` field contains the response body in the same shape as the synchronous endpoint.","operationId":"get_scrape_run_v1_scrape_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeRunStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"tags":["scrape:runs"],"summary":"Poll an async scrape run by id.","description":"Returns the current status of a run created via /v1/scrape/*/async endpoints. When status='completed', the `result` field contains the response body in the same shape as the synchronous endpoint.","operationId":"get_scrape_run_v1_scrape_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeRunStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scrape/runs/{run_id}/cancel":{"post":{"tags":["scrape:runs"],"summary":"Cancel a queued or running async scrape run.","description":"Flips a queued or running run to status='cancelled'. The background worker stops on its next checkpoint (cooperative cancellation). Already-completed and already-failed runs are returned as-is without modification. No credits are refunded for work already performed; cancellation is best-effort.","operationId":"cancel_scrape_run_v1_scrape_runs__run_id__cancel_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeRunStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scrape/screenshot":{"post":{"tags":["scrape"],"summary":"Capture a PNG or JPEG screenshot of any URL","operationId":"post_screenshot_v1_scrape_screenshot_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenshotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scrape/pdf":{"post":{"tags":["scrape"],"summary":"Render any URL as a PDF","operationId":"post_pdf_v1_scrape_pdf_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audio/transcript":{"post":{"tags":["audio"],"summary":"Timestamped transcript of any audio URL (podcasts, YouTube, X Spaces, SoundCloud, direct MP3)","operationId":"post_audio_transcript_v1_audio_transcript_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioTranscriptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioTranscriptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audio/transcript/async":{"post":{"tags":["audio"],"summary":"Submit an audio transcript job for background processing. Returns 202 with run_id; poll /v1/scrape/runs/{run_id} for the result. Use this for any source likely to exceed the 100s edge timeout: long YouTube videos, full podcast episodes, or any media that needs an audio download. Same request shape and pricing as the sync endpoint.","operationId":"post_audio_transcript_async_v1_audio_transcript_async_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioTranscriptRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeRunCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"post":{"tags":["search"],"summary":"AI-friendly multi-engine web search","operationId":"post_search_v1_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search/deep":{"post":{"tags":["search"],"summary":"Search and fetch full content from the top N results in one call","operationId":"post_search_deep_v1_search_deep_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeepSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeepSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search/answer":{"post":{"tags":["search"],"summary":"RAG-style: search + fetch + AI-summarized answer with citations","operationId":"post_search_answer_v1_search_answer_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/translate":{"post":{"tags":["search"],"summary":"Translate text between languages","operationId":"post_translate_v1_translate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AnswerRequest":{"properties":{"query":{"type":"string","maxLength":400,"minLength":1,"title":"Query"},"num_results":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Num Results","default":10},"language":{"type":"string","maxLength":8,"minLength":2,"pattern":"^[A-Za-z]{2,3}(?:[-_][A-Za-z0-9]{2,8})?$","title":"Language","description":"IETF BCP 47 language tag (e.g. 'en', 'pt-BR', 'zh-Hans').","default":"en"},"time_range":{"anyOf":[{"type":"string","enum":["day","week","month","year"]},{"type":"null"}],"title":"Time Range"},"categories":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Categories"},"cache_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":0.0},{"type":"null"}],"title":"Cache Ttl Seconds"},"include_domains":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":15},{"type":"null"}],"title":"Include Domains","description":"Only return results from these domains (e.g. ['nytimes.com', 'bbc.co.uk']). Max 15; Google/Bing reject queries with more `site:` clauses than that."},"exclude_domains":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":15},{"type":"null"}],"title":"Exclude Domains","description":"Filter out results from these domains. Max 15."},"topic":{"anyOf":[{"type":"string","const":"news"},{"type":"null"}],"title":"Topic","description":"Topic preset. 'news' routes to the news vertical (dated, current articles). When omitted, news intent is auto-detected from the query (e.g. 'why are chip stocks selling off today') and news results are blended in ahead of general web results; pass an explicit `engines` list or `categories` to disable auto-routing."},"engines":{"anyOf":[{"items":{"type":"string","enum":["google","duckduckgo","bing","bing news","duckduckgo news"]},"type":"array","maxItems":5,"minItems":1},{"type":"null"}],"title":"Engines","description":"Pick which engines to query. Default is a curated mix tuned to the request (Bing is the most reliable scraper-friendly engine; DuckDuckGo carries `site:` filters; Bing+Google+DuckDuckGo together for higher num_results; 'bing news'/'duckduckgo news' query the news vertical directly). Omit (or set to null) to use the default. An empty list ([]) is rejected; pass `null` if you want defaults."},"depth":{"type":"string","enum":["fast","balanced","thorough","stealth"],"title":"Depth","description":"Speed/coverage tier. On /v1/search every depth queries the same engine mix; 'thorough' and 'stealth' additionally wait for the freshest engine data on a cold query (the first search of a topic can take a few extra seconds; repeat searches are cached and fast). On /v1/search/deep it sets how hard page fetches try: 'fast' (~2.5s/page) and 'balanced' (~3.5s/page, default) fetch every page directly with no anti-bot escalation — blocked pages fall back to their SERP snippet; 'thorough' (~6s/page) and 'stealth' (~12s/page) escalate blocked pages through a real-browser bypass; 'stealth' has the highest coverage on heavily-protected targets. Easy pages still return in a couple seconds; the budget only applies to pages needing the bypass.","default":"balanced"},"page":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Page","description":"Result page (1-based). page=2 returns the next batch of SERP results.","default":1},"country":{"anyOf":[{"type":"string","maxLength":4,"pattern":"^[a-zA-Z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 country code (e.g. 'us', 'de', 'jp') to bias results toward that region."},"start_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Start Date","description":"Only return results published on or after this date (YYYY-MM-DD)."},"end_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"End Date","description":"Only return results published on or before this date (YYYY-MM-DD)."},"include_images":{"type":"boolean","title":"Include Images","description":"If true, also return a list of image results in an `images` field.","default":false},"include_image_descriptions":{"type":"boolean","title":"Include Image Descriptions","description":"If true and include_images is true, include alt-text/captions when available.","default":false},"image_sources":{"anyOf":[{"items":{"type":"string","enum":["bing","brave"]},"type":"array","maxItems":2},{"type":"null"}],"title":"Image Sources","description":"Which image sources to query when include_images=true. Defaults to ['bing'] (fast, 5 credits). Adding 'brave' fetches a second wider catalogue rendered in a real browser (~8s extra, +40 credits). Order doesn't matter; results are merged."},"include_usage":{"type":"boolean","title":"Include Usage","description":"If true, include a `usage` block in the response with credit totals.","default":false},"max_sources":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Sources","default":5},"render":{"type":"string","enum":["auto","direct","browser"],"title":"Render","default":"auto"}},"type":"object","required":["query"],"title":"AnswerRequest"},"AnswerResponse":{"properties":{"query":{"type":"string","title":"Query"},"answer":{"type":"string","title":"Answer"},"citations":{"items":{"$ref":"#/components/schemas/CitationModel"},"type":"array","title":"Citations"},"took_ms":{"type":"integer","title":"Took Ms"},"cache_hit":{"type":"boolean","title":"Cache Hit"},"credits_charged":{"type":"integer","title":"Credits Charged"},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["query","answer","citations","took_ms","cache_hit","credits_charged"],"title":"AnswerResponse"},"AudioTranscriptRequest":{"properties":{"url":{"type":"string","minLength":10,"title":"Url","description":"URL of the audio source. Supported: podcast episodes (Apple Podcasts, Overcast, RSS), YouTube videos (captions when available, otherwise audio transcription), X (Twitter) Spaces, SoundCloud, Facebook video posts, TikTok, and direct MP3/M4A/WAV/OGG links."},"cache_ttl_seconds":{"anyOf":[{"type":"integer","maximum":2592000.0,"minimum":0.0},{"type":"null"}],"title":"Cache Ttl Seconds"},"language":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Language","description":"Optional ISO 639-1 language hint for the transcription model (e.g. en, es, ja)."},"cookies":{"anyOf":[{"type":"string","maxLength":131072},{"type":"null"}],"title":"Cookies","description":"Optional Netscape-format cookies.txt content (the literal file contents, including the '# Netscape HTTP Cookie File' header). Only applies to YouTube URLs and is only consulted when captions are unavailable and the audio resolver falls back to audio download. Cookies are written to a request-scoped tempfile, used once, deleted before the response is returned, and never logged or cached. Send cookies from a burner Google account (not your personal one) since the account will be associated with every transcript request that uses these cookies."},"include_usage":{"type":"boolean","title":"Include Usage","description":"If true, include a `usage` block in the response with credit totals.","default":false}},"type":"object","required":["url"],"title":"AudioTranscriptRequest"},"AudioTranscriptResponse":{"properties":{"url":{"type":"string","title":"Url"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"canonical_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel","description":"Channel, show, uploader, or creator name when available."},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"source":{"type":"string","title":"Source","description":"Source the audio came from (e.g. 'youtube', 'apple_podcasts', 'spotify', 'soundcloud', 'url')."},"chunks":{"anyOf":[{"items":{"$ref":"#/components/schemas/TranscriptChunk"},"type":"array"},{"type":"null"}],"title":"Chunks"},"text":{"type":"string","title":"Text"},"took_ms":{"type":"integer","title":"Took Ms"},"cache_hit":{"type":"boolean","title":"Cache Hit","default":false},"credits_charged":{"type":"integer","title":"Credits Charged","default":0},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]}},"type":"object","required":["url","audio_url","title","duration_seconds","language","source","text","took_ms"],"title":"AudioTranscriptResponse"},"BatchScrapeItem":{"properties":{"url":{"type":"string","title":"Url"},"final_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Url"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"proxy_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy Used"},"elapsed_ms":{"type":"integer","title":"Elapsed Ms","default":0},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html"},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown"},"structured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structured"},"ok":{"type":"boolean","title":"Ok","description":"Deprecated alias for `success`.","default":false},"credits_charged":{"type":"integer","title":"Credits Charged","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"success":{"type":"boolean","title":"Success","readOnly":true}},"type":"object","required":["url","success"],"title":"BatchScrapeItem"},"BatchScrapeRequest":{"properties":{"urls":{"items":{"type":"string","minLength":1,"format":"uri"},"type":"array","maxItems":10,"minItems":1,"title":"Urls","description":"1–10 absolute http(s) URLs. Each is fetched independently and concurrently; one URL failing never fails the rest. The render options below apply to every URL."},"render":{"type":"string","enum":["auto","direct","browser","stealth"],"title":"Render","description":"Render mode applied to every URL. Same semantics as /v1/scrape/url.","default":"auto"},"force_proxy":{"type":"boolean","title":"Force Proxy","description":"Force every fetch through a higher-tier proxy.","default":false},"block_assets":{"type":"boolean","title":"Block Assets","description":"On browser renders, block images / fonts / media to save bandwidth.","default":true},"extract":{"type":"boolean","title":"Extract","description":"Run readability-style extraction to return cleaned title / description / text per URL.","default":true},"return_markdown":{"type":"boolean","title":"Return Markdown","description":"Add a `markdown` field per URL. Implies include_html. No extra credits.","default":false},"include_html":{"type":"boolean","title":"Include Html","description":"Include the raw `html` per URL alongside the cleaned text. No extra credits.","default":false},"block_ads":{"type":"boolean","title":"Block Ads","description":"On browser renders, block known ad / tracker domains.","default":false},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-zA-Z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 code. Routes every fetch through a residential proxy in that country (e.g. `us`, `de`, `jp`). Forces a higher-tier proxy."},"include_usage":{"type":"boolean","title":"Include Usage","description":"If true, include a usage block with the total credits and breakdown.","default":false}},"type":"object","required":["urls"],"title":"BatchScrapeRequest"},"BatchScrapeResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/BatchScrapeItem"},"type":"array","title":"Results"},"requested":{"type":"integer","title":"Requested"},"succeeded":{"type":"integer","title":"Succeeded"},"credits_charged":{"type":"integer","title":"Credits Charged"},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]}},"type":"object","required":["results","requested","succeeded","credits_charged"],"title":"BatchScrapeResponse"},"CitationModel":{"properties":{"index":{"type":"integer","title":"Index"},"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"},"snippet":{"type":"string","title":"Snippet"}},"type":"object","required":["index","url","title","snippet"],"title":"CitationModel"},"DeepSearchPageModel":{"properties":{"url":{"type":"string","title":"Url"},"final_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Url"},"status":{"type":"integer","title":"Status","default":0},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"elapsed_ms":{"type":"integer","title":"Elapsed Ms","default":0},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"structured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structured"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"DeepSearchPageModel"},"DeepSearchRequest":{"properties":{"query":{"type":"string","maxLength":400,"minLength":1,"title":"Query"},"num_results":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Num Results","default":10},"language":{"type":"string","maxLength":8,"minLength":2,"pattern":"^[A-Za-z]{2,3}(?:[-_][A-Za-z0-9]{2,8})?$","title":"Language","description":"IETF BCP 47 language tag (e.g. 'en', 'pt-BR', 'zh-Hans').","default":"en"},"time_range":{"anyOf":[{"type":"string","enum":["day","week","month","year"]},{"type":"null"}],"title":"Time Range"},"categories":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Categories"},"cache_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":0.0},{"type":"null"}],"title":"Cache Ttl Seconds"},"include_domains":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":15},{"type":"null"}],"title":"Include Domains","description":"Only return results from these domains (e.g. ['nytimes.com', 'bbc.co.uk']). Max 15; Google/Bing reject queries with more `site:` clauses than that."},"exclude_domains":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":15},{"type":"null"}],"title":"Exclude Domains","description":"Filter out results from these domains. Max 15."},"topic":{"anyOf":[{"type":"string","const":"news"},{"type":"null"}],"title":"Topic","description":"Topic preset. 'news' routes to the news vertical (dated, current articles). When omitted, news intent is auto-detected from the query (e.g. 'why are chip stocks selling off today') and news results are blended in ahead of general web results; pass an explicit `engines` list or `categories` to disable auto-routing."},"engines":{"anyOf":[{"items":{"type":"string","enum":["google","duckduckgo","bing","bing news","duckduckgo news"]},"type":"array","maxItems":5,"minItems":1},{"type":"null"}],"title":"Engines","description":"Pick which engines to query. Default is a curated mix tuned to the request (Bing is the most reliable scraper-friendly engine; DuckDuckGo carries `site:` filters; Bing+Google+DuckDuckGo together for higher num_results; 'bing news'/'duckduckgo news' query the news vertical directly). Omit (or set to null) to use the default. An empty list ([]) is rejected; pass `null` if you want defaults."},"depth":{"type":"string","enum":["fast","balanced","thorough","stealth"],"title":"Depth","description":"Speed/coverage tier. On /v1/search every depth queries the same engine mix; 'thorough' and 'stealth' additionally wait for the freshest engine data on a cold query (the first search of a topic can take a few extra seconds; repeat searches are cached and fast). On /v1/search/deep it sets how hard page fetches try: 'fast' (~2.5s/page) and 'balanced' (~3.5s/page, default) fetch every page directly with no anti-bot escalation — blocked pages fall back to their SERP snippet; 'thorough' (~6s/page) and 'stealth' (~12s/page) escalate blocked pages through a real-browser bypass; 'stealth' has the highest coverage on heavily-protected targets. Easy pages still return in a couple seconds; the budget only applies to pages needing the bypass.","default":"balanced"},"page":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Page","description":"Result page (1-based). page=2 returns the next batch of SERP results.","default":1},"country":{"anyOf":[{"type":"string","maxLength":4,"pattern":"^[a-zA-Z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 country code (e.g. 'us', 'de', 'jp') to bias results toward that region."},"start_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Start Date","description":"Only return results published on or after this date (YYYY-MM-DD)."},"end_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"End Date","description":"Only return results published on or before this date (YYYY-MM-DD)."},"include_images":{"type":"boolean","title":"Include Images","description":"If true, also return a list of image results in an `images` field.","default":false},"include_image_descriptions":{"type":"boolean","title":"Include Image Descriptions","description":"If true and include_images is true, include alt-text/captions when available.","default":false},"image_sources":{"anyOf":[{"items":{"type":"string","enum":["bing","brave"]},"type":"array","maxItems":2},{"type":"null"}],"title":"Image Sources","description":"Which image sources to query when include_images=true. Defaults to ['bing'] (fast, 5 credits). Adding 'brave' fetches a second wider catalogue rendered in a real browser (~8s extra, +40 credits). Order doesn't matter; results are merged."},"include_usage":{"type":"boolean","title":"Include Usage","description":"If true, include a `usage` block in the response with credit totals.","default":false},"fetch_top":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Fetch Top","default":5},"render":{"type":"string","enum":["auto","direct","browser"],"title":"Render","default":"auto"}},"type":"object","required":["query"],"title":"DeepSearchRequest"},"DeepSearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"results":{"items":{"$ref":"#/components/schemas/SearchResultModel"},"type":"array","title":"Results"},"pages":{"items":{"$ref":"#/components/schemas/DeepSearchPageModel"},"type":"array","title":"Pages"},"images":{"anyOf":[{"items":{"$ref":"#/components/schemas/ImageResultModel"},"type":"array"},{"type":"null"}],"title":"Images"},"took_ms":{"type":"integer","title":"Took Ms"},"fetched_count":{"type":"integer","title":"Fetched Count"},"cache_hit":{"type":"boolean","title":"Cache Hit"},"credits_charged":{"type":"integer","title":"Credits Charged"},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["query","results","pages","took_ms","fetched_count","cache_hit","credits_charged"],"title":"DeepSearchResponse"},"GasPricesRequest":{"properties":{"location":{"type":"string","maxLength":200,"minLength":2,"title":"Location","description":"Search anchor. Accepts a 5-digit US ZIP (`63011`, `63011-1234`), `City, ST` (`Ballwin, MO`), or `City, State` (`Saint Louis, Missouri`). Ambiguous strings may return stations from the nearest match."},"grade":{"type":"string","enum":["regular","midgrade","premium","diesel","e85"],"title":"Grade","description":"Fuel grade: regular, midgrade, premium, diesel, or E85.","default":"regular"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","description":"Hard cap on returned stations (listings typically surface ~13 by default).","default":20},"cache_ttl_seconds":{"anyOf":[{"type":"integer","maximum":3600.0,"minimum":0.0},{"type":"null"}],"title":"Cache Ttl Seconds","description":"Override the cache TTL (max 1 hour, prices change slowly)."},"include_usage":{"type":"boolean","title":"Include Usage","description":"If true, include a `usage` block in the response with credit totals.","default":false}},"type":"object","required":["location"],"title":"GasPricesRequest"},"GasPricesResponse":{"properties":{"location":{"$ref":"#/components/schemas/ResolvedLocation"},"grade":{"type":"string","enum":["regular","midgrade","premium","diesel","e85"],"title":"Grade"},"stations":{"items":{"$ref":"#/components/schemas/GasStation"},"type":"array","title":"Stations"},"region_stats":{"anyOf":[{"$ref":"#/components/schemas/RegionStats"},{"type":"null"}]},"source_url":{"type":"string","title":"Source Url"},"fetched_at":{"type":"string","title":"Fetched At"},"took_ms":{"type":"integer","title":"Took Ms","default":0},"cache_hit":{"type":"boolean","title":"Cache Hit","default":false},"credits_charged":{"type":"integer","title":"Credits Charged","default":0},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Set when the listing returned stations but no per-station prices, when an ambiguous location was auto-resolved to an unexpected region, or when other caveats apply that the caller should surface."}},"type":"object","required":["location","grade","stations","source_url","fetched_at"],"title":"GasPricesResponse"},"GasStation":{"properties":{"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"sub_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Brand"},"station_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Station Id"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"currency":{"type":"string","title":"Currency","default":"USD"},"unit":{"type":"string","title":"Unit","default":"USD/gallon"},"reporter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporter"},"updated_relative":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated Relative"}},"type":"object","title":"GasStation"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageResultModel":{"properties":{"url":{"type":"string","title":"Url","description":"Image source URL."},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Alt text or caption when available."},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url","description":"Page that hosts the image."},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"}},"type":"object","required":["url"],"title":"ImageResultModel"},"MapsReview":{"properties":{"review_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Id"},"review_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Url"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"},"author_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Id"},"author_profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Profile Url"},"author_avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Avatar Url"},"rating":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rating"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"relative_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relative Time"},"posted_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Posted At"},"posted_at_iso":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posted At Iso"},"helpful_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Helpful Count"},"photos":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Photos"},"owner_reply":{"anyOf":[{"$ref":"#/components/schemas/OwnerReply"},{"type":"null"}]}},"type":"object","required":["author_name","rating","text"],"title":"MapsReview"},"MapsReviewsRequest":{"properties":{"place_id":{"type":"string","maxLength":2000,"minLength":10,"title":"Place Id","description":"Accepts a full Google Maps URL of the place or a `0x...:0x...` hex FID. URLs are parsed server-side to pull out the identifier."},"place_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Place Url","description":"Optional canonical Google Maps URL for the place. When provided, this URL is used directly to load the place page (skipping FID-based URL construction). Required when the FID stored at Google has been rotated and the legacy short URL would redirect to a generic location."},"language":{"type":"string","maxLength":8,"minLength":2,"pattern":"^[A-Za-z]{2,3}(?:[-_][A-Za-z0-9]{2,8})?$","title":"Language","description":"IETF BCP 47 language tag (e.g. 'en', 'pt-BR', 'zh-Hans'). Affects the place name/address language only; review text is whatever the reviewer wrote.","default":"en"},"sort":{"type":"string","enum":["newest","most_relevant","highest_rating","lowest_rating"],"title":"Sort","description":"Accepted values: newest, most_relevant, highest_rating, lowest_rating. Reviews are returned newest-first regardless of this value. Kept for backward compatibility.","default":"newest"},"max_reviews":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Max Reviews","description":"Hard cap on returned reviews (1-10,000). Returns up to ~10,000 unique reviews, newest-first. On places with >20K total reviews the practical ceiling per request lands around 10,000 unique. Pulls above ~700 should go through the async endpoint.","default":200},"cache_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":0.0},{"type":"null"}],"title":"Cache Ttl Seconds"},"include_usage":{"type":"boolean","title":"Include Usage","description":"If true, include a `usage` block in the response with credit totals.","default":false}},"type":"object","required":["place_id"],"title":"MapsReviewsRequest"},"MapsReviewsResponse":{"properties":{"place_id":{"type":"string","title":"Place Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"review_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Review Count"},"google_maps_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Maps Url"},"reviews":{"items":{"$ref":"#/components/schemas/MapsReview"},"type":"array","title":"Reviews"},"star_histogram":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Star Histogram","description":"Star-count distribution [1★, 2★, 3★, 4★, 5★] when available from the listing endpoint."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"took_ms":{"type":"integer","title":"Took Ms"},"cache_hit":{"type":"boolean","title":"Cache Hit","default":false},"credits_charged":{"type":"integer","title":"Credits Charged","default":0},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]}},"type":"object","required":["place_id","name","address","rating","review_count","google_maps_url","reviews","took_ms"],"title":"MapsReviewsResponse"},"MeResponse":{"properties":{"prefix":{"type":"string","title":"Prefix","description":"Public prefix of the key (the only displayable portion)."},"label":{"type":"string","title":"Label","description":"User-provided label for this key."},"is_active":{"type":"boolean","title":"Is Active"},"is_internal":{"type":"boolean","title":"Is Internal","description":"True when the key is provisioned for an internal first-party service. Internal keys bypass credit metering and rate limits but still log usage. Customer keys always return false.","default":false},"rate_limit_per_minute":{"type":"integer","title":"Rate Limit Per Minute"},"rate_limit_per_day":{"type":"integer","title":"Rate Limit Per Day"},"credit_balance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Balance","description":"Current credit balance for the customer that owns this key. Null for internal keys, which bypass credit metering."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["prefix","label","is_active","rate_limit_per_minute","rate_limit_per_day","created_at"],"title":"MeResponse"},"OwnerReply":{"properties":{"text":{"type":"string","title":"Text"},"posted_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Posted At"},"posted_at_iso":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posted At Iso"}},"type":"object","required":["text"],"title":"OwnerReply"},"PdfRequest":{"properties":{"url":{"type":"string","minLength":1,"format":"uri","title":"Url","description":"Absolute http(s) URL to render as PDF."},"format":{"type":"string","enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"title":"Format","description":"Paper size.","default":"Letter"},"landscape":{"type":"boolean","title":"Landscape","description":"Render in landscape orientation.","default":false},"viewport_width":{"type":"integer","maximum":3840.0,"minimum":320.0,"title":"Viewport Width","default":1280},"viewport_height":{"type":"integer","maximum":2160.0,"minimum":240.0,"title":"Viewport Height","default":720},"wait_extra_ms":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Wait Extra Ms","default":0},"cache_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":0.0},{"type":"null"}],"title":"Cache Ttl Seconds"},"cookies":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","maxProperties":50},{"type":"null"}],"title":"Cookies"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","maxProperties":30},{"type":"null"}],"title":"Headers"},"session_id":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9_.\\-]+$"},{"type":"null"}],"title":"Session Id","description":"Reuse a sticky exit IP across requests (see /v1/scrape/url)."},"include_usage":{"type":"boolean","title":"Include Usage","default":false}},"type":"object","required":["url"],"title":"PdfRequest"},"PdfResponse":{"properties":{"url":{"type":"string","title":"Url"},"final_url":{"type":"string","title":"Final Url"},"status_code":{"type":"integer","title":"Status Code"},"proxy_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy Used"},"elapsed_ms":{"type":"integer","title":"Elapsed Ms"},"format":{"type":"string","title":"Format"},"landscape":{"type":"boolean","title":"Landscape","description":"Echoes back whether the PDF was rendered in landscape orientation.","default":false},"bytes":{"type":"integer","title":"Bytes"},"pdf_base64":{"type":"string","title":"Pdf Base64","description":"Base64-encoded PDF bytes."},"cache_hit":{"type":"boolean","title":"Cache Hit","default":false},"credits_charged":{"type":"integer","title":"Credits Charged","default":0},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]}},"type":"object","required":["url","final_url","status_code","proxy_used","elapsed_ms","format","bytes","pdf_base64"],"title":"PdfResponse"},"RegionStats":{"properties":{"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"USPS two-letter state code when the heading is a US state (e.g. 'IL'). Null when the heading is a city; see `region` for the verbatim heading."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"Verbatim heading text from the source listing. For state-level stats this is the full state name (e.g. 'Illinois'); for city-level stats this is the city (e.g. 'Chicago')."},"region_type":{"anyOf":[{"type":"string","enum":["state","city"]},{"type":"null"}],"title":"Region Type","description":"Whether `region` names a state or a city."},"lowest_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lowest Price"},"average_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Price"}},"type":"object","title":"RegionStats"},"ResolvedLocation":{"properties":{"query":{"type":"string","title":"Query"},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},"type":"object","required":["query"],"title":"ResolvedLocation"},"ScrapeRunCreatedResponse":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Unique identifier for this async run. Poll its status at status_url."},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"],"title":"Status"},"status_url":{"type":"string","title":"Status Url","description":"Absolute path to GET for status + result."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["run_id","status","status_url","created_at","expires_at"],"title":"ScrapeRunCreatedResponse"},"ScrapeRunStatusResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"endpoint":{"type":"string","title":"Endpoint"},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"credits_charged":{"type":"integer","title":"Credits Charged","default":0},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"progress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Progress","description":"Best-effort progress signal for long-running jobs. Currently populated by Maps reviews scrapers as `{\"current\": int, \"target\": int, \"detail\": str}`. Null for endpoints that don't emit progress, or before the first progress event is written."},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result","description":"Response body (same shape as the synchronous endpoint). Populated once status='completed'."}},"type":"object","required":["run_id","endpoint","status","created_at","expires_at"],"title":"ScrapeRunStatusResponse"},"ScrapeUrlRequest":{"properties":{"url":{"type":"string","minLength":1,"format":"uri","title":"Url","description":"Absolute http(s) URL to fetch."},"render":{"type":"string","enum":["auto","direct","browser","stealth"],"title":"Render","description":"How to render: 'direct' = plain HTTP (cheapest; a hard tier pin — if the target blocks it you receive the block as-is, never an escalated retry or stealth charge), 'browser' = headless browser, 'stealth' = anti-bot evasion mode for hardened targets (slower, premium credits), 'auto' = pick automatically based on the target.","default":"auto"},"force_proxy":{"type":"boolean","title":"Force Proxy","description":"Force the fetch through a higher-tier proxy even if a direct fetch would have worked.","default":false},"auto_escalate":{"type":"boolean","title":"Auto Escalate","description":"Applies to render='auto' and render='browser': when the fetch is refused by the target's anti-bot, automatically retry once in stealth mode. You are only charged the stealth rate if that retry succeeds; a request that stays blocked is free. Set false to receive the block as-is. render='direct' never escalates, and render='stealth' already is the escalation tier.","default":true},"timeout_seconds":{"anyOf":[{"type":"number","maximum":120.0,"minimum":5.0},{"type":"null"}],"title":"Timeout Seconds","description":"Hard time budget for the whole request, including any auto-escalation retry. Lower it (e.g. 20) to fail fast on hard targets; raise it for slow stealth solves. On timeout the response has success=false and error_code='timeout'. Defaults to ~100s."},"block_assets":{"type":"boolean","title":"Block Assets","description":"When rendering with a browser, block images / fonts / media to save bandwidth.","default":true},"extract":{"type":"boolean","title":"Extract","description":"Run readability-style extraction to return cleaned title / description / text / JSON-LD.","default":true},"cache_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":0.0},{"type":"null"}],"title":"Cache Ttl Seconds","description":"Override the default cache TTL for this request."},"ai_query":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Ai Query","description":"Natural-language extraction prompt. Example: 'Return the product name, price, and rating'. When set, response includes an ai_extract field with the AI's answer. Adds premium credits."},"ai_extract_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Extract Schema","description":"JSON Schema constraining the ai_extract output to a typed object. When set with ai_query, the response's ai_extract field is validated against this schema. Max 10 KB serialized."},"include_usage":{"type":"boolean","title":"Include Usage","description":"If true, include a usage block in the response with credit totals and breakdown.","default":false},"include_html":{"type":"boolean","title":"Include Html","description":"If true, the response includes a raw `html` field with the page source as received from the target (before extraction). Useful when you want both clean text and the raw markup in one call. No extra credits.","default":false},"return_markdown":{"type":"boolean","title":"Return Markdown","description":"If true, the response includes a `markdown` field with the page content converted to Markdown. Implies include_html. No extra credits.","default":false},"extract_rules":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object"},{"type":"null"}],"title":"Extract Rules","description":"Map of field name -> CSS selector for in-response extraction. Each value can be a CSS selector string (returns first match's text) or an object `{\"selector\": \"...\", \"attr\": \"href\", \"all\": true}` for finer control. Result is returned in the `extracted` field. Implies include_html. Max 50 rules. No extra credits."},"wait_ms":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Wait Ms","description":"Extra wait, in milliseconds, after the page finishes loading and before we read the DOM. Useful for late-loading content. Only applies when the page is rendered with a browser."},"wait_for_selector":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Wait For Selector","description":"CSS selector to wait for before returning. The fetch blocks until this element appears or `wait_for_timeout_ms` elapses. Only applies when the page is rendered with a browser."},"wait_for_timeout_ms":{"type":"integer","maximum":30000.0,"minimum":100.0,"title":"Wait For Timeout Ms","description":"Max ms to wait for `wait_for_selector`. Default 5000.","default":5000},"window_width":{"anyOf":[{"type":"integer","maximum":3840.0,"minimum":320.0},{"type":"null"}],"title":"Window Width","description":"Browser viewport width in pixels (default 1280). Only applies when the page is rendered with a browser."},"window_height":{"anyOf":[{"type":"integer","maximum":2160.0,"minimum":240.0},{"type":"null"}],"title":"Window Height","description":"Browser viewport height in pixels (default 720). Only applies when the page is rendered with a browser."},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-zA-Z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 country code. Routes the fetch through a residential proxy in that country (e.g. `us`, `de`, `jp`). Forces a higher-tier proxy."},"device":{"type":"string","enum":["desktop","mobile"],"title":"Device","description":"Device profile. `mobile` sets a mobile User-Agent and a 390x844 viewport (iPhone-like); `desktop` is the default. Only matters when the page is rendered with a browser.","default":"desktop"},"block_ads":{"type":"boolean","title":"Block Ads","description":"Block known ad and tracker domains during the fetch (doubleclick, google-analytics, googletagmanager, criteo, taboola, etc.). Speeds up rendering on ad-heavy sites. Only applies when the page is rendered with a browser.","default":false},"simulate_behavior":{"type":"boolean","title":"Simulate Behavior","description":"Sprinkle mouse-move + scroll motion before extraction to fool behavioral bot detectors (PerimeterX, DataDome, Akamai BMP). Adds ~200-600ms. Browser path only.","default":false},"session_id":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9_.\\-]+$"},{"type":"null"}],"title":"Session Id","description":"Opaque sticky-session id. Repeated requests with the same id reuse the same residential exit IP for ~10 minutes. Forces a higher-tier proxy. Use for login flows or cart sessions."},"cookies":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","maxProperties":50},{"type":"null"}],"title":"Cookies","description":"Cookies (name -> value) injected into the request before navigation."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","maxProperties":30},{"type":"null"}],"title":"Headers","description":"Extra request headers (name -> value). Use to set User-Agent, Referer, or any custom header. Host, Content-Length, Connection, Transfer-Encoding are stripped."}},"type":"object","required":["url"],"title":"ScrapeUrlRequest"},"ScrapeUrlResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"True only when the page was fetched and returned usable content. False for anti-bot blocks, empty pages, and target 4xx/5xx — in which case `error_code` is populated and the content fields are null. Always check this before reading `text`/`html`; a 200 HTTP status alone does not mean success."},"url":{"type":"string","title":"Url"},"final_url":{"type":"string","title":"Final Url"},"status_code":{"type":"integer","title":"Status Code"},"method":{"type":"string","title":"Method"},"proxy_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy Used"},"elapsed_ms":{"type":"integer","title":"Elapsed Ms"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html","description":"Raw HTML of the page. Populated only when include_html=true was set in the request."},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown","description":"Markdown rendering of the page. Populated only when return_markdown=true was set."},"extracted":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extracted","description":"Map of field name -> extracted value, mirroring the keys in extract_rules."},"structured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structured"},"ai_extract":{"anyOf":[{},{"type":"null"}],"title":"Ai Extract","description":"Structured or natural-language extraction output. Populated when ai_query was set."},"ai_extract_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Extract Error"},"cache_hit":{"type":"boolean","title":"Cache Hit"},"escalated":{"type":"boolean","title":"Escalated","description":"True when the original render tier was refused by anti-bot and the request was automatically retried in stealth mode. When true, `credits_charged` reflects the stealth rate. Disable with auto_escalate=false.","default":false},"credits_charged":{"type":"integer","title":"Credits Charged"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable machine-readable failure category, present whenever success=false. One of: 'anti_bot_block' (target's anti-bot refused — retry with render='stealth'), 'empty_response' (page had no usable content), 'not_found' (target returned 404/410), 'timeout' (fetch exceeded the time budget), 'upstream_failed' (fetch infrastructure error)."},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]}},"type":"object","required":["success","url","final_url","status_code","method","proxy_used","elapsed_ms","cache_hit","credits_charged"],"title":"ScrapeUrlResponse"},"ScreenshotRequest":{"properties":{"url":{"type":"string","minLength":1,"format":"uri","title":"Url","description":"Absolute http(s) URL to capture."},"viewport_width":{"type":"integer","maximum":3840.0,"minimum":320.0,"title":"Viewport Width","description":"Browser viewport width in CSS pixels.","default":1280},"viewport_height":{"type":"integer","maximum":2160.0,"minimum":240.0,"title":"Viewport Height","description":"Browser viewport height in CSS pixels.","default":720},"full_page":{"type":"boolean","title":"Full Page","description":"If true, captures the entire scrollable page height instead of just the viewport.","default":false},"selector":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Selector","description":"CSS selector. When set, captures only the bounding box of the first matching element (e.g. '#hero', '.product-card:first-child'). Overrides full_page. If the selector doesn't match, the capture falls back to the full viewport; returns 422 selector_not_found only when nothing can be rendered."},"render":{"type":"string","enum":["auto","browser","stealth"],"title":"Render","description":"`auto` lets the platform pick the right backend. `browser` forces the standard headless browser. `stealth` forces the anti-bot evasion backend for hardened targets (slower, billed at the stealth rate).","default":"auto"},"format":{"type":"string","enum":["png","jpeg"],"title":"Format","description":"Image encoding.","default":"png"},"jpeg_quality":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Jpeg Quality","description":"JPEG quality 1-100; ignored when format=png.","default":85},"wait_extra_ms":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Wait Extra Ms","description":"Additional wait after page load before capture, for late-loading content (e.g. SPAs with delayed content).","default":0},"cache_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":0.0},{"type":"null"}],"title":"Cache Ttl Seconds","description":"Override the cache TTL for this screenshot. Defaults to off; set non-zero to dedupe repeat captures."},"cookies":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","maxProperties":50},{"type":"null"}],"title":"Cookies","description":"Cookies to attach to the request, as a {name: value} mapping. Useful for screenshotting authenticated pages."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","maxProperties":30},{"type":"null"}],"title":"Headers","description":"Extra HTTP request headers to send (e.g. User-Agent, Referer). Host/Content-Length are ignored."},"session_id":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9_.\\-]+$"},{"type":"null"}],"title":"Session Id","description":"Reuse a sticky exit IP across requests (10-minute window). Useful when the target site personalizes by IP and you want the screenshot to match a previous /v1/scrape/url session."},"include_usage":{"type":"boolean","title":"Include Usage","description":"If true, include a `usage` block in the response with credit totals.","default":false}},"type":"object","required":["url"],"title":"ScreenshotRequest"},"ScreenshotResponse":{"properties":{"url":{"type":"string","title":"Url"},"final_url":{"type":"string","title":"Final Url"},"status_code":{"type":"integer","title":"Status Code"},"method":{"type":"string","enum":["browser","stealth","unknown"],"title":"Method"},"proxy_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy Used"},"elapsed_ms":{"type":"integer","title":"Elapsed Ms"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"bytes":{"type":"integer","title":"Bytes"},"format":{"type":"string","title":"Format"},"image_base64":{"type":"string","title":"Image Base64","description":"Base64-encoded image bytes."},"cache_hit":{"type":"boolean","title":"Cache Hit","default":false},"credits_charged":{"type":"integer","title":"Credits Charged","default":0},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]}},"type":"object","required":["url","final_url","status_code","method","proxy_used","elapsed_ms","width","height","bytes","format","image_base64"],"title":"ScreenshotResponse"},"SearchRequest":{"properties":{"query":{"type":"string","maxLength":400,"minLength":1,"title":"Query"},"num_results":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Num Results","default":10},"language":{"type":"string","maxLength":8,"minLength":2,"pattern":"^[A-Za-z]{2,3}(?:[-_][A-Za-z0-9]{2,8})?$","title":"Language","description":"IETF BCP 47 language tag (e.g. 'en', 'pt-BR', 'zh-Hans').","default":"en"},"time_range":{"anyOf":[{"type":"string","enum":["day","week","month","year"]},{"type":"null"}],"title":"Time Range"},"categories":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Categories"},"cache_ttl_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":0.0},{"type":"null"}],"title":"Cache Ttl Seconds"},"include_domains":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":15},{"type":"null"}],"title":"Include Domains","description":"Only return results from these domains (e.g. ['nytimes.com', 'bbc.co.uk']). Max 15; Google/Bing reject queries with more `site:` clauses than that."},"exclude_domains":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":15},{"type":"null"}],"title":"Exclude Domains","description":"Filter out results from these domains. Max 15."},"topic":{"anyOf":[{"type":"string","const":"news"},{"type":"null"}],"title":"Topic","description":"Topic preset. 'news' routes to the news vertical (dated, current articles). When omitted, news intent is auto-detected from the query (e.g. 'why are chip stocks selling off today') and news results are blended in ahead of general web results; pass an explicit `engines` list or `categories` to disable auto-routing."},"engines":{"anyOf":[{"items":{"type":"string","enum":["google","duckduckgo","bing","bing news","duckduckgo news"]},"type":"array","maxItems":5,"minItems":1},{"type":"null"}],"title":"Engines","description":"Pick which engines to query. Default is a curated mix tuned to the request (Bing is the most reliable scraper-friendly engine; DuckDuckGo carries `site:` filters; Bing+Google+DuckDuckGo together for higher num_results; 'bing news'/'duckduckgo news' query the news vertical directly). Omit (or set to null) to use the default. An empty list ([]) is rejected; pass `null` if you want defaults."},"depth":{"type":"string","enum":["fast","balanced","thorough","stealth"],"title":"Depth","description":"Speed/coverage tier. On /v1/search every depth queries the same engine mix; 'thorough' and 'stealth' additionally wait for the freshest engine data on a cold query (the first search of a topic can take a few extra seconds; repeat searches are cached and fast). On /v1/search/deep it sets how hard page fetches try: 'fast' (~2.5s/page) and 'balanced' (~3.5s/page, default) fetch every page directly with no anti-bot escalation — blocked pages fall back to their SERP snippet; 'thorough' (~6s/page) and 'stealth' (~12s/page) escalate blocked pages through a real-browser bypass; 'stealth' has the highest coverage on heavily-protected targets. Easy pages still return in a couple seconds; the budget only applies to pages needing the bypass.","default":"balanced"},"page":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Page","description":"Result page (1-based). page=2 returns the next batch of SERP results.","default":1},"country":{"anyOf":[{"type":"string","maxLength":4,"pattern":"^[a-zA-Z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 country code (e.g. 'us', 'de', 'jp') to bias results toward that region."},"start_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Start Date","description":"Only return results published on or after this date (YYYY-MM-DD)."},"end_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"End Date","description":"Only return results published on or before this date (YYYY-MM-DD)."},"include_images":{"type":"boolean","title":"Include Images","description":"If true, also return a list of image results in an `images` field.","default":false},"include_image_descriptions":{"type":"boolean","title":"Include Image Descriptions","description":"If true and include_images is true, include alt-text/captions when available.","default":false},"image_sources":{"anyOf":[{"items":{"type":"string","enum":["bing","brave"]},"type":"array","maxItems":2},{"type":"null"}],"title":"Image Sources","description":"Which image sources to query when include_images=true. Defaults to ['bing'] (fast, 5 credits). Adding 'brave' fetches a second wider catalogue rendered in a real browser (~8s extra, +40 credits). Order doesn't matter; results are merged."},"include_usage":{"type":"boolean","title":"Include Usage","description":"If true, include a `usage` block in the response with credit totals.","default":false}},"type":"object","required":["query"],"title":"SearchRequest"},"SearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"results":{"items":{"$ref":"#/components/schemas/SearchResultModel"},"type":"array","title":"Results"},"images":{"anyOf":[{"items":{"$ref":"#/components/schemas/ImageResultModel"},"type":"array"},{"type":"null"}],"title":"Images","description":"Image results when include_images=true; otherwise omitted."},"suggestions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Suggestions"},"answers":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Answers"},"infoboxes":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Infoboxes"},"took_ms":{"type":"integer","title":"Took Ms"},"cache_hit":{"type":"boolean","title":"Cache Hit"},"credits_charged":{"type":"integer","title":"Credits Charged"},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Set when the server auto-adjusted the request, e.g. swapped engines to honor a time_range that the originally-requested engine doesn't support."}},"type":"object","required":["query","results","took_ms","cache_hit","credits_charged"],"title":"SearchResponse"},"SearchResultModel":{"properties":{"position":{"type":"integer","title":"Position"},"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"},"snippet":{"type":"string","title":"Snippet"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"engines":{"items":{"type":"string"},"type":"array","title":"Engines","default":[]},"score":{"type":"number","title":"Score","default":0.0},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published At"},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"}},"type":"object","required":["position","url","title","snippet"],"title":"SearchResultModel"},"TranscriptChunk":{"properties":{"start":{"type":"number","title":"Start"},"end":{"type":"number","title":"End"},"text":{"type":"string","title":"Text"}},"type":"object","required":["start","end","text"],"title":"TranscriptChunk"},"TranslateRequest":{"properties":{"text":{"type":"string","maxLength":5000,"minLength":1,"title":"Text"},"target":{"type":"string","maxLength":8,"minLength":2,"title":"Target"},"source":{"type":"string","maxLength":8,"title":"Source","default":"auto"},"include_usage":{"type":"boolean","title":"Include Usage","default":false}},"type":"object","required":["text","target"],"title":"TranslateRequest"},"TranslateResponse":{"properties":{"translated":{"type":"string","title":"Translated"},"detected_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Source"},"target":{"type":"string","title":"Target"},"credits_charged":{"type":"integer","title":"Credits Charged"},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageBlock"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Set when the translation was adjusted server-side, e.g. auto-detection fell back to a heuristic, a fallback engine was used, or output was truncated to fit upstream limits."}},"type":"object","required":["translated","target","credits_charged"],"title":"TranslateResponse"},"UsageBlock":{"properties":{"credits":{"type":"integer","title":"Credits","description":"Total credits charged for this call."},"breakdown":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Breakdown","description":"Optional per-component breakdown (e.g. {'search': 1, 'ai_extract': 5})."}},"type":"object","required":["credits"],"title":"UsageBlock"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}