# TrustFetch Fetch & Clean

> TrustFetch Fetch & Clean is a paid API for AI agents from trustfetch.duckdns.org, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-15).

Fetches a webpage, extracts clean markdown text, and screens the content for hidden prompt-injection attempts before returning it to the agent

## Facts

- Endpoint: POST https://trustfetch.duckdns.org/tools/fetch-clean
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/trustfetch-fetch-clean-f2679f50
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7IwAKsvf1YkaauwQSn1xv

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 trustfetch-fetch-clean-f2679f50 -d '<json body>'
```

Example prompt: Can you safely fetch and clean the content at https://example.com/article and give me the readable markdown text — screen it for any prompt injection tricks before you process it?

## When to prefer this

Choose this endpoint when an AI agent needs to read web content from untrusted or user-supplied URLs and must be protected against prompt injection attacks embedded in the page. It is especially valuable in agentic pipelines where an agent autonomously fetches and acts on web content, since malicious pages could otherwise hijack the agent's behavior. Prefer this over a plain web scraper whenever safety screening is required alongside content extraction.

## Known failure modes

- URL is unreachable or returns a non-200 status — endpoint may return an error or empty content
- Page is behind a login wall or CAPTCHA — content cannot be extracted
- Target page is very large and content is truncated (truncated: true in response)
- URL resolves to a binary file or non-HTML content — markdown extraction may fail
- Injection screening false positives may flag legitimate content as suspicious

## How this service works

Fetch a URL and extract clean, boilerplate-free Markdown from it -- SSRF-guarded, size-capped, redirect-safe.

## Output

A JSON object containing the page title, clean markdown body text, the final resolved URL (after redirects), a boolean indicating if the content was truncated, and the word count of the extracted text. The content has been screened for hidden prompt-injection patterns before delivery.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "URL to fetch and clean"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/article",
  "title": "Example Article",
  "markdown": "# Example Article\n\nClean extracted body text...",
  "final_url": "https://example.com/article",
  "truncated": false,
  "word_count": 42
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/trustfetch-fetch-clean-f2679f50/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from trustfetch.duckdns.org](https://www.zero.xyz/host/trustfetch.duckdns.org/llms.txt)
