# TrustSource SafeFetch

> TrustSource SafeFetch is a paid API for AI agents from api.trustsource.cc, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Fetches a URL safely, returning sanitized page text and a prompt-injection verdict (SAFE/REVIEW/BLOCK) by detecting hidden instructions, invisible Unicode, homoglyphs, encoded payloads, and data-exfiltration bait.

## Facts

- Endpoint: GET https://api.trustsource.cc/safefetch
- 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/trustsource-safefetch-a7ed473a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1KRKd1dWemKOjORkbq1bq

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 trustsource-safefetch-a7ed473a
```

Example prompt: Before you feed the contents of https://example.com/article into your context, use SafeFetch to retrieve and scan it — I need to know whether it's SAFE, REVIEW, or BLOCK, and I want the sanitized text if it passes.

## When to prefer this

Use this endpoint whenever an AI agent needs to fetch and process content from an external URL before passing it to an LLM — especially when the URL is user-supplied, untrusted, or from an unknown source. It is the right choice over a plain HTTP fetch when prompt-injection safety matters, since it combines content retrieval, sanitization, and threat classification in one call. Prefer it over generic web-scraping APIs when you need the SAFE/REVIEW/BLOCK verdict alongside clean text, rather than raw HTML or structured data extraction.

## Known failure modes

- URL is unreachable or returns a non-200 HTTP status — endpoint may return an error or empty content
- Target page blocks crawlers (robots.txt disallowed) — content may not be retrievable
- Page is behind authentication or a paywall — sanitized text will be incomplete or empty
- Very large pages may be truncated or time out
- Dynamic JavaScript-rendered content may not be fully captured if the page requires JS execution
- Missing or malformed 'url' query parameter causes a validation error

## How this service works

Fetch a URL safely and get back sanitized, agent-ready page text plus a prompt-injection verdict (SAFE / REVIEW / BLOCK). Detects instructions hidden in markup, invisible Unicode, homoglyph and encoded payloads, delimiter spoofing and data-exfiltration bait — so an agent never ingests hostile content. Use before feeding any fetched page into an LLM.

## Output

Returns sanitized, agent-ready plain text extracted from the fetched page, along with a prompt-injection verdict of SAFE, REVIEW, or BLOCK. The verdict reflects detection of hidden markup instructions, invisible Unicode characters, homoglyph substitutions, encoded payloads, delimiter spoofing, and data-exfiltration bait. Agents can use the text only if the verdict is SAFE or acceptable under their policy.

## 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": "Full URL to fetch and scan (e.g. https://example.com/article)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/trustsource-safefetch-a7ed473a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.trustsource.cc](https://www.zero.xyz/host/api.trustsource.cc/llms.txt)
