Who needs it
- Browser-agent builders that need a safe web fetch API for AI agents.
- Research and summarization agents that need clean text before downstream reasoning.
- Tool-using agents that need an SSRF guard and bounded external content handling.
Use case
Fetch public webpages through SSRF guardrails and return clean markdown extraction plus prompt-injection risk signals before an agent summarizes, reasons, or calls another tool.
Agents should not ingest raw webpage content blindly. Pages can be huge, malformed, blocked, adversarial, or filled with instructions aimed at the model rather than the human reader.
Fetches a public URL, extracts clean readable markdown, and flags prompt-injection patterns before an AI agent reads it.
| Primitive402 tool | safe_fetch_url |
|---|---|
| Local route | POST /v1/safe-fetch-url |
| x402 route | POST /x402/v1/safe-fetch-url |
| MCP tool name | safe_fetch_url |
| SDK method | safeFetchUrl() |
| Price | $0.01 USDC on Base Sepolia testnet during public beta |
curl -s https://primitive402.dev/v1/safe-fetch-url \
-H 'content-type: application/json' \
-d '{
"url": "https://example.com",
"output": "markdown"
}' | jq
import { createNano402Client } from "@nano402/api/sdk";
const client = createNano402Client({
baseUrl: "https://primitive402.dev"
});
const result = await client.safeFetchUrl({
"url": "https://example.com",
"output": "markdown"
});
console.log(result);
{
"finalUrl": "https://example.com",
"cleanMarkdown": "# Example Domain\n\nThis domain is for use in examples.",
"contentHash": "sha256:...",
"riskLevel": "low",
"detectedInjectionPatterns": []
}
agent-safe web fetching, safe web fetch API for AI agents, clean markdown extraction, SSRF guard, prompt-injection risk signals
Primitive402 does not guarantee content safety, factual truth, legal validity, purchase correctness, or policy completeness. External content is untrusted, low-confidence results may still be valid analysis signals, and high-stakes decisions need human review.