# AgentRead Structured Web Extraction API

> AgentRead Structured Web Extraction API is a paid API for AI agents from agentread.omar-cv.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-03).

Fetches a public URL and returns clean, structured Markdown content with metadata, headings, and links — optimized for AI agent consumption, billed per successful extraction via x402.

## Facts

- Endpoint: POST https://agentread.omar-cv.workers.dev/v1/extract/structured?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentread-structured-web-extraction-api-94789589
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__sIe83DHPSlj8E5DWCEkz

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 agentread-structured-web-extraction-api-94789589 -d '<json body>'
```

Example prompt: Can you fetch the content from https://techcrunch.com/2024/01/15/openai-announcement/ and give me the clean readable text — include the links and cap it at 50000 characters?

## When to prefer this

Choose this endpoint when an AI agent needs clean, LLM-ready Markdown from an arbitrary public URL without writing a custom scraper. It is ideal for single-URL extraction tasks where structured metadata (title, headings, links) is needed alongside body text. Prefer this over raw HTTP fetch when HTML cleaning, Markdown conversion, and per-field metadata are required. The x402 micropayment model means you only pay for successful extractions, making it cost-efficient for intermittent use without subscriptions.

## Known failure modes

- Non-public or credential-protected URLs return an error or empty extraction
- URLs with IP literals or non-default ports are rejected by schema validation
- Pages with heavy JavaScript rendering may return incomplete content via the 'lite' extraction method
- Very large pages truncated at maxCharacters limit — truncated flag set to true
- Network timeouts or unreachable hosts result in failed extraction (no charge)
- 402 payment required if x402 PAYMENT-SIGNATURE header is missing or invalid

## How this service works

Clean web content for AI agents, paid per request via x402. Paid endpoints return HTTP 402 with x402 v2 payment requirements; retry with a `PAYMENT-SIGNATURE` header produced by an x402 client (e.g. @x402/fetch). Only successful extractions are settled.

## Output

Returns a JSON object containing: cleaned Markdown body text, page metadata (title, byline, language, site name, description, canonical URL, published time), a list of headings, a list of hyperlinks, the final resolved URL after redirects, and extraction stats (word count, character count, duration, HTTP status, content type, bytes fetched, method used, warnings). Indicates whether content was truncated.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "maxLength": 2048,
   "minLength": 1,
   "description": "Absolute public http:// or https:// URL. Default ports only; no credentials; no IP literals."
  },
  "includeLinks": {
   "type": "boolean",
   "description": "Keep hyperlinks and images in the Markdown (default true). When false, link text is kept as plain text."
  },
  "maxCharacters": {
   "type": "integer",
   "maximum": 100000,
   "minimum": 100,
   "description": "Maximum Markdown characters to return (default 20000, max 100000)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "links": [],
  "finalUrl": "https://example.com/",
  "headings": [],
  "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.",
  "metadata": {
   "title": "Example Domain",
   "byline": null,
   "language": "en",
   "siteName": null,
   "description": null,
   "canonicalUrl": null,
   "publishedTime": null
  },
  "operation": "extract_url_structured",
  "truncated": false,
  "extraction": {
   "words": 25,
   "method": "lite",
   "charset": "utf-8",
   "warnings": [],
   "redirects": 0,
   "characters": 156,
   "durationMs": 140,
   "statusCode": 200,
   "contentType": "text/html",
   "bytesFetched": 577,
   "totalCharacters": 156
  },
  "requestedUrl": "https://example.com/",
  "schemaVersion": "1.0",
  "linksTruncated": false,
  "headingsTruncated": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentread-structured-web-extraction-api-94789589/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentread.omar-cv.workers.dev](https://www.zero.xyz/host/agentread.omar-cv.workers.dev/llms.txt)
