{"openapi":"3.1.0","info":{"title":"Web Extract","version":"1.1.0","contact":{"name":"AgentPay","email":"nasilver20@gmail.com","url":"https://github.com/noah-silver/agentpay"},"description":"Fetches a web page and returns the main content as markdown, plus title, description, Open Graph metadata, canonical URL and all outbound links. Built for agents that need to read the web cheaply without running a browser.\n\nPay per call with x402 v2 in USDC on Algorand (algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k) or Base (eip155:8453), or use a prepaid credits key."},"servers":[{"url":"https://agentpay.agentpay-apis.workers.dev"}],"paths":{"/extract/v1/page":{"get":{"operationId":"extract_page","tags":["Web Extract"],"summary":"Fetch a URL and return markdown, metadata and links.","description":"Fetch a URL and return markdown, metadata and links. Price per call: $0.005 USDC via x402, or from prepaid credits.","parameters":[{"name":"url","in":"query","required":true,"description":"http(s) URL to read","schema":{"type":"string"},"example":"https://example.com"},{"name":"maxChars","in":"query","required":false,"description":"Max markdown characters (1000-200000, default 50000)","schema":{"type":"integer"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"x-x402":{"accepts":[{"scheme":"exact","network":"algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k","amount":"5000","asset":"31566704","payTo":"F2ZYO2DDPQXOACUYBYQIHMQRAB3TJFZVCNUD3OU3CR5OOJUKFZOF5EYVJ4","maxTimeoutSeconds":60,"extra":{}},{"scheme":"exact","network":"eip155:8453","amount":"5000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x5d5d827D899CdcaCbD2b2e80162D805B3783C9D8","maxTimeoutSeconds":60,"extra":{"name":"USD Coin","version":"2"}}]},"security":[],"responses":{"200":{"description":"Success (JSON)"},"400":{"description":"Invalid input (rejected before any payment)"},"402":{"description":"Payment required. x402 v2 PaymentRequired in the PAYMENT-REQUIRED header (base64); v1-compatible JSON body."}}}},"/credits/buy":{"get":{"operationId":"credits_buy","summary":"Buy prepaid credits with one x402 payment ($1-$500); returns an API key.","parameters":[{"name":"usd","in":"query","required":false,"schema":{"type":"number","default":1},"example":1}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"1"},"protocols":[{"x402":{}}]},"security":[],"responses":{"200":{"description":"{ apiKey, credit, creditHuman, transaction, network }"},"402":{"description":"Payment required"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Prepaid credits key from /credits/buy or /credits/redeem."},"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 v2 payment payload (base64 JSON). X-PAYMENT (v1) also accepted for Base."}}}}