# AgentWork Web Fetch — URL to Markdown (Batch, JS Rendering)

> AgentWork Web Fetch — URL to Markdown (Batch, JS Rendering) is a paid API for AI agents from api.agentwork.run, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-10).

Fetches a public URL and returns its content as clean text or markdown, with optional JavaScript rendering and CSS selector targeting.

## Facts

- Endpoint: GET https://api.agentwork.run/v1/web/fetch?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentwork-web-fetch-url-to-markdown-batch-js-rendering-a6ed8175
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6koL5Bsr0Z528EPEOJihU

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 agentwork-web-fetch-url-to-markdown-batch-js-rendering-a6ed8175
```

Example prompt: Fetch the content of https://docs.openai.com/api-reference and return it as markdown so I can read through the API reference — render JavaScript if needed.

## When to prefer this

Choose this endpoint when you need to fetch a single public URL and convert it to clean text or markdown for LLM consumption, especially when the target page uses JavaScript rendering. It is ideal for RAG ingestion pipelines, one-off research tasks, and agent workflows that need webpage content without managing browser infrastructure. Prefer this over the change-monitoring sibling when you want raw content rather than diffs, and over the PDF-extraction sibling when the target is an HTML page rather than a PDF document. The x402/USDC pay-per-call model makes it attractive for agents that need web access without API key management.

## Known failure modes

- URL is not publicly accessible or requires authentication — returns an error or empty content
- JavaScript rendering timeout for very complex SPAs
- Content exceeds max_chars limit — response will be truncated with truncated: true flag
- PDF or binary content served at URL instead of HTML — may return empty or garbled text
- DNS resolution failure or network timeout for the target URL
- Rate limiting or bot protection (e.g. Cloudflare) on the target site blocking the fetch

## How this service works

Web read / URL to markdown (batch, JavaScript rendering), PDF text extraction and website change monitoring for agents. From $0.003 per URL on Base. x402 USDC, no API key.

## Output

Returns a JSON object containing: the extracted page text or markdown (up to 60,000 characters), the page title, the final URL after any redirects, the HTTP status code from the origin server, content-type header, a SHA-256 hash of the extracted text (useful for change detection), a timestamp of when the page was fetched, a boolean indicating whether JavaScript rendering was used, a truncated flag if the content exceeded the character limit, and any warnings encountered during fetch.

## 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",
       "description": "Public HTTP/HTTPS URL (URL-encoded)"
      },
      "format": {
       "enum": [
        "text",
        "markdown"
       ],
       "type": "string"
      },
      "selector": {
       "type": "string",
       "maxLength": 300
      },
      "max_chars": {
       "type": "integer",
       "maximum": 60000,
       "minimum": 1000
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "url": "https://example.com/",
  "text": "Example Domain\nThis domain is for use in illustrative examples.",
  "title": "Example Domain",
  "warnings": [],
  "final_url": "https://example.com/",
  "truncated": false,
  "characters": 62,
  "fetched_at": "2026-10-09T00:00:00Z",
  "text_sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "content_type": "text/html",
  "source_status": 200,
  "javascript_rendered": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentwork-web-fetch-url-to-markdown-batch-js-rendering-a6ed8175/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentwork.run](https://www.zero.xyz/host/api.agentwork.run/llms.txt)
