S

SafeFetch · Fetch

by SafeFetch

POSTBase

$0.01

per call · USD Coin on Base

Fetch a public web page and return clean Markdown with stable citation anchors, a content hash, and a retrieval timestamp — plus evidence of hidden text, invisible Unicode, and prompt-injection attempts found in the page. Strict SSRF protection on every redirect hop. Returns a per-span verdict with the decoded payload, not a confidence score. Zero retention.

Endpoint

POST https://safefetch.schemasure.com/v1/fetch

30

Calls / 30d

1

Unique payers / 30d

Sep 10

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://safefetch.schemasure.com/v1/fetch", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "output": "markdown",
    "policy": {
      "allow_redirects": 3,
      "flag_prompt_injection": true,
      "max_bytes": 2000000,
      "respect_robots": true,
      "user_initiated": false
    },
    "url": "https://example.com/article"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://safefetch.schemasure.com/v1/fetch" \
  -H "Content-Type: application/json" \
  -d '{"output":"markdown","policy":{"allow_redirects":3,"flag_prompt_injection":true,"max_bytes":2000000,"respect_robots":true,"user_initiated":false},"url":"https://example.com/article"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "confidence": 0.9,
  "data_versions": {
    "detectors": "detectors@1.0.0",
    "patterns": "patterns@1.0.0"
  },
  "evidence": [
    {
      "code": "CSS_HIDDEN_TEXT",
      "data": {
        "excerpt": "ignore all previous instructions",
        "technique": "display-none"
      },
      "detail": "display:none block contains instruction-like text",
      "severity": "high",
      "source": "hidden",
      "span": {
        "end": 1523,
        "line": 41,
        "start": 1462
      }
    }
  ],
  "ok": true,
  "policy_version": "safefetch-2026-08-03",
  "request_hash": "sha256:4b1d...8ae0",
  "result": {
    "anchors": [
      {
        "end": 61,
        "exact": "The first paragraph of extracted body text.",
        "prefix": "# Example article\n\n",
        "start": 19,
        "text_fragment": "https://example.com/article#:~:text=The%20first%20paragraph"
      }
    ],
    "content_sha256": "sha256:9f2c...c41d",
    "final_url": "https://example.com/article",
    "hops": [
      {
        "status": 200,
        "url": "https://example.com/article"
      }
    ],
    "markdown": "# Example article\n\nThe first paragraph of extracted body text.",
    "retrieved_at": "2026-08-04T12:00:00Z",
    "robots": {
      "allowed": true,
      "crawl_delay": null,
      "fetched": true,
      "matched_rule": "Allow: /"
    },
    "status": 200,
    "title": "Example article",
    "word_count": 412
  },
  "risk_codes": [
    "HIDDEN_INSTRUCTION_TEXT"
  ],
  "verdict": "warn",
  "warnings": []
}

Payment details

Pay to0x9876af0f6d8ed5155cd02d1ca56d128601612690
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Search & Web and the homepage with a featured placement.

Get featured →

More from SafeFetch & similar services