# Doc-JSON Page Extractor

> Doc-JSON Page Extractor is a paid API for AI agents from doc-json.agent-utils.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Fetches any web page, PDF, or feed URL and returns clean structured JSON with metadata, readable text, tables, headings, schema.org JSON-LD, and link data for AI agents

## Facts

- Endpoint: GET https://doc-json.agent-utils.workers.dev/v1/page
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/doc-json-page-extractor-42cc464c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0kfAa0YzrnEMpPaCNs7Qw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability doc-json-page-extractor-42cc464c
```

Example prompt: Can you fetch https://www.bbc.com/news/technology-12345678 and give me the clean article text, headings, author, and any schema.org data from the page — cap the text at 10000 characters?

## When to prefer this

Choose this endpoint when you need to turn any arbitrary public URL — web page, PDF, or feed — into structured, AI-ready JSON in a single call with no API key setup. It is ideal for agents that need readable article text, product schema, tables, or Open Graph metadata without building a scraping pipeline. Prefer it over raw HTTP fetching when you need clean text (nav/footer stripped), structured headings, JSON-LD, and link analysis all in one response. It is pay-per-call via x402 micropayments, making it cost-effective for sporadic or high-volume use without subscription overhead.

## Known failure modes

- URL is unreachable or returns non-200 status — status field reflects actual HTTP code
- Page behind login/paywall returns only gated content
- PDF is image-only (scanned) and contains no extractable text
- Text truncated if page exceeds maxChars limit (truncated field set to true)
- Feed URL returns malformed XML, resulting in partial or empty feed items
- JavaScript-heavy SPAs may return minimal content if JS is not executed server-side

## How this service works

Web pages, PDFs and feeds turned into clean structured JSON for AI agents: metadata, schema.org data, tables, headings, readable text, per-page PDF text, feed items. Pay per call over x402, no API key.

## Output

A JSON object containing: page URL, final redirected URL, HTTP status, content type, title, author, language, canonical URL, meta tags, Open Graph data, Twitter card data, schema.org JSON-LD blocks (products, articles, events etc.), readable body text (stripped of nav/scripts/footers), word count, character count, headings with levels, up to 20 HTML tables with headers and rows, a sample of internal and external links, image count, fetch timestamp, and response time in milliseconds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "description": "Absolute http(s) URL of the page"
      },
      "maxChars": {
       "type": "integer",
       "default": 20000,
       "maximum": 200000,
       "minimum": 500,
       "description": "Cap on returned text length"
      },
      "includeText": {
       "type": "boolean",
       "default": true
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string"
      },
      "meta": {
       "type": "object",
       "additionalProperties": {
        "type": "string"
       }
      },
      "text": {
       "type": "string",
       "description": "Readable text without nav, scripts, footers"
      },
      "chars": {
       "type": "integer"
      },
      "links": {
       "type": "object",
       "properties": {
        "sample": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "href": {
            "type": "string"
           },
           "text": {
            "type": "string"
           }
          }
         }
        },
        "external": {
         "type": "integer"
        },
        "internal": {
         "type": "integer"
        }
       }
      },
      "title": {
       "type": [
        "string",
        "null"
       ]
      },
      "author": {
       "type": [
        "string",
        "null"
       ]
      },
      "images": {
       "type": "integer"
      },
      "jsonLd": {
       "type": "array",
       "items": {},
       "description": "Parsed schema.org JSON-LD blocks (products, articles, organizations, events...)"
      },
      "status": {
       "type": "integer"
      },
      "tables": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
      
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/product/42",
  "meta": {
   "viewport": "width=device-width"
  },
  "text": "Acme Widget 42\nThe 42nd widget...\nSpecifications\nWeight 1.2 kg\nColor Blue",
  "chars": 2600,
  "links": {
   "sample": [
    {
     "href": "https://example.com/product/42#specs",
     "text": "Specifications"
    }
   ],
   "external": 3,
   "internal": 34
  },
  "title": "Acme Widget 42",
  "author": null,
  "images": 6,
  "jsonLd": [
   {
    "name": "Acme Widget 42",
    "@type": "Product",
    "offers": {
     "@type": "Offer",
     "price": "19.99",
     "priceCurrency": "USD"
    }
   }
  ],
  "status": 200,
  "tables": [
   {
    "rows": [
     [
      "Weight",
      "1.2 kg"
     ],
     [
      "Color",
      "Blue"
     ]
    ],
    "caption": null,
    "headers": [
     "Spec",
     "Value"
    ]
   }
  ],
  "twitter": {},
  "finalUrl": "https://example.com/product/42",
  "headings": [
   {
    "text": "Acme Widget 42",
    "level": 1
   },
   {
    "text": "Specifications",
    "level": 2
   }
  ],
  "language": "en",
  "canonical": "https://example.com/product/42",
  "fetchedAt": "2026-09-06T21:30:00.000Z",
  "openGraph": {
   "type": "product",
   "image": "https://example.com/w42.jpg",
   "title": "Acme Widget 42"
  },
  "truncated": false,
  "wordCount": 412,
  "responseMs": 210,
  "contentType": "text/html; charset=utf-8",
  "description": "The 42nd widget.",
  "publishedAt": null
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/doc-json-page-extractor-42cc464c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from doc-json.agent-utils.workers.dev](https://www.zero.xyz/host/doc-json.agent-utils.workers.dev/llms.txt)
