{
 "aiax_version": "0.1",
 "section_id": "webread",
 "purpose": "WebRead: Converts a public web page into clean Markdown for LLMs and RAG pipelines: main content only (no nav, ads or scripts), absolute links, plus title, description and language metadata. Suited to AI agents that read, cite or summarize web pages. Respects robots.txt; only successful reads are charged.",
 "inputs": {
  "type": "object",
  "properties": {
   "url": {
    "type": "string",
    "description": "Absolute http(s) URL of a public web page (HTML or plain text)"
   },
   "maxChars": {
    "type": "integer",
    "minimum": 100,
    "maximum": 200000,
    "description": "Truncate the Markdown to this many characters (default 200000)"
   }
  },
  "required": [
   "url"
  ]
 },
 "outputs": {
  "type": "object",
  "properties": {
   "url": {
    "type": "string"
   },
   "finalUrl": {
    "type": "string"
   },
   "status": {
    "type": "integer"
   },
   "contentType": {
    "type": "string"
   },
   "title": {
    "type": "string"
   },
   "description": {},
   "lang": {
    "type": "string"
   },
   "canonical": {},
   "markdown": {
    "type": "string"
   },
   "chars": {
    "type": "integer"
   },
   "wordCount": {
    "type": "integer"
   },
   "links": {
    "type": "integer"
   },
   "truncated": {
    "type": "boolean"
   },
   "sourceBytes": {
    "type": "integer"
   },
   "redirects": {
    "type": "integer"
   },
   "fetchMs": {
    "type": "integer"
   },
   "robots": {
    "type": "string"
   },
   "fetchedAt": {
    "type": "string"
   }
  }
 },
 "pricing": {
  "model": "per_call",
  "amount": "0.002",
  "currency": "USDC",
  "rail": "x402"
 },
 "examples": [
  {
   "description": "GET /webread/v1/read, paid over x402 (USDC on Base); an unpaid call answers 402 with the terms.",
   "request": {
    "method": "GET",
    "url": "https://api.youraitools.co/webread/v1/read",
    "query": {
     "url": "https://example.com/"
    }
   },
   "response": {
    "url": "https://example.com/",
    "finalUrl": "https://example.com/",
    "status": 200,
    "contentType": "text/html; charset=utf-8",
    "title": "Example Domain",
    "description": null,
    "lang": "en",
    "canonical": null,
    "markdown": "This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.",
    "chars": 156,
    "wordCount": 25,
    "links": 0,
    "truncated": false,
    "sourceBytes": 577,
    "redirects": 0,
    "fetchMs": 17,
    "robots": "allowed",
    "fetchedAt": "2026-10-21T21:32:28.690Z"
   }
  }
 ],
 "pact_mandate_template": null,
 "extensions": {
  "youraitools": {
   "endpoint": "https://api.youraitools.co/webread/v1/read",
   "network": "eip155:8453",
   "x402_versions": [
    2,
    1
   ],
   "mcp": "https://api.youraitools.co/webread/mcp",
   "openapi": "https://api.youraitools.co/webread/openapi.json"
  }
 }
}
