Website Content Extractor (Text & Markdown for RAG)
Pricing
from $2.00 / 1,000 results
Website Content Extractor (Text & Markdown for RAG)
Turn any list of URLs into clean article text and markdown with metadata - title, author, dates, canonical URL and language. Reports which extraction strategy produced each row. Built for RAG and LLM pipelines.
Pricing
from $2.00 / 1,000 results
Rating
0.0
(0)
Developer
Farhan Febrian Nauval
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
16 days ago
Last modified
Categories
Features
Share
Website Content Extractor — Clean Text & Markdown for RAG
Give it a list of URLs, get back the article text, the same content as markdown, and the page's metadata: title, author, publication and modification dates, canonical URL, language, site name and social image. Built for feeding RAG indexes and LLM pipelines, where boilerplate is noise and structure is signal.
Input
| Field | Type | Default | Description |
|---|---|---|---|
urls | array | required | Pages to extract. A bare domain works — example.com → https://example.com |
includeText | boolean | true | The body as plain text |
includeMarkdown | boolean | true | The body as markdown — headings, lists, links, code fences |
includeLinks | boolean | false | Every link in the content, absolute, with anchor text |
maxCharacters | integer | — | Truncate on a word boundary; isTruncated records it |
Output
{"_input": "https://en.wikipedia.org/wiki/Retrieval-augmented_generation","_source": "S1-html","_scrapedAt": "2026-09-12T12:41:07Z","_extractedBy": "main-or-article", // ← read this; see below"url": "…", "finalUrl": "…", "redirected": false,"title": "Retrieval-augmented generation - Wikipedia","description": "…","canonicalUrl": "…","language": "en","siteName": "Wikipedia","author": "Contributors to Wikimedia projects","publishedDate": "2023-11-05T13:19:20Z","modifiedDate": "…","imageUrl": "…","isNoIndex": false,"wordCount": 2286, "charCount": 15420, "isTruncated": false,"text": "From Wikipedia, the free encyclopedia\n\nRetrieval-augmented generation (RAG) is…","markdown": "From Wikipedia…\n\n**Retrieval-augmented generation** (**RAG**) is…"}
_extractedBy is the field that matters
Four strategies are tried in order, best evidence first, and every row says which one won:
_extractedBy | What it means | Trust |
|---|---|---|
jsonld-article | The publisher's own articleBody from schema.org JSON-LD | Highest — no guessing |
main-or-article | A single <main> or <article> element | High |
densest-block | The longest text block after boilerplate removal, scored by text length over link density | Good, but a guess |
body-minus-chrome | <body> with navigation, headers, footers and banners stripped | Last resort |
That distinction is not cosmetic. On a badly built page, the bottom two strategies can return a
sidebar. If you are indexing at scale, filter on _extractedBy and treat a low wordCount from
body-minus-chrome as suspect.
A worked example from the test run: federalregister.gov returned a page titled "Request Access"
with 159 words — a bot-block notice, faithfully extracted. Nothing errored, because nothing failed;
the site simply served that. A generic extractor cannot know every block page, so the signals it
gives you are _extractedBy, wordCount and missing metadata. (Their API, incidentally, is
wide open — the block is on the website only.)
What the markdown keeps, and why text is derived from it
Markdown preserves headings, bold and italic, links with their targets, images as ,
ordered and unordered lists with nesting, blockquotes, horizontal rules and code fences with their
indentation intact — indentation is content in a code block, not formatting.
Plain text is then derived by stripping the markdown syntax, rather than read separately from the
DOM. Reading the DOM with a newline separator puts a break between every inline element: Wikipedia's
opening sentence comes out as (\nRAG\n) is a technique. Deriving from markdown keeps paragraphs
whole and guarantees both outputs describe the same content.
Tables degrade to their text on purpose. A table rendered as pipes that do not line up is worse for a retrieval index than the same table as sentences.
Errors
Every URL produces exactly one row, so a join against your input list stays aligned.
_error | Meaning |
|---|---|
invalid_input | Not a usable URL |
not_found | HTTP 404 or 410 |
not_html | A 200 whose content-type is a PDF, image or archive — a real URL, useless here |
too_large | The response exceeded 8 MB |
no_content | Fetched, but no strategy found usable text — often a client-rendered shell |
blocked | Every TLS profile was refused |
network_error | Never reached the server |
https://example.com returns no_content, correctly: the page has one sentence, below the
200-character floor that separates prose from navigation.
One note on invalid_input: because the URL field uses Apify's request-list editor, the platform
validates the shape of each entry before the run starts — a malformed entry is rejected there
with Input is not valid, not turned into a dataset row. The actor still guards against it for
programmatic callers, but from the Console or the API you will see a rejected run rather than an
error row. That is the platform doing the right thing; it is documented here so the absence of such
rows is not mistaken for the check being missing.
If no page yields content, the run fails rather than reporting success over an empty dataset.