Website Content Extractor (Text & Markdown for RAG) avatar

Website Content Extractor (Text & Markdown for RAG)

Pricing

from $2.00 / 1,000 results

Go to Apify Store
Website Content Extractor (Text & Markdown for RAG)

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

Farhan Febrian Nauval

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 days ago

Last modified

Categories

Features

Limited permissions

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

FieldTypeDefaultDescription
urlsarrayrequiredPages to extract. A bare domain works — example.com → https://example.com
includeTextbooleantrueThe body as plain text
includeMarkdownbooleantrueThe body as markdown — headings, lists, links, code fences
includeLinksbooleanfalseEvery link in the content, absolute, with anchor text
maxCharactersinteger—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:

_extractedByWhat it meansTrust
jsonld-articleThe publisher's own articleBody from schema.org JSON-LDHighest — no guessing
main-or-articleA single <main> or <article> elementHigh
densest-blockThe longest text block after boilerplate removal, scored by text length over link densityGood, but a guess
body-minus-chrome<body> with navigation, headers, footers and banners strippedLast 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 ![alt](src), 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.

_errorMeaning
invalid_inputNot a usable URL
not_foundHTTP 404 or 410
not_htmlA 200 whose content-type is a PDF, image or archive — a real URL, useless here
too_largeThe response exceeded 8 MB
no_contentFetched, but no strategy found usable text — often a client-rendered shell
blockedEvery TLS profile was refused
network_errorNever 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.