{"openapi":"3.1.0","info":{"title":"tinyx402 API","version":"1.0.0","description":"Web agent APIs paid per request with x402 on Whitechain. No API keys."},"servers":[{"url":"https://tinyx402.007575.xyz"}],"components":{"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 v2 payment payload (base64). Obtain requirements from the 402 response."}}},"paths":{"/api/v1/search":{"get":{"operationId":"search","summary":"Search","description":"Structured web search results. Price: 10000 base units of USDT, paid via x402. Backed by TinyFish.","x-x402":{"scheme":"exact","network":"eip155:1874","asset":"0xcedfB56113143d55b2358b8CFbB0dEB5Ad2f55a7","amount":"10000","extra":{"name":"Tether USD","version":"1"},"facilitator":"https://whitechain.007575.xyz"},"security":[{"x402":[]}],"responses":{"200":{"description":"Success. PAYMENT-RESPONSE header carries the settlement receipt.","content":{"application/json":{}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment required. PAYMENT-REQUIRED header holds base64 JSON requirements."},"429":{"description":"Rate limited"},"502":{"description":"Upstream failure (not charged)"},"503":{"description":"Upstream capacity unavailable (not charged)"}},"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2000,"description":"Search query"}},{"name":"purpose","in":"query","required":false,"schema":{"description":"Why you are searching/fetching; improves results","type":"string","minLength":1,"maxLength":2000}},{"name":"location","in":"query","required":false,"schema":{"description":"Country code, e.g. US","type":"string","minLength":2,"maxLength":2}},{"name":"language","in":"query","required":false,"schema":{"description":"Language code, e.g. en","type":"string","minLength":2,"maxLength":10}},{"name":"include_domains","in":"query","required":false,"schema":{"description":"Comma-separated domains to restrict to","type":"string","maxLength":2000}},{"name":"exclude_domains","in":"query","required":false,"schema":{"description":"Comma-separated domains to exclude","type":"string","maxLength":2000}},{"name":"domain_type","in":"query","required":false,"schema":{"type":"string","enum":["web","news","research_paper"]}},{"name":"after_date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"before_date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"recency_minutes","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5256000}},{"name":"pub_year_min","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":9999}},{"name":"pub_year_max","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":9999}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":10}},{"name":"include_thumbnail","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}]}},"/api/v1/fetch":{"post":{"operationId":"fetch","summary":"Fetch","description":"Clean content extraction from up to 10 URLs. Price: 15000 base units of USDT, paid via x402. Backed by TinyFish.","x-x402":{"scheme":"exact","network":"eip155:1874","asset":"0xcedfB56113143d55b2358b8CFbB0dEB5Ad2f55a7","amount":"15000","extra":{"name":"Tether USD","version":"1"},"facilitator":"https://whitechain.007575.xyz"},"security":[{"x402":[]}],"responses":{"200":{"description":"Success. PAYMENT-RESPONSE header carries the settlement receipt.","content":{"application/json":{}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment required. PAYMENT-REQUIRED header holds base64 JSON requirements."},"429":{"description":"Rate limited"},"502":{"description":"Upstream failure (not charged)"},"503":{"description":"Upstream capacity unavailable (not charged)"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"urls":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uri"},"description":"1-10 URLs"},"format":{"default":"markdown","type":"string","enum":["markdown","html","json"]},"purpose":{"description":"Why you are searching/fetching; improves results","type":"string","minLength":1,"maxLength":2000},"links":{"type":"boolean"},"image_links":{"type":"boolean"},"iframe_links":{"type":"boolean"},"page_metadata":{"type":"boolean"},"ttl":{"description":"Cache freshness tolerance in seconds; 0 = live","type":"integer","minimum":0,"maximum":9007199254740991},"per_url_timeout_ms":{"type":"integer","minimum":1,"maximum":110000},"if_none_match":{"type":"string","minLength":1},"if_modified_since":{"type":"string","minLength":1},"include_etag_and_last_modified":{"type":"boolean"},"include_selectors":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}},"exclude_selectors":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}}},"required":["urls"]}}}}}},"/api/v1/agent/run":{"post":{"operationId":"agent","summary":"Agent","description":"Goal-based browser automation. Price: 50000 base units of USDT, paid via x402. Backed by TinyFish.","x-x402":{"scheme":"exact","network":"eip155:1874","asset":"0xcedfB56113143d55b2358b8CFbB0dEB5Ad2f55a7","amount":"50000","extra":{"name":"Tether USD","version":"1"},"facilitator":"https://whitechain.007575.xyz"},"security":[{"x402":[]}],"responses":{"200":{"description":"Success. PAYMENT-RESPONSE header carries the settlement receipt.","content":{"application/json":{}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment required. PAYMENT-REQUIRED header holds base64 JSON requirements."},"429":{"description":"Rate limited"},"502":{"description":"Upstream failure (not charged)"},"503":{"description":"Upstream capacity unavailable (not charged)"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000,"description":"Start URL"},"goal":{"type":"string","minLength":1,"maxLength":10000,"description":"Natural-language goal"},"browser_profile":{"type":"string","enum":["lite","stealth"]},"agent_config":{"type":"object","properties":{"mode":{"type":"string","enum":["default","strict"]},"max_steps":{"type":"integer","minimum":1,"maximum":500},"max_duration_seconds":{"type":"integer","minimum":1,"maximum":280}}},"proxy_config":{"type":"object","properties":{"enabled":{"type":"boolean"},"country_code":{"type":"string","minLength":2,"maxLength":2}},"required":["enabled"]},"output_schema":{"description":"JSON Schema for the result","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["url","goal"]}}}}}},"/api/v1/agent/run-sse":{"post":{"operationId":"agentSse","summary":"Agent (SSE)","description":"Streaming agent run. Price: 50000 base units of USDT, paid via x402. Backed by TinyFish.","x-x402":{"scheme":"exact","network":"eip155:1874","asset":"0xcedfB56113143d55b2358b8CFbB0dEB5Ad2f55a7","amount":"50000","extra":{"name":"Tether USD","version":"1"},"facilitator":"https://whitechain.007575.xyz"},"security":[{"x402":[]}],"responses":{"200":{"description":"Success. PAYMENT-RESPONSE header carries the settlement receipt.","content":{"text/event-stream":{}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment required. PAYMENT-REQUIRED header holds base64 JSON requirements."},"429":{"description":"Rate limited"},"502":{"description":"Upstream failure (not charged)"},"503":{"description":"Upstream capacity unavailable (not charged)"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000,"description":"Start URL"},"goal":{"type":"string","minLength":1,"maxLength":10000,"description":"Natural-language goal"},"browser_profile":{"type":"string","enum":["lite","stealth"]},"agent_config":{"type":"object","properties":{"mode":{"type":"string","enum":["default","strict"]},"max_steps":{"type":"integer","minimum":1,"maximum":500},"max_duration_seconds":{"type":"integer","minimum":1,"maximum":280}}},"proxy_config":{"type":"object","properties":{"enabled":{"type":"boolean"},"country_code":{"type":"string","minLength":2,"maxLength":2}},"required":["enabled"]},"output_schema":{"description":"JSON Schema for the result","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["url","goal"]}}}}}},"/api/v1/research":{"post":{"operationId":"research","summary":"Research","description":"Cited multi-source research report. Price: 200000 base units of USDT (500000 for mode \"max\"), paid via x402. Backed by TinyFish.","x-x402":{"scheme":"exact","network":"eip155:1874","asset":"0xcedfB56113143d55b2358b8CFbB0dEB5Ad2f55a7","amount":"200000","extra":{"name":"Tether USD","version":"1"},"facilitator":"https://whitechain.007575.xyz"},"security":[{"x402":[]}],"responses":{"200":{"description":"Success. PAYMENT-RESPONSE header carries the settlement receipt.","content":{"application/json":{}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment required. PAYMENT-REQUIRED header holds base64 JSON requirements."},"429":{"description":"Rate limited"},"502":{"description":"Upstream failure (not charged)"},"503":{"description":"Upstream capacity unavailable (not charged)"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":2000},"mode":{"default":"deep","type":"string","enum":["deep","max"]},"output_language":{"description":"BCP 47 tag, e.g. en","type":"string","minLength":2,"maxLength":35},"stream":{"description":"Emit report text as synthesis_delta events","type":"boolean"},"weak_sources_enabled":{"type":"boolean"},"domain_type":{"type":"string","enum":["web","news","research_paper"]},"after_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"before_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recency_minutes":{"type":"integer","minimum":1,"maximum":5256000},"domain_filter":{"type":"object","properties":{"mode":{"type":"string","enum":["include","exclusive"]},"domains":{"maxItems":150,"type":"array","items":{"type":"string"}},"block":{"maxItems":150,"type":"array","items":{"type":"string"}}},"required":["mode"]}},"required":["query"]}}}}}},"/api/v1/datasets":{"post":{"operationId":"datasets","summary":"Datasets","description":"Structured dataset filled from the web. Price: 20000 base units of USDT per target_rows, paid via x402. Backed by TinyFish.","x-x402":{"scheme":"exact","network":"eip155:1874","asset":"0xcedfB56113143d55b2358b8CFbB0dEB5Ad2f55a7","amount":"20000","extra":{"name":"Tether USD","version":"1"},"facilitator":"https://whitechain.007575.xyz"},"security":[{"x402":[]}],"responses":{"200":{"description":"Success. PAYMENT-RESPONSE header carries the settlement receipt.","content":{"application/json":{}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment required. PAYMENT-REQUIRED header holds base64 JSON requirements."},"429":{"description":"Rate limited"},"502":{"description":"Upstream failure (not charged)"},"503":{"description":"Upstream capacity unavailable (not charged)"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"prompt":{"description":"What the dataset should contain","type":"string","minLength":3,"maxLength":15000},"spec":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"columns":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"keep_when":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","description","columns"]},"target_rows":{"default":10,"type":"integer","minimum":1,"maximum":250}}}}}}}},"/api/v1/browser":{"post":{"operationId":"browser","summary":"Browser","description":"Remote browser session (CDP). Price: 30000 base units of USDT, paid via x402. Backed by TinyFish.","x-x402":{"scheme":"exact","network":"eip155:1874","asset":"0xcedfB56113143d55b2358b8CFbB0dEB5Ad2f55a7","amount":"30000","extra":{"name":"Tether USD","version":"1"},"facilitator":"https://whitechain.007575.xyz"},"security":[{"x402":[]}],"responses":{"200":{"description":"Success. PAYMENT-RESPONSE header carries the settlement receipt.","content":{"application/json":{}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment required. PAYMENT-REQUIRED header holds base64 JSON requirements."},"429":{"description":"Rate limited"},"502":{"description":"Upstream failure (not charged)"},"503":{"description":"Upstream capacity unavailable (not charged)"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"description":"Navigate here on startup","type":"string","maxLength":2000},"timeout_seconds":{"description":"Inactivity timeout","type":"integer","minimum":5,"maximum":3600},"proxy_config":{"type":"object","properties":{"enabled":{"type":"boolean"},"type":{"type":"string","enum":["tinyfish","custom"]},"country_code":{"type":"string","minLength":2,"maxLength":2},"url":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"}}}}}}}}}},"/api/v1/research/{id}":{"get":{"summary":"Get research run (free)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}},"/api/v1/research/{id}/events":{"get":{"summary":"Follow research progress (free, SSE)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/event-stream":{}}}}}},"/api/v1/datasets/{id}":{"get":{"summary":"Get dataset status (free)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}},"/api/v1/datasets/{id}/rows":{"get":{"summary":"Get dataset rows (free); ?after=cursor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}},"/api/v1/datasets/{id}/events":{"get":{"summary":"Follow dataset fill (free, SSE); ?run=runId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/event-stream":{}}}}}},"/api/v1/browser/{id}":{"delete":{"summary":"End browser session early (free)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Ended"}}}}}}