{"openapi":"3.1.0","info":{"title":"Metalift API","description":"Metalift Cloud web context API","version":"1.0.0"},"paths":{"/tos.json":{"get":{"summary":"Agent Tos","operationId":"agent_tos_tos_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ready":{"get":{"summary":"Ready","operationId":"ready_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/classify_url":{"post":{"summary":"Classify Url Endpoint","operationId":"classify_url_endpoint_v1_classify_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scrape":{"post":{"summary":"Scrape","operationId":"scrape_v1_scrape_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batch":{"post":{"summary":"Batch","operationId":"batch_v1_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/crawl":{"post":{"summary":"Crawl","operationId":"crawl_v1_crawl_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/map":{"post":{"summary":"Map Site","operationId":"map_site_v1_map_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sitemap":{"post":{"summary":"Fetch Sitemap","operationId":"fetch_sitemap_v1_sitemap_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SitemapRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"post":{"summary":"Web Search Route","operationId":"web_search_route_v1_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"required":true},"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/sessions":{"get":{"summary":"List Sessions","operationId":"list_sessions_v1_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Seed Session","operationId":"seed_session_v1_sessions_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/fetch":{"post":{"summary":"Fetch Session","description":"Automated browser session warmup — visits a seed URL and stores cookies for later scrapes.","operationId":"fetch_session_v1_sessions_fetch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{domain}":{"delete":{"summary":"Remove Session","operationId":"remove_session_v1_sessions__domain__delete","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies":{"get":{"summary":"Strategies","operationId":"strategies_v1_strategies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/protection-types":{"get":{"summary":"Protection Types","operationId":"protection_types_v1_protection_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/jobs/{job_id}":{"get":{"summary":"Get Job","operationId":"get_job_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Job","operationId":"delete_job_v1_jobs__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BatchRequest":{"properties":{"urls":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","maxItems":100,"minItems":1,"title":"Urls"},"async":{"type":"boolean","title":"Async","default":false},"scrape_options":{"$ref":"#/components/schemas/ScrapeOptions"}},"type":"object","required":["urls"],"title":"BatchRequest"},"ClassifyUrlRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"}},"type":"object","required":["url"],"title":"ClassifyUrlRequest"},"ClassifyUrlResponse":{"properties":{"url":{"type":"string","title":"Url"},"risk_score":{"type":"number","title":"Risk Score"},"risk_level":{"type":"string","title":"Risk Level"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"model_outputs":{"$ref":"#/components/schemas/ModelOutputsModel"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}]},"type":"object","title":"Metadata"}},"type":"object","required":["url","risk_score","risk_level"],"title":"ClassifyUrlResponse"},"CrawlRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","default":50},"max_depth":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Depth","default":3},"include_paths":{"items":{"type":"string"},"type":"array","title":"Include Paths"},"exclude_paths":{"items":{"type":"string"},"type":"array","title":"Exclude Paths"},"scrape_options":{"$ref":"#/components/schemas/ScrapeOptions"}},"type":"object","required":["url"],"title":"CrawlRequest"},"FetchSessionRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"Seed URL to visit for cookie collection (e.g. https://www.walmart.com/)."},"domain":{"anyOf":[{"type":"string","maxLength":253},{"type":"null"}],"title":"Domain","description":"Optional storage domain override; defaults to hostname from url."},"strategy":{"type":"string","title":"Strategy","description":"Strategy for anti-bot handling: auto, retail, cloudflare, etc.","default":"auto"},"proxy":{"type":"string","enum":["auto","direct","residential","datacenter","hetzner"],"title":"Proxy","description":"Proxy routing mode. Use datacenter for datacenter egress proxy.","default":"auto"},"timeout_ms":{"type":"integer","maximum":120000.0,"minimum":1000.0,"title":"Timeout Ms","default":60000},"wait_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait For","description":"CSS selector to wait for before collecting cookies."},"ttl_hours":{"type":"integer","maximum":168.0,"minimum":1.0,"title":"Ttl Hours","default":24}},"type":"object","required":["url"],"title":"FetchSessionRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MapRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"limit":{"type":"integer","maximum":5000.0,"minimum":1.0,"title":"Limit","default":100},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},"type":"object","required":["url"],"title":"MapRequest"},"ModelOutputsModel":{"properties":{"phishing_score":{"type":"number","title":"Phishing Score","default":0.0},"malware_score":{"type":"number","title":"Malware Score","default":0.0},"nsfw_score":{"type":"number","title":"Nsfw Score","default":0.0},"extremism_score":{"type":"number","title":"Extremism Score","default":0.0},"scam_score":{"type":"number","title":"Scam Score","default":0.0}},"type":"object","title":"ModelOutputsModel"},"ProxyPolicyModel":{"properties":{"escalate_on":{"items":{"type":"integer"},"type":"array","title":"Escalate On"},"max_direct_retries":{"type":"integer","title":"Max Direct Retries","default":1}},"type":"object","title":"ProxyPolicyModel"},"ScrapeOptions":{"properties":{"formats":{"items":{"type":"string","enum":["markdown","html","text","json"]},"type":"array","title":"Formats"},"render":{"type":"string","enum":["static","dynamic","auto"],"title":"Render","default":"auto"},"only_main_content":{"type":"boolean","title":"Only Main Content","default":true},"timeout_ms":{"type":"integer","maximum":120000.0,"minimum":1000.0,"title":"Timeout Ms","default":30000},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"wait_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait For"},"screenshot":{"type":"boolean","title":"Screenshot","default":false},"proxy":{"type":"string","enum":["auto","direct","residential","datacenter","hetzner"],"title":"Proxy","description":"Proxy routing mode. Use datacenter for datacenter egress proxy.","default":"auto"},"proxy_policy":{"$ref":"#/components/schemas/ProxyPolicyModel"},"strategy":{"type":"string","title":"Strategy","description":"Scrape strategy name, comma-separated chain, or 'auto' to detect from URL. Built-in: article, spa, cloudflare, authenticated, listing, jsonld, download, raw.","default":"auto"},"cookies":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Cookies","description":"Session cookies as a name→value map (alternative to cookie_header)."},"cookie_header":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Cookie Header","description":"Raw Cookie header copied from your browser DevTools. Routes through unified browser session (Playwright + proxy), not static HTTP — preserves TLS fingerprint coherence. Prefer metalift_seed_session / PUT /v1/sessions with storage_state for repeat scrapes."},"warm_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Warm Url","description":"Optional seed URL for unified browser session warm-up before the target page. Defaults to the target site root (e.g. https://www.walmart.com/)."},"session_mode":{"type":"string","enum":["auto","off"],"title":"Session Mode","description":"Unified browser session for retail/WAF sites: warm navigation + sticky proxy. Use 'off' to force the legacy fetch path.","default":"auto"},"max_proxy_tier":{"anyOf":[{"type":"string","enum":["direct","datacenter","hetzner","residential"]},{"type":"null"}],"title":"Max Proxy Tier","description":"Internal ceiling for proxy escalation (set by platform for community tier)."},"cache":{"type":"boolean","title":"Cache","description":"For static scrapes, reuse org-scoped cached results when the origin returns 304 Not Modified or unchanged validators. Set false to force a fresh fetch.","default":true},"direct_only":{"type":"boolean","title":"Direct Only","description":"Internal: force direct server egress without proxy escalation (community tier).","default":false},"response_detail":{"type":"string","enum":["compact","standard","full"],"title":"Response Detail","description":"How much page content to return. compact (default): truncated markdown/text (~16k chars), minimal metadata, no links — best for LLM context. standard: full markdown/text for requested formats, metadata with up to 25 links. full: complete extraction including all links and html/screenshot when requested.","default":"compact"}},"type":"object","title":"ScrapeOptions"},"ScrapeRequest":{"properties":{"formats":{"items":{"type":"string","enum":["markdown","html","text","json"]},"type":"array","title":"Formats"},"render":{"type":"string","enum":["static","dynamic","auto"],"title":"Render","default":"auto"},"only_main_content":{"type":"boolean","title":"Only Main Content","default":true},"timeout_ms":{"type":"integer","maximum":120000.0,"minimum":1000.0,"title":"Timeout Ms","default":30000},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"wait_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait For"},"screenshot":{"type":"boolean","title":"Screenshot","default":false},"proxy":{"type":"string","enum":["auto","direct","residential","datacenter","hetzner"],"title":"Proxy","description":"Proxy routing mode. Use datacenter for datacenter egress proxy.","default":"auto"},"proxy_policy":{"$ref":"#/components/schemas/ProxyPolicyModel"},"strategy":{"type":"string","title":"Strategy","description":"Scrape strategy name, comma-separated chain, or 'auto' to detect from URL. Built-in: article, spa, cloudflare, authenticated, listing, jsonld, download, raw.","default":"auto"},"cookies":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Cookies","description":"Session cookies as a name→value map (alternative to cookie_header)."},"cookie_header":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Cookie Header","description":"Raw Cookie header copied from your browser DevTools. Routes through unified browser session (Playwright + proxy), not static HTTP — preserves TLS fingerprint coherence. Prefer metalift_seed_session / PUT /v1/sessions with storage_state for repeat scrapes."},"warm_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Warm Url","description":"Optional seed URL for unified browser session warm-up before the target page. Defaults to the target site root (e.g. https://www.walmart.com/)."},"session_mode":{"type":"string","enum":["auto","off"],"title":"Session Mode","description":"Unified browser session for retail/WAF sites: warm navigation + sticky proxy. Use 'off' to force the legacy fetch path.","default":"auto"},"max_proxy_tier":{"anyOf":[{"type":"string","enum":["direct","datacenter","hetzner","residential"]},{"type":"null"}],"title":"Max Proxy Tier","description":"Internal ceiling for proxy escalation (set by platform for community tier)."},"cache":{"type":"boolean","title":"Cache","description":"For static scrapes, reuse org-scoped cached results when the origin returns 304 Not Modified or unchanged validators. Set false to force a fresh fetch.","default":true},"direct_only":{"type":"boolean","title":"Direct Only","description":"Internal: force direct server egress without proxy escalation (community tier).","default":false},"response_detail":{"type":"string","enum":["compact","standard","full"],"title":"Response Detail","description":"How much page content to return. compact (default): truncated markdown/text (~16k chars), minimal metadata, no links — best for LLM context. standard: full markdown/text for requested formats, metadata with up to 25 links. full: complete extraction including all links and html/screenshot when requested.","default":"compact"},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"}},"type":"object","required":["url"],"title":"ScrapeRequest"},"SearchRequest":{"properties":{"query":{"type":"string","maxLength":512,"minLength":1,"title":"Query"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":10},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories","description":"Optional SearXNG categories (e.g. general, images, news)."},"language":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Language","description":"Optional language code passed to SearXNG."}},"type":"object","required":["query"],"title":"SearchRequest"},"SearchResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"query":{"type":"string","title":"Query"},"results":{"items":{"$ref":"#/components/schemas/SearchResultModel"},"type":"array","title":"Results"},"cached":{"type":"boolean","title":"Cached","default":false},"result_count":{"type":"integer","title":"Result Count"},"unresponsive_engines":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"Unresponsive Engines"}},"type":"object","required":["query","results","result_count"],"title":"SearchResponse"},"SearchResultModel":{"properties":{"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"snippet":{"type":"string","title":"Snippet"},"engine":{"type":"string","title":"Engine"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"}},"type":"object","required":["title","url","snippet","engine"],"title":"SearchResultModel"},"SeedSessionRequest":{"properties":{"domain":{"type":"string","maxLength":253,"minLength":1,"title":"Domain","description":"Target site hostname (e.g. www.walmart.com or walmart.com)."},"storage_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Storage State","description":"Full Playwright storage_state export (cookies + localStorage). Preferred over cookie_header — preserves browser session context for unified replay."},"cookie_header":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Cookie Header"},"cookies":{"additionalProperties":{"type":"string"},"type":"object","title":"Cookies"},"user_agent":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"User Agent"},"ttl_hours":{"type":"integer","maximum":168.0,"minimum":1.0,"title":"Ttl Hours","default":24}},"type":"object","required":["domain"],"title":"SeedSessionRequest"},"SitemapRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"Site homepage or direct sitemap.xml / sitemap index URL."},"limit":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Limit","default":1000},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search","description":"Optional substring filter; matching URLs are returned first."},"same_origin":{"type":"boolean","title":"Same Origin","description":"When true, only return URLs on the same origin as the input URL.","default":true}},"type":"object","required":["url"],"title":"SitemapRequest"},"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"}}}}