{"openapi":"3.1.0","info":{"title":"Web2Markdown: web page / PDF to clean Markdown for AI agents","version":"0.3.0","summary":"Pay-per-call API for AI agents: turn any public web page or PDF into clean, LLM-ready Markdown. $0.002 per call in USDC on Base via x402. No API key, no signup.","description":"Fetch any public web page or PDF and return clean main-content Markdown for AI agents / LLMs (boilerplate, nav and ads removed) plus title & metadata. CJK-aware; optional Simplified<->Traditional (incl. Hong Kong / Taiwan) conversion. Respects robots.txt. $0.002 per call, USDC on Base (x402). Failed extractions are not charged. Also: Deterministic data convert and JSON Schema validate for AI agents: CSV/JSON/YAML/XML transforms plus Draft 2020-12 schema check. $0.001 per call, USDC on Base (x402). Max body 100 KiB. No network I/O; XXE-safe XML. Failures are not charged.","contact":{"name":"Web2Markdown by LIN Desk","url":"https://lin-desk-x402.lindesk.workers.dev/"},"x-logo":{"url":"https://lin-desk-x402.lindesk.workers.dev/favicon.png","altText":"Web2Markdown by LIN Desk","backgroundColor":"#1e40af"},"x-guidance":"Paid routes: (1) GET /v1/extract?url=<public http(s) URL> — Web2Markdown. (2) POST /v1/dataformat with JSON {op,input,options} — AgentDataFormat (csv2json|json2csv|json2yaml|yaml2json|xml2json|json_format|json_schema). First call returns HTTP 402 with PAYMENT-REQUIRED (x402 v2 exact, USDC on eip155:8453). Retry with PAYMENT-SIGNATURE. Failures return 4xx/5xx with charged=false and are not settled."},"servers":[{"url":"https://lin-desk-x402.lindesk.workers.dev"}],"x-x402":{"network":"eip155:8453","payTo":"0x4b8AD7fFc8CD960f696059041132339386c28831","asset":"USDC","prices":{"/v1/extract":"$0.002","/v1/dataformat":"$0.001"},"price":"$0.002"},"x-discovery":{"ownershipProofs":["0xedbfdfdafe3a79ca19fd72c920cde2c6a5fdc905bb1330e3d28052d3a73646ab21c2d62d6dc484e799ac2b18451a6810975bf25732a4d26ac3fd160c18ec1dd91c"]},"paths":{"/v1/extract":{"get":{"operationId":"extractMarkdown","summary":"Web page / PDF to clean Markdown for AI agents","description":"Fetch any public web page or PDF and return clean main-content Markdown for AI agents / LLMs (boilerplate, nav and ads removed) plus title & metadata. CJK-aware; optional Simplified<->Traditional (incl. Hong Kong / Taiwan) conversion. Respects robots.txt. $0.002 per call, USDC on Base (x402). Failed extractions are not charged.","tags":["web-extraction"],"parameters":[{"name":"url","in":"query","required":true,"description":"Public http(s) URL of an HTML page, PDF or text file","schema":{"type":"string","format":"uri","maxLength":2048},"example":"https://example.com/"},{"name":"zh","in":"query","required":false,"description":"Optional Chinese script conversion (OpenCC). Default none","schema":{"type":"string","enum":["none","s2t","t2s","s2hk","s2tw","hk2s","tw2s"],"default":"none"}},{"name":"links","in":"query","required":false,"description":"Keep hyperlinks in Markdown (1) or not (0, default)","schema":{"type":"string","enum":["0","1"],"default":"0"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"2000","payTo":"0x4b8AD7fFc8CD960f696059041132339386c28831"}}]},"responses":{"200":{"description":"Extracted Markdown","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"final_url":{"type":"string"},"kind":{"type":"string"},"title":{"type":"string"},"metadata":{"type":"object"},"markdown":{"type":"string"},"chars":{"type":"integer"},"truncated":{"type":"boolean"},"zh":{"type":"string"},"elapsed_ms":{"type":"integer"}}},"example":{"url":"https://example.com/","final_url":"https://example.com/","kind":"html","title":"Example Domain","metadata":{},"markdown":"This domain is for use in documentation examples...","chars":120,"truncated":false,"zh":"none","elapsed_ms":350}}}},"402":{"description":"Payment Required (x402 v2; see PAYMENT-REQUIRED header)"},"4XX":{"description":"Extraction refused/failed; not charged (charged=false)"},"5XX":{"description":"Upstream/internal error; not charged (charged=false)"}}}},"/v1/dataformat":{"post":{"operationId":"agentDataFormat","summary":"Convert / validate structured data (CSV JSON YAML XML schema)","description":"Deterministic data convert and JSON Schema validate for AI agents: CSV/JSON/YAML/XML transforms plus Draft 2020-12 schema check. $0.001 per call, USDC on Base (x402). Max body 100 KiB. No network I/O; XXE-safe XML. Failures are not charged.","tags":["data-convert"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["op","input"],"properties":{"op":{"type":"string","enum":["csv2json","json2csv","json2yaml","json_format","json_schema","xml2json","yaml2json"]},"input":{"type":"string","description":"Payload text; max 100 KiB"},"options":{"type":"object","properties":{"header":{"type":"boolean"},"delimiter":{"type":"string"},"indent":{"type":"integer"},"schema":{"type":"object"}}}},"example":{"op":"csv2json","input":"name,age\nalice,30\nbob,25","options":{"header":true}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{"version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"1000","payTo":"0x4b8AD7fFc8CD960f696059041132339386c28831"}}]},"responses":{"200":{"description":"Conversion / validation result","content":{"application/json":{"schema":{"type":"object","properties":{"op":{"type":"string"},"result":{},"rows":{"type":"integer"},"cols":{"type":"array"},"encoding":{"type":"string"},"valid":{"type":"boolean"},"errors":{"type":"array"},"elapsed_ms":{"type":"integer"}},"example":{"op":"csv2json","result":[{"name":"alice","age":"30"},{"name":"bob","age":"25"}],"rows":2,"cols":["name","age"],"encoding":"utf-8","elapsed_ms":2}}}}},"402":{"description":"Payment Required (x402 v2; see PAYMENT-REQUIRED header)"},"4XX":{"description":"Bad input / rejected; not charged (charged=false)"},"5XX":{"description":"Internal error; not charged (charged=false)"}}}}}}