Website Text Extractor - Webpage Content to Ordered Text Blocks
Pricing
from $10.00 / 1,000 pages
Website Text Extractor - Webpage Content to Ordered Text Blocks
Extract the visible text of any web page as numbered blocks in DOM order, each carrying its HTML tag. One JSON item per URL: page title, every text block, per-page counts. Batch several URLs in one run, optionally drop headers, footers and cookie banners. For translation, migration and copy audits.
Pricing
from $10.00 / 1,000 pages
Rating
5.0
(1)
Developer
My Smart Digital
Maintained by CommunityActor stats
2
Bookmarked
92
Total users
2
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Give it one or more web page URLs. For each page, the actor opens it in a real Chrome browser, lets its scripts run, scrolls to the bottom so lazy-loaded sections appear, and returns the text a visitor can see, cut into numbered blocks in the order of the page, each with the HTML tag that holds it.
One JSON item per URL: the page title, every text block and a few counts. Headers, menus, footers and cookie banners stay in by default, and each can be dropped with one switch.
What a real run returns
Run on https://www.gov.uk/vat-rates on 21 November 2026, with the three exclusion options on (excludeHeader, excludeFooter, excludeCookies). Trimmed extract, the page gave 23 blocks:
{"url": "https://www.gov.uk/vat-rates","title": "VAT rates - GOV.UK","viewport": { "width": 1920, "height": 1080 },"textBlocks": [{ "id": "block-1", "text": "Skip to main content", "order": 1, "tagName": "body", "selector": null },{ "id": "block-2", "text": "VAT rates", "order": 2, "tagName": "h1", "selector": null },{ "id": "block-3", "text": "The standard VAT rate is 20%", "order": 3, "tagName": "p", "selector": null },{ "id": "block-4", "text": "This guide is also available in Welsh (Cymraeg).", "order": 4, "tagName": "p", "selector": null },{ "id": "block-5", "text": "VAT rates for goods and services", "order": 5, "tagName": "h2", "selector": null },{ "id": "block-6", "text": "% of VAT", "order": 6, "tagName": "th", "selector": null },{ "id": "block-7", "text": "What the rate applies to", "order": 7, "tagName": "th", "selector": null },{ "id": "block-8", "text": "Standard rate", "order": 8, "tagName": "th", "selector": null },{ "id": "block-9", "text": "20%", "order": 9, "tagName": "td", "selector": null },{ "id": "block-10", "text": "Most goods and services", "order": 10, "tagName": "td", "selector": null },{ "id": "block-15", "text": "The standard rate of VAT increased to 20% on 4 January 2011 (from 17.5%).", "order": 15, "tagName": "p", "selector": null },{ "id": "block-20", "text": "Is this page useful?", "order": 20, "tagName": "h2", "selector": null },{ "id": "block-21", "text": "Yes this page is useful", "order": 21, "tagName": "li", "selector": null }],"statistics": {"totalBlocks": 23,"totalCharacters": 782,"uniqueBlocks": 23,"excludedElements": 180}}
The same page without the exclusion options returns 72 blocks and 2,009 characters: the cookie banner (5 blocks), the menu and breadcrumb (6) and the footer links (36) come back, along with 2 blocks of a related-links box that this page builds as a navigation element (see Limits).
"VAT" is an <abbr> element inside each sentence. Inline elements such as links, bold text and abbreviations stay in the block of their sentence, so a sentence comes out whole.
What you can use it for
- Translation: send each block to your translator or translation API, then put the result back at the same
order. ThetagNametells a heading from a paragraph, a table cell or a button. - Content migration: take the copy of each page of an old site to rebuild it in a new CMS.
- Copy audits and content inventories: count words per page, compare pages, find text repeated across a site.
- AI agents and language models: give them the readable text of a page without its HTML. Short timeouts are handled, see below.
How the text is read
- What is shown, not what is in the code. An element hidden with CSS (
display: none,visibility: hidden,opacity: 0) or not laid out at all is skipped: a closed menu, a hidden tab panel, a block shown only on mobile when you extract at desktop width. Two cases go the other way: the answers of a FAQ built with the native<details>element are read even when folded, and text kept on the page for screen readers only is read too (on the page above, the "Yes" button carries a hidden "this page is useful"). - One block per element that holds text of its own: a paragraph, a heading, a list item, a table cell, a button.
- Text around a block stays at its place:
Intro<p>Body</p>Outrogives three blocks,Intro,Body,Outro, in that order. - Words stay apart where the page shows them apart: a line break, an image, or an element laid out as a block or a flex item ends a word, so
21<br>November<br>2026reads21 November 2026. - Never read as text: scripts, styles,
<noscript>,<template>, SVG and canvas drawings, embedded frames (videos, maps, widgets from other sites), video and audio, and code samples (<code>,<pre>,<kbd>,<samp>). - Forms: their fields (text boxes, checkboxes, dropdowns) and the labels of those fields are left out unless
extractFormsis on. The rest of a form is read like any other text: the heading and the button of a newsletter box, the price in a product form, and the whole page of a site that wraps it in one form, as DNN, SharePoint and other ASP.NET Web Forms sites do. WithextractFormson, labels are read too, each field gives itsaria-label, its placeholder and its current value as separate blocks, and each option of a dropdown is a block. To leave a form out entirely, text included, addformtoexcludeSelectors. - Duplicates (
deduplicate, on by default): a block whose text, ignoring case, already appeared on the same page is dropped. Without the exclusion options, the topic link "VAT" at the bottom of the page above is dropped because the breadcrumb already had it. Turn the option off to keep every occurrence, for instance to put a translation back everywhere it appears. - Short blocks: blocks under
minTextLengthcharacters (3 by default) are dropped, so a lone "×" or "OK" does not come out. Set it to 1 to keep every block that holds a character.
Input
| Field | Type | Default | What it does |
|---|---|---|---|
startUrl | string | https://example.com | One page to extract |
startUrls | array | [] | More pages, one URL per line. Plain strings or { "url": "..." } objects |
viewportType | string | desktop | desktop (1920×1080), mobile (375×667), tablet (768×1024) or custom. Responsive sites show different text at different widths |
viewportWidth, viewportHeight | integer | 1920, 1080 | Window size in pixels, used only with custom |
excludeHeader | boolean | false | Hide headers and navigation, see below |
excludeFooter | boolean | false | Hide footers, see below |
excludeCookies | boolean | false | Hide cookie consent banners, see below |
excludeSelectors | array | [] | Your own CSS selectors to hide, for markup the three options do not catch |
includeSelectors | array | [] | Read only inside these CSS selectors, for example article or main. Empty: the whole page |
extractForms | boolean | false | Also read form fields: labels, placeholders, values and dropdown options |
minTextLength | integer | 3 | Shortest block kept, in characters |
deduplicate | boolean | true | Drop a block whose text already appeared on the same page |
removeEmptyBlocks | boolean | true | Drop blocks made of whitespace only |
waitForSelector | string | empty | CSS selector to wait for before reading the page. If it never appears, the page is read anyway |
waitTimeout | integer | 30000 | How long to wait for waitForSelector, in milliseconds |
The URLs of both fields are read together. Duplicates and variants of one address (a trailing slash, the letter case of the domain, a #fragment) are opened and charged once. A run started with no input at all extracts https://example.com, so the actor can be tried in one click; as soon as you give your own URLs, example.com is left out and not charged, even if it is still in startUrl.
One page:
{ "startUrl": "https://www.gov.uk/vat-rates" }
Several pages, main text only:
{"startUrls": ["https://www.gov.uk/vat-rates", "https://www.gov.uk/vat-registration"],"excludeHeader": true,"excludeFooter": true,"excludeCookies": true}
Only the body of an article:
{ "startUrl": "https://example.com/blog/my-post", "includeSelectors": ["article"] }
With several includeSelectors, blocks come selector by selector, in the order you list them, and in page order within each.
What the exclusion options hide
They work from patterns, so they need no setup on most sites, and they can catch too much on some:
excludeHeader:headerandnavelements, banner and navigation landmarks, skip links marked.skip-link, screen-reader-only text marked.screen-reader-text, common menu classes (.navbar,.main-navigation,.topbar), the header regions of WordPress, Elementor, Shopify, Drupal and Joomla, and any element whose class or id contains "header".excludeFooter:footerelements, thecontentinfolandmark, the footer regions of WordPress, Elementor, Shopify and Drupal, and any element whose class or id contains "footer".excludeCookies: the banners of Cookiebot, OneTrust, Iubenda, Didomi, Quantcast, TrustArc, Cookie Notice and cookieconsent, elements whose class or id containscookie-bannerorcookie-consent, elements whose class containsgdpr, and elements whosearia-labelmentions cookies.
statistics.excludedElements counts the elements hidden. If a block you need is missing, turn the option off and hide what you do not want with excludeSelectors.
Output
| Field | What it holds |
|---|---|
url | The URL as you gave it |
title | The page title, as the browser reads it |
viewport | The window size used, in pixels |
textBlocks[].id | block-1, block-2, and so on |
textBlocks[].text | The text of the block, whitespace folded into single spaces |
textBlocks[].order | Position on the page, from 1 |
textBlocks[].tagName | The element that holds the text, in lowercase: h1, p, li, td, button, div. Text that sits directly in <body>, like the skip link above, carries body |
textBlocks[].selector | The includeSelectors entry the block was found under, null when the whole page is read |
statistics.totalBlocks | Number of blocks |
statistics.totalCharacters | Characters across all blocks, spaces included |
statistics.uniqueBlocks | Distinct block texts, ignoring case. Equal to totalBlocks when deduplicate is on |
statistics.excludedElements | Elements hidden by the exclusion options and excludeSelectors |
Results go to the run's dataset, one item per page. In the run's Output tab they open as two tables: Pages (one row per page: its title, its number of blocks and characters, and how many elements the exclusion options hid) and Text blocks (one row per block, in page order: the page, the block's position, its tag and its text). The same tables come from the API with view=overview or view=textBlocks on the dataset items.
JSON keeps each page's blocks together. For CSV or Excel, export the Text blocks table (format=csv&view=textBlocks on the dataset items): one row per block, with its page, order, tagName, text, selector and id, ready for a translation sheet. Exported without the view, the blocks of a page spread over numbered columns (textBlocks/0/text, textBlocks/1/text, and so on). A page with no readable text has its row in Pages and none in Text blocks.
Pages that give no result
- An address that does not answer is tried three times, then named in the run's status message with the reason. No item, nothing charged.
- A page that its site turns away gives no item and is not charged: a refusal (HTTP 401, 403 or 429), or the page of an anti-bot protection served in place of the site's, whatever its status code (a Cloudflare challenge, the error page of Akamai's edge, an AWS WAF challenge, a DataDome or Imperva block). The status message names the URL and what answered. The extractor does not try to get past a protection.
- A page that loads but holds no readable text gives an item with zero blocks, and is not charged.
- A run with a short timeout (AI agents often allow 30 to 60 seconds) opens its pages in a fast mode, without the images, videos, fonts and embedded frames that never carry text, and ends on its own just before its timeout with the pages already extracted. It succeeds when it delivered at least one page, and otherwise fails with a message saying the timeout was too short, instead of being cut off without a word.
What you are charged for
Two events, at the prices shown on this page:
- Actor start: $0.02 per run at the default 1 GB of memory (one event per GB).
- Page: $0.01 per page whose text was extracted and returned with at least one block.
| Run | Cost |
|---|---|
| 1 page | $0.03 |
| 10 pages in one run | $0.12 |
| 100 pages in one run | $1.02 |
| 10 pages in 10 separate runs | $0.30 |
The start is charged once per run, so several URLs in one run cost less than one run per URL. Pages that could not be loaded, were turned away or held no readable text are not charged. Platform usage is not charged on top.
Limits
- One page per URL: the actor does not follow links or crawl a site. List each page you want, for example from your sitemap.
- It reads web pages. It is not a PDF or document extractor, and it does not read the text of images, alt text included.
- Content that only appears after a click (a "Load more" button, a tab, an accordion hidden with CSS) is not extracted: the actor scrolls, it never clicks. Scrolling goes down 40 screen heights at most, so the far end of an infinite-scroll page is not reached.
- Text inside the shadow DOM of a web component is not read.
- Code samples are dropped on purpose: on a developer documentation page, the prose comes out without its code.
excludeHeaderhides everynavelement, including navigation placed inside the content: on the page above, the related-links box went with the menu. Hide the menu withexcludeSelectorsinstead when that box matters.- Duplicates are removed within a page, not across the pages of a run.
- No proxy is used: a site that blocks automated or data-center traffic turns the extractor away. Those pages are named in the status message and not charged.
- Text comes out as the page shows it, in its own language. Nothing is translated or summarized.
Support
Open an issue on this actor's page with the run that went wrong, and we will look at it.