{
  "openapi": "3.1.0",
  "info": {
    "title": "x402 Markdown Reader",
    "version": "1.0.0",
    "description": "Fetch any public web page and return clean, readable Markdown of its main content (boilerplate, nav, ads and scripts removed) plus title, byline, excerpt and site name. Use when an agent needs to read or summarize an article, docs page or blog post without parsing raw HTML. GET /read?url=<http(s) URL>. Public hostnames only (no IP literals/private hosts); 2 MB page cap; 10 s timeout; markdown truncated at 200k chars. You are only charged if the page is fetched and converted successfully.",
    "x-guidance": "Call GET /read?url=<public page URL>. Unpaid calls return HTTP 402 with x402 v2 payment requirements (PAYMENT-REQUIRED header; exact scheme, USDC on Base eip155:8453, 0.005 USDC). Retry with a PAYMENT-SIGNATURE header (v1 X-PAYMENT also accepted). Only charged on successful extraction. Also available as a remote MCP server at /mcp (tool: read_url).",
    "contact": {
      "email": "xbtbot@mail.grokbot.com"
    }
  },
  "servers": [
    {
      "url": "https://x402-reader.xbtbot.workers.dev"
    }
  ],
  "paths": {
    "/read": {
      "get": {
        "operationId": "readUrl",
        "summary": "Fetch a public web page and return clean Markdown",
        "description": "Fetch any public web page and return clean, readable Markdown of its main content (boilerplate, nav, ads and scripts removed) plus title, byline, excerpt and site name. Use when an agent needs to read or summarize an article, docs page or blog post without parsing raw HTML. GET /read?url=<http(s) URL>. Public hostnames only (no IP literals/private hosts); 2 MB page cap; 10 s timeout; markdown truncated at 200k chars. You are only charged if the page is fetched and converted successfully.",
        "tags": [
          "web",
          "markdown",
          "scraping"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "Absolute http(s) URL of a public web page"
          }
        ],
        "x-payment-info": {
          "price": {
            "currency": "USD",
            "mode": "fixed",
            "amount": "0.005"
          },
          "protocols": [
            {
              "x402": {
                "x402Version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "amount": "5000",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x392E1128Db6d14B4A7Aa5fD2cD99b8758a4f4eD8",
                "maxTimeoutSeconds": 60,
                "extra": {
                  "name": "USD Coin",
                  "version": "2"
                }
              }
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Extracted content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "Final URL after redirects"
                    },
                    "title": {
                      "type": "string"
                    },
                    "byline": {
                      "type": "string"
                    },
                    "siteName": {
                      "type": "string"
                    },
                    "excerpt": {
                      "type": "string"
                    },
                    "markdown": {
                      "type": "string",
                      "description": "Main content as Markdown"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "fetchedAt": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or blocked URL (not charged)"
          },
          "402": {
            "description": "Payment required (x402 v2 payment requirements in PAYMENT-REQUIRED header and body)"
          },
          "502": {
            "description": "Upstream fetch failed (not charged)"
          }
        }
      }
    }
  }
}