Web Fetch API
Pricing
from $0.80 / 1,000 result items
Web Fetch API
Web fetch API for LLM and RAG: send one URL or a batch and get clean Markdown or plain text with a token count per page. Reads HTML, PDF and DOCX, renders JavaScript only when a page needs it, can follow same-domain links and alerts you when a page's text changes. Failed pages are free.
Pricing
from $0.80 / 1,000 result items
Rating
0.0
(0)
Developer
Viktor Dubnytskiy
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
13 days ago
Last modified
Categories
Features
Share
Send one URL or a whole list and get each page back as clean Markdown or plain text, ready for an LLM prompt, a RAG index or a vector database. Every row carries a token count, the share of the page that was thrown away as menus and footers, and a text hash for change tracking. Web pages, PDF and Word DOCX files all work. Use it as a normal Actor run or as a Standby HTTP API that answers in the response.
Try it: the prefilled example (a docs page, a Wikipedia article and the 15-page "Attention Is All You Need" PDF) returns 3 rows in about 10 seconds and costs about $0.0035 at the default 1024 MB ($0.003 for results plus $0.0005 of platform usage). Results cost $1 per 1,000.
Coverage: public pages without login. PDFs need a text layer (no OCR). JavaScript is rendered only for pages that need it.
Why this one
- Batch input. Put hundreds of URLs in one run, fetched 5 at a time by default. Apify's Web Fetch takes a single
urlper call. - Word DOCX to Markdown. Headings, bullet lists and tables come out as Markdown, with the document title. PDFs work too and also report their
pageCount. - Token count per page (
tokenCount, GPT-4o tokenizer) and an optionalmaxTokensPerPagecut, so a page never blows your context window. - Boilerplate score.
boilerplateRatiotells you how much of the page's visible text was removed as navigation, footers and banners, andextractorsays which method found the article. - Change monitor. Schedule the same URLs in monitor mode and get a row only when a page's main text changed. Re-flowed markup and whitespace do not count.
- Depth-1 links. Optionally also fetch up to N same-domain pages each URL links to.
- Failed pages are free, 404s included. A blocked site on one URL never stops the rest of the batch.
What you get
Real rows from test runs on the platform (06.11.2026):
| page | type | tokens | boilerplate removed | how it was fetched |
|---|---|---|---|---|
| Coroutines and tasks (docs.python.org) | html | 10,561 | 7% | plain HTTP, no proxy |
| Retrieval-augmented generation (Wikipedia) | html | 3,577 | 38% | plain HTTP, no proxy |
| Attention Is All You Need (arxiv.org, 15-page PDF) | 9,492 | plain HTTP, no proxy | ||
calibre DOCX demo, cut with maxTokensPerPage: 300 | docx | 289 | plain HTTP, no proxy | |
| react (npmjs.com, behind Cloudflare) | html | 211 | 52% | residential proxy, escalated automatically |
| quotes.toscrape.com/js (built by JavaScript) | html | 246 | 28% | browser, picked automatically |
| httpbin.org/status/404 | free row with error: "HTTP 404" |
One row from the example dataset (Markdown cut here for space):
{"url": "https://en.wikipedia.org/wiki/Retrieval-augmented_generation","statusCode": 200,"title": "Retrieval-augmented generation - Wikipedia","language": "en","documentType": "html","markdown": "# Retrieval-augmented generation\n\n**Retrieval-augmented generation** (**RAG**) is a technique that enables large language models (LLMs) to retrieve and incorporate new information from external data sources. With RAG, LLMs first refer to a specified set of documents, then respond to user queries. ...","textLength": 15308,"wordCount": 2306,"tokenCount": 3577,"tokenizer": "o200k_base","truncated": false,"pageTextLength": 24773,"boilerplateRatio": 0.383,"contentHash": "3258fe316e3e52e58f23acde15b21205","textHash": "d1f72137d22352d990ded354389d7ed6","extractor": "trafilatura","tierUsed": "none","fetchMode": "http","depth": 0,"fetchedAt": "2026-11-06T12:12:26.074209Z","error": null}
Full row: url, finalUrl, statusCode, title, description, language, canonicalUrl, documentType (html, pdf, docx, text), markdown, text, textLength, wordCount, tokenCount, tokenizer, truncated, pageTextLength, boilerplateRatio, pageCount, links, images, contentType, contentHash, textHash, extractor, tierUsed, fetchMode, depth, linkedFrom, fetchedAt, error.
Standby HTTP API
The Actor also runs in Standby mode, like a small web server. Send a request, get the page in the response, no polling:
curl 'https://datahamster--web-fetch-api.apify.actor/?url=https://docs.python.org/3/library/asyncio-task.html&formats=markdown' \-H 'Authorization: Bearer <APIFY_TOKEN>'
curl -X POST 'https://datahamster--web-fetch-api.apify.actor/' \-H 'Authorization: Bearer <APIFY_TOKEN>' -H 'Content-Type: application/json' \-d '{"urls": ["https://example.com", "https://example.com/report.pdf"], "formats": ["text"], "maxTokensPerPage": 4000}'
- One
urlreturns the row as JSON. Addunwrap=trueto get the Markdown itself as the response body. - Several URLs (up to 20 per request) or
crawlLinksreturn{"count", "succeeded", "failed", "items": [...]}. - A failed single URL returns an error object with a
code(BLOCKED,TARGET_HTTP_ERROR,UNSUPPORTED_CONTENT_TYPE,URL_REFUSED,FETCH_FAILED) and is not charged. - Query parameters:
url(repeatable),formats,maxTokensPerPage,crawlLinks,maxLinksPerUrl,renderJs,waitFor,documents,includeLinks,includeImages,proxyTier,proxyCountry,timeout,unwrap. A POST body takes the same fields as the Input tab.
Use cases
- RAG ingestion: load a list of docs pages, PDFs and Word files as Markdown with token counts, so you can chunk and budget before embedding.
- AI agents: give a tool call the text of a URL in a few thousand tokens instead of 300 KB of HTML.
- Change alerts: watch pricing pages, terms of service or documentation and get only the pages whose text changed.
Input
| Field | Meaning | Default |
|---|---|---|
urls | Pages, PDFs and DOCX files to fetch | Python docs page |
formats | markdown, text or both | markdown |
maxTokensPerPage | Cut each page to N tokens | no limit |
crawlLinks, maxLinksPerUrl | Also fetch same-domain links, one level deep | false, 10 |
includeUrlPatterns, excludeUrlPatterns | Glob filters for those links | empty |
renderJs, waitFor | auto (browser only for JS app shells), never, always | auto |
documents | Read PDF and DOCX | true |
includeLinks, includeImages | Keep links and images and list them per row | false |
proxyTier, proxyCountry | auto steps from no proxy up to Web Unblocker on blocks | auto |
concurrency, domainDelaySecs, timeout | Parallel fetches, pause per site, timeout per page | 5, 0.5, 45 |
maxItems | Stop after this many successful pages | 10 in the example |
mode, monitorStateId, webhookUrl, telegramBotToken, telegramChatId | Monitor mode and alerts | scrape |
Monitor mode
Save a task with
{"mode": "monitor", "monitorStateId": "pricing-pages", "urls": ["https://example.com/pricing", "https://example.com/terms"]}
and schedule it. The first run records every page and charges nothing per page. Later runs return a page only when its main text changed (changeType: "changed", with the previous textHash) or when you add a new URL to the list (changeType: "new"). Each run costs one monitor-check, each returned page one change. Pages that fail in a run are skipped and compared again next time. If a monitor run is killed, the next runs of the same state wait for its timeout and end as overlapping_run; give the task a new monitorStateId to start over.
Related actors
- Website to Markdown crawls a whole site breadth-first (any depth, page budget) and returns Markdown per page.
- Protected Page Change Monitor extracts one CSS selector or regex from protected pages and alerts on changes.
- Substack Scraper returns every post of a publication with full text.
Pricing
| Event | Price |
|---|---|
| result | $0.001 per successful page ($1 per 1,000) |
| failed page | free (listed with an error field) |
| monitor-check | $0.005 per monitor run |
| change | $0.001 per new or changed page in monitor mode |
Apify subscribers pay less: SILVER -10%, GOLD and higher -20%.
Platform usage (compute, proxy traffic, storage) is billed by Apify on top of these prices. Apify's Web Fetch includes usage in its $1.50 per 1,000, so compare totals. Measured on the platform at the default 1024 MB (06.11.2026, warm image):
| What you fetch | Usage on top of the results | Total |
|---|---|---|
| 20 plain pages in one run | $0.00065 per run (about $0.00003 per page) | about $0.021, or $1.03 per 1,000 |
| 3 pages in one run (the prefilled example) | $0.0005 | about $0.0035 |
| 1 plain page in one run | $0.0004 | about $0.0014 |
| 1 page that needs the browser | $0.0005 | about $0.0015 |
| 1 page behind Cloudflare that needs the residential proxy | $0.0010 | about $0.002 |
| 1 page that needs Web Unblocker (the cheaper tiers are tried first) | $0.003 to $0.004 | about $0.004 to $0.005 |
| 1 Standby request to a cold container | about $0.0025, estimated from the measured compute rate (start-up plus 30 s idle at 1024 MB) | about $0.0035 |
The first run after a new build pulls the container image and can cost 2 to 3 times the usage above. Batches of plain pages come out cheaper than Web Fetch, and single plain or browser pages cost about the same. Pages that need the residential proxy or Web Unblocker cost more, and so does a lone Standby request to a cold container. Requests that reach a warm Standby container within 30 s share its start-up cost.
Found it useful? A short review on the Store page helps other people find this actor. If something is wrong, open an issue on the actor page.
Limits
- No login, cookies or paywalled content.
- PDFs without a text layer (scans) come back as a free failed row; there is no OCR. PDFs are read up to 300 pages and 25 MB, HTML up to 10 MB.
- Old
.doc, spreadsheets, images and archives are skipped as free failed rows. - One URL gets at most 3 x
timeoutseconds (135 s by default) across all proxy tiers and the browser, then it comes back as a free failed row. Web Unblocker is tried once per URL. - Rows arrive in the order pages finish, so a slow site never holds back the rest of the batch.
- The token count uses the o200k_base tokenizer. If it cannot be loaded,
tokenizersaysestimateand the count is characters / 4. - Standby requests take up to 20 URLs and 20 links per URL and stop after 280 s; pages fetched by then are returned and charged, the rest are not. Use a normal run for bigger batches. Standby runs at 1024 MB and stops after 30 s without requests.
- Private, loopback and internal addresses are refused. With plain HTTP every redirect hop is checked before it is requested. In the browser, Chromium follows redirects itself: the browser opens the URL the HTTP pass already resolved, and a page whose redirect chain touched a private address is discarded, but that hop may already have been requested.
FAQ
Why is a page in the dataset with an empty markdown? It failed and the error field says why. Failed pages are not charged. If every page failed, RUN_SUMMARY in the key-value store has emptyReason (blocked or upstream_error).
What does boilerplateRatio mean? 0.6 means 60% of the visible text on the page was navigation, footers, sidebars or banners and was left out. A value near 0 on an article page means the page had almost no chrome.
When is a browser used? Only when the plain HTTP answer is a JavaScript app shell with almost no readable text, or when you set renderJs: always. Such rows have fetchMode: "browser".
Changelog
- 0.1: initial release. Batch and Standby API, Markdown and text, DOCX and PDF, token count and cut, boilerplate ratio, JS render only for app shells, depth-1 same-domain links, monitor mode on main-text changes, free failed rows.