{"id":"page-contents","title":"Page contents: URL to clean Markdown or text","description":"Fetches one public web page and returns its main content as clean GitHub-flavored Markdown or plain text, with title, canonical URL, language, absolute links and content hashes, for agents that feed pages to a model. Deterministic, no model. Does not run JavaScript (client-rendered pages come back sparse), does not follow links, does not consult robots.txt, and drops navigation, footers, sidebars and forms.","roi":"Token-efficient page text for an LLM without writing a scraper or an HTML cleaner.","audience":"developer","channels":["x402","mcp","rapidapi","apify"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/page-contents","path":"/api/v1/page-contents","contentType":"application/json"},"price":{"amount":"0.01","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","minLength":8,"maxLength":2048,"description":"Public http(s) URL."},"format":{"type":"string","enum":["markdown","text"],"default":"markdown"},"max_chars":{"type":"integer","minimum":1000,"maximum":200000,"default":60000,"description":"Content is cut to this many characters; truncated says whether it was."},"include_links":{"type":"boolean","default":true,"description":"Keep Markdown links and return a links list (at most 200)."},"include_tables":{"type":"boolean","default":true,"description":"Convert data tables to GFM tables; false drops them."}}},"resultSchema":{"type":"object","properties":{"url":{"type":"string"},"final_url":{"type":"string"},"title":{"type":"string"},"canonical":{"anyOf":[{"type":"string"},{"type":"null"}]},"lang":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"type":"string","enum":["markdown","text"]},"content":{"type":"string"},"word_count":{"type":"integer"},"truncated":{"type":"boolean"},"content_sha256":{"type":"string"},"html_sha256":{"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"href":{"type":"string"}}}},"fetched_at":{"type":"string"},"limits":{"type":"object","properties":{"note":{"type":"string"}}}}},"outputSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"},"final_url":{"type":"string"},"title":{"type":"string"},"canonical":{"anyOf":[{"type":"string"},{"type":"null"}]},"lang":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"type":"string","enum":["markdown","text"]},"content":{"type":"string"},"word_count":{"type":"integer"},"truncated":{"type":"boolean"},"content_sha256":{"type":"string"},"html_sha256":{"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"href":{"type":"string"}}}},"fetched_at":{"type":"string"},"limits":{"type":"object","properties":{"note":{"type":"string"}}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]},"example":{"url":"https://example.com/","format":"markdown","max_chars":20000},"openapiOperation":{"operationId":"page_contents","summary":"Page contents: URL to clean Markdown or text","description":"Fetches one public web page and returns its main content as clean GitHub-flavored Markdown or plain text, with title, canonical URL, language, absolute links and content hashes, for agents that feed pages to a model. Deterministic, no model. Does not run JavaScript (client-rendered pages come back sparse), does not follow links, does not consult robots.txt, and drops navigation, footers, sidebars and forms.\n\nPrice: 0.01 USDC on Base (x402).","x-x402-price-usdc":"0.01","x-x402-amount":"10000","x-audience":"developer","x-sample-url":"https://agents.writerslogic.com/api/v1/samples/page-contents","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","minLength":8,"maxLength":2048,"description":"Public http(s) URL."},"format":{"type":"string","enum":["markdown","text"],"default":"markdown"},"max_chars":{"type":"integer","minimum":1000,"maximum":200000,"default":60000,"description":"Content is cut to this many characters; truncated says whether it was."},"include_links":{"type":"boolean","default":true,"description":"Keep Markdown links and return a links list (at most 200)."},"include_tables":{"type":"boolean","default":true,"description":"Convert data tables to GFM tables; false drops them."}}},"example":{"url":"https://example.com/","format":"markdown","max_chars":20000}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"},"final_url":{"type":"string"},"title":{"type":"string"},"canonical":{"anyOf":[{"type":"string"},{"type":"null"}]},"lang":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"type":"string","enum":["markdown","text"]},"content":{"type":"string"},"word_count":{"type":"integer"},"truncated":{"type":"boolean"},"content_sha256":{"type":"string"},"html_sha256":{"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"href":{"type":"string"}}}},"fetched_at":{"type":"string"},"limits":{"type":"object","properties":{"note":{"type":"string"}}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}},"links":{"docs":"https://writerslogic.com/agents/page-contents/","docsJson":"https://writerslogic.com/agents/page-contents.json","sample":"https://agents.writerslogic.com/api/v1/samples/page-contents","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://writerslogic.com/agents/index.json"}}