Web Fetch for AI - URL to Markdown, Text, HTML & PDF avatar

Web Fetch for AI - URL to Markdown, Text, HTML & PDF

Pricing

from $0.95 / 1,000 pages

Go to Apify Store
Web Fetch for AI - URL to Markdown, Text, HTML & PDF

Web Fetch for AI - URL to Markdown, Text, HTML & PDF

Fetch any URL or a list of URLs as clean Markdown, plain text, HTML or links for AI agents, MCP, RAG, n8n and Make. Auto JavaScript rendering, PDF/DOCX to Markdown, token counts. Failed, blocked and 404 pages are free.

Pricing

from $0.95 / 1,000 pages

Rating

0.0

(0)

Developer

Kanto Labs

Kanto Labs

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

14 days ago

Last modified

Features

Limited permissions

Share

What is Web Fetch for AI?

Web Fetch for AI turns any URL into clean Markdown, plain text, HTML or a list of links that an LLM can read straight away. Give it one web address or a list of 1,000, and you get one tidy row per URL: the main content without menus, cookie banners or ads, plus the page title, description, language, canonical URL and a token count, so your AI agent, MCP client, RAG pipeline, n8n or Make workflow knows exactly what it is feeding the model.

It is built for agents: short inputs, predictable output, a fixed price per page, and every failure is free. That covers invalid URLs, timeouts, 404s and other error pages, blocked sites and empty pages.

What can it fetch?

  • Web pages as Markdown with headings, lists, tables, code blocks and absolute links kept.
  • JavaScript sites such as React, Vue and other single-page apps. With renderJs: auto (the default), the Actor notices an empty app shell and renders it in headless Chromium by itself. You don't need to know which sites need a browser.
  • Documents. PDF, Word (DOCX), PowerPoint (PPTX) and Excel (XLSX/XLS) links come back as Markdown. Spreadsheet tables become Markdown tables.
  • JSON, XML, CSV, plain-text and Markdown files are returned as they are (wrapped in a code fence for Markdown output).
  • Any other file (images, archives) is returned with the raw format as base64, up to 5 MB.

How to use it

  1. Put one address in URL, or many in URLs (list). Addresses without a scheme, like example.com, work. So do old http:// sites.
  2. Choose Output formats: markdown (default), text, html, links, raw.
  3. Click Start. Results appear in the Output tab and can be downloaded as JSON, CSV or Excel, or read through the API.

Optional settings: Main content only (on by default; switch it off to keep menus and footers), JavaScript rendering (auto / never / always), Wait after load in milliseconds for late content, Max tokens per page to cut long pages to fit a context window, Preferred language (Accept-Language), Timeout per URL and Parallel URLs.

How much does it cost?

You pay one Page event per URL that is delivered with content. The price is the same whether the URL is a plain page, a JavaScript page rendered in the browser, a PDF or an Office file. Apify also adds its small Actor start fee once per run.

Not charged, ever: invalid URLs, DNS errors, timeouts, redirect loops, HTTP 4xx/5xx answers (404, 403, 500...), bot-check pages, empty pages, unsupported file types, and URLs skipped because your maximum cost per run was reached. Each of these still gets a row with status, errorCode and a plain-English error, so your agent knows what happened.

Worked example: you fetch a list of 1,000 URLs. 930 return content, 40 are 404s, 20 are blocked and 10 time out. You pay for 930 Pages, and the 70 failed rows cost nothing. At $1.40 per 1,000 pages, that is $1.30 plus the start fee. Store discounts apply automatically on higher Apify plans.

Input example

{
"urls": [
"https://www.python-httpx.org/quickstart/",
"https://arxiv.org/pdf/1706.03762",
"https://react.dev/learn"
],
"formats": ["markdown", "links"],
"maxTokens": 20000
}

Output example

{
"url": "https://www.python-httpx.org/quickstart/",
"status": "ok",
"errorCode": null,
"error": null,
"title": "QuickStart - HTTPX",
"fetch": {
"loadedUrl": "https://www.python-httpx.org/quickstart/",
"loadedTime": "2026-11-06T04:42:36.406Z",
"httpStatusCode": 200,
"contentLengthBytes": 79175,
"contentType": "text/html; charset=utf-8",
"renderedWith": "http",
"viaProxy": false,
"durationMs": 183
},
"metadata": {
"canonicalUrl": "https://www.python-httpx.org/quickstart/",
"title": "QuickStart - HTTPX",
"description": "A next-generation HTTP client for Python.",
"languageCode": "en",
"author": null,
"keywords": null,
"publishedAt": null,
"openGraph": null,
"jsonLd": null,
"headers": {"content-type": "text/html; charset=utf-8"}
},
"markdown": "# QuickStart\n\nFirst, start by importing HTTPX:\n\n```\n>>> import httpx\n```\n...",
"links": ["https://www.python-httpx.org/", "https://www.python-httpx.org/advanced/clients/"],
"tokenCount": 3656,
"wordCount": 1742,
"truncated": false,
"charged": true
}

A failed URL looks like this and is free:

{"url": "https://httpbin.org/status/404", "status": "failed", "errorCode": "HTTP_404",
"error": "The website answered HTTP 404: page not found (404). Nothing was charged.", "charged": false}

Error codes: INVALID_URL, DNS_ERROR, CONNECTION_FAILED, FETCH_TIMEOUT, REDIRECT_LOOP, HTTP_<status>, BLOCKED, EMPTY_CONTENT, UNSUPPORTED_CONTENT_TYPE, RESPONSE_TOO_LARGE, DOCUMENT_UNREADABLE, RENDER_FAILED, MAX_COST_REACHED, RUN_STOPPED.

Use it from AI agents (MCP)

Add the Apify MCP server (https://mcp.apify.com) to Claude Desktop, Claude Code, Cursor or VS Code and let the agent call kantolabs/web-fetch-for-ai. The tool takes a url (one page) or urls (a list), plus optional formats and maxTokens. Each field description says when to use it, so the model fills the input correctly. The run always succeeds and returns a row per URL, including failures, so the agent never gets an empty answer.

Switching from another web fetch Actor? The url, formats (markdown, html, text, links, raw) and wait inputs mean the same thing here. The output keeps the familiar fetch and metadata objects plus one key per format.

Use it in n8n, Make and Zapier

Use the official Apify node or app. Choose Run Actor, pick kantolabs/web-fetch-for-ai, pass {"urls": [...]}, then Get dataset items and send each row's markdown to your LLM, vector database or spreadsheet. Schedule the run to watch the same pages every day.

FAQ

Does it get past bot protection and CAPTCHAs?

No, by design. It identifies itself honestly as KantoFetch, does not solve CAPTCHAs, does not log in, and does not use cookies or fingerprint tricks. When a site refuses the request, it retries once from a fresh Apify datacenter proxy IP, and from the browser when the site shows a JavaScript check. If the site still says no, you get a free BLOCKED or HTTP_403 row. Most documentation, blogs, news sites, government pages and small-business sites work. Some large retailers, social networks and paywalled news sites refuse datacenter traffic.

Why Markdown?

Markdown keeps headings, lists, tables and links but costs far fewer tokens than HTML. It is the easiest format for an LLM to read and to cite.

How big can a page be?

Responses up to 10 MB are processed. Use Max tokens per page to keep only the first N tokens. Every row reports tokenCount, so you can budget your context window.

Is it fast?

Plain pages take well under a second each after the run starts. Up to 20 URLs are fetched in parallel. JavaScript pages take a few seconds in the browser.

Fetching public pages is generally fine, but what you do with the content matters. Respect copyright, personal data rules and each site's terms.

  • Document to Markdown: convert uploaded or linked PDF, DOCX, PPTX and XLSX files with page counts and RAG chunks.
  • Website SEO Audit: an on-page SEO score and prioritised issues for any page.

Questions or a site that should work but doesn't? Open an issue on the Issues tab with the URL. We reply within a day.