# utilsforagents.com Fetch URL as Text

> utilsforagents.com Fetch URL as Text is a paid API for AI agents from utilsforagents.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Fetches a URL and returns its content as text, auto-detecting format: HTML→Markdown, JSON→formatted text, or plain/Markdown returned as-is.

## Facts

- Endpoint: POST https://utilsforagents.com/v1/text/fetch-content
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/utilsforagents-com-a2d8752d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VMbDA58ZexPF2aLCpUxx8

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 utilsforagents-com-a2d8752d -d '<json body>'
```

Example prompt: Fetch the content at https://example.com/docs/api-reference and give me back the text — I don't know if it's HTML, JSON, or plain text, just auto-detect and return it in readable form.

## When to prefer this

Use this endpoint when you need to read the content of any URL without knowing its format in advance. It is the best choice for generic web fetching where the content type may be HTML, JSON, or plain text, and you want a unified text/Markdown output without calling separate format-specific endpoints.

## Known failure modes

- URL is unreachable or returns non-2xx HTTP status — fetch fails with error
- Response exceeds 2 MB download limit — content truncated or rejected
- Remote server takes longer than 5 seconds to respond — timeout error
- URL is malformed or missing — validation error returned
- Content type is binary (e.g. PDF, image) and cannot be converted to text

## How this service works

Fetch a URL and return its text content. Auto-detects the format: HTML is converted to Markdown, JSON is returned as formatted text, and Markdown or plain text is returned as-is. Use when you need to read any URL without knowing its content type in advance. Send {"url": "https://..."}. Remote fetch timeout: 5s, max download size: 2 MB.

## Output

Returns the text content of the requested URL. HTML pages are converted to Markdown, JSON responses are returned as formatted text, and Markdown or plain text files are returned as-is. Subject to a 5-second remote fetch timeout and 2 MB download limit.

## Example request

```json
{
 "url": "https://example.com"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "URL to fetch — auto-detects HTML, JSON, Markdown, or plain text"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "markdown": "# README\n\nProject documentation...",
  "sourceUrl": "https://quotes.toscrape.com/readme.md",
  "charsAfter": 2048,
  "charsBefore": 2048,
  "detectedFormat": "markdown",
  "processingTimeMs": 85.2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/utilsforagents-com-a2d8752d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from utilsforagents.com](https://www.zero.xyz/host/utilsforagents.com/llms.txt)
