{"openapi":"3.1.0","info":{"title":"x402-scraper-api","version":"2.1.0","description":"Paid scraping API over x402. Content routes are charged only on successful responses. Invalid/blocked URLs, 4xx/5xx, timeouts, and empty results are not settled."},"servers":[{"url":"https://scraper-production-6a87.up.railway.app"}],"paths":{"/v1/check":{"get":{"summary":"Preflight URL check (no content returned, free)","parameters":[{"in":"query","name":"url","required":true,"schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"URL preflight details"},"429":{"description":"Rate limit exceeded (30/day/IP)"}}}},"/v1/scrape/markdown":{"post":{"summary":"Scrape URL to Markdown ($0.001)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"Markdown"},"402":{"description":"Payment required"}},"x-bazaar":{"route":"/v1/scrape/markdown","method":"POST","description":"URL to clean markdown.","price_usdc":0.001,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x0395c1bed0b83ad6f0329b4132191934733e637c","input_schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},"example_response":{"cached":false,"url":"https://example.com","length":1200,"markdown":"# Example"}}}},"/v1/extract":{"post":{"summary":"Structured extraction ($0.02 or $0.04 if JS rendering needed)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","schema"],"properties":{"url":{"type":"string","format":"uri"},"schema":{"type":"object"}}}}}},"responses":{"200":{"description":"Structured extraction result"},"402":{"description":"Payment required"}},"x-bazaar":{"route":"/v1/extract","method":"POST","description":"URL + JSON schema to structured JSON.","price_usdc":"0.02 or 0.04","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x0395c1bed0b83ad6f0329b4132191934733e637c","input_schema":{"type":"object","required":["url","schema"],"properties":{"url":{"type":"string","format":"uri"},"schema":{"type":"object"}}},"example_response":{"url":"https://example.com","data":{"title":"Example"},"confidence":{"title":0.85}}}}},"/v1/market-rules/compare":{"post":{"summary":"Compare Polymarket and bookmaker market rules ($0.05)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["polymarketRules","bookmakerDescription"],"properties":{"polymarketRules":{"type":"string"},"bookmakerDescription":{"type":"string"}}}}}},"responses":{"200":{"description":"Comparison verdict"},"402":{"description":"Payment required"}},"x-bazaar":{"route":"/v1/market-rules/compare","method":"POST","description":"Compares market rules for resolution mismatches.","price_usdc":0.05,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x0395c1bed0b83ad6f0329b4132191934733e637c","input_schema":{"type":"object","required":["polymarketRules","bookmakerDescription"],"properties":{"polymarketRules":{"type":"string"},"bookmakerDescription":{"type":"string"}}},"example_response":{"verdict":"different","differences":["overtime"],"confidence":0.72}}}},"/v1/page/changed":{"get":{"summary":"Check if page changed since timestamp/hash ($0.003)","parameters":[{"in":"query","name":"url","required":true,"schema":{"type":"string","format":"uri"}},{"in":"query","name":"since","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Change check result"},"402":{"description":"Payment required"}},"x-bazaar":{"route":"/v1/page/changed","method":"GET","description":"Whether a page changed since timestamp/hash.","price_usdc":0.003,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x0395c1bed0b83ad6f0329b4132191934733e637c","input_schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"since":{"type":"string"}}},"example_response":{"changed":true,"diffSummary":"Changed lines: 4 of 40."}}}}}}