Home / Actors / Safe Fetch

LiveAI tools · Security

Safe Fetch

Fetch a page as clean Markdown for your AI agent, with hidden text and invisible Unicode removed and a prompt-injection risk score.

Try it on Apify ↗Download sample ↓How-to guidesRate it on Apify ↗

Downloads each URL and converts it to Markdown while removing content a human cannot see but an AI can read: display:none text, white-on-white text, off-screen and zero-size text, HTML comments, CSS-class-hidden blocks, invisible Unicode and ASCII smuggling with tag characters.

Returns a 0-100 risk score and a list of suspicious fragments, including instruction-like phrases aimed at AI agents.

What it is for

  • Drop-in replacement for a plain web fetch step in RAG and browsing agents.
  • Screen pages before an agent with tools or credentials reads them.
  • Audit your own site or partners' pages for hidden instructions aimed at AI crawlers.
  • Log suspicious fragments per page for a security review.

Input

The input is a small flat JSON. Only channels, or the first field, is required.

FieldTypeDescription
urlsarrayPublic http(s) pages to fetch.
respectRobotsbooleanSkip URLs disallowed by the site's robots.txt for this crawler.
includeFindingsbooleanReturn the list of suspicious fragments with the reason (hiding technique) and matched phrase types.
maxCharsnumberTruncate the Markdown to this many characters. 0 means no limit.
input.json
{
  "urls": [
    "https://example.com/"
  ],
  "respectRobots": true,
  "includeFindings": true
}

Output

One dataset item per result. This is real output from a real run.

Real output
{
  "type": "page",
  "url": "https://example.com/",
  "status": "ok",
  "blocked": false,
  "title": "Example Domain",
  "riskScore": 0,
  "riskLevel": "none",
  "findingsCount": 0,
  "hiddenTextRemoved": 0,
  "invisibleUnicodeRemoved": 0,
  "markdown": "This domain is for use in documentation examples without needing permission...",
  "chars": 156,
  "findings": []
}

Pricing

$8.00 per 1,000

Pay per event: you are charged only for results returned. Filtered-out items and failed lookups are free. Apify also lets you set a maximum cost per run.

Pricing →

Need something custom? →

How to fetch pages for AI without hidden text →

Compare with other Actors on the Store →

Limits and good to know

  • It does not guarantee a page is safe: it catches common hiding techniques and instruction-like phrases. Treat the score as a signal, not a guarantee.
  • It does not run JavaScript, so pages that render client-side may return little text.
  • Sites with anti-bot protection are returned as blocked: the Actor does not bypass them and uses no proxies.
  • Articles that discuss prompt injection contain the same phrases and can be flagged as medium risk.

Questions

Does it guarantee a page is safe?

No. It catches common hiding techniques and instruction-like phrases. New techniques appear constantly; treat the score as a signal, not a guarantee, and keep least-privilege on your agents.

Why are some quoted phrases flagged?

Articles that discuss prompt injection contain the same phrases. Those are reported as visible-injection-phrase (medium) and kept in the text unless redactVisible is on.

What about sites with anti-bot protection?

They are returned as blocked. The Actor does not bypass protections and uses no proxies. It also does not run JavaScript, so pages that render client-side may return little text.

Rate it on Apify

Used it? A rating or review on Apify helps other people judge it, and tells us what to fix.

Rate it on Apify ↗