{"openapi":"3.1.0","info":{"title":"Surf Web","version":"1.0.0","description":"Web crawling and search API. Paid via x402 or MPP protocol (USDC on Solana, Base, or Tempo).","x-guidance":"POST /v1/crawl to extract web page content as markdown, HTML, or text. Accepts { url } for single pages or { urls } for bulk. POST /v1/search for web search with { query, num_results? }. All requests require x402 or MPP payment (USDC on Solana, Base, or Tempo)."},"servers":[{"url":"https://web.surf.cascade.fyi"}],"components":{"schemas":{"CrawlResult":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status from crawled page"},"content":{"type":"array","items":{"type":"string"},"description":"Extracted content blocks"},"url":{"type":"string","description":"Final URL after redirects"}},"required":["status","content","url"]},"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"CrawlBody":{"type":"object","properties":{"url":{"type":"string","description":"URL to crawl","example":"https://example.com"},"urls":{"type":"array","items":{"type":"string"},"description":"Multiple URLs to crawl"},"format":{"type":"string","enum":["markdown","html","text"],"default":"markdown","description":"Output format"},"selector":{"type":"string","description":"CSS selector to extract"},"proxy":{"type":"boolean","description":"Use proxy for blocked sites"}}},"SearchResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}}},"required":["results"]},"SearchResult":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"snippet":{"type":"string"}},"required":["title","url","snippet"]},"SearchBody":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Search query","example":"x402 protocol"},"num_results":{"type":"integer","minimum":1,"maximum":20,"default":5,"description":"Number of results (1-20)"}},"required":["query"]}},"parameters":{}},"paths":{"/v1/crawl":{"post":{"tags":["Web"],"summary":"Crawl web pages and extract content","description":"Extracts content from web pages as markdown, HTML, or text. Single URL returns an object, multiple URLs return an array. Supports CSS selectors and proxy for blocked sites.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlBody"}}}},"responses":{"200":{"description":"Crawled content (single URL returns object, bulk returns array)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment Required"},"429":{"description":"Too many concurrent requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-payment-info":{"protocols":["x402","mpp"],"pricingMode":"fixed","price":"0.002"}}},"/v1/search":{"post":{"tags":["Web"],"summary":"Web search","description":"Search the web using Exa. Returns titles, URLs, and snippets.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchBody"}}}},"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment Required"},"502":{"description":"Upstream Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-payment-info":{"protocols":["x402","mpp"],"pricingMode":"fixed","price":"0.01"}}}}}