contextractor - Trafilatura based avatar

contextractor - Trafilatura based

Deprecated

Pricing

Pay per usage

Go to Apify Store
contextractor - Trafilatura based

contextractor - Trafilatura based

Deprecated

Extract clean, readable content . Uses Trafilatura, the top rated library, to strip away navigation, ads, and boilerplate—leaving just the text you need.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Glueo

Glueo

Maintained by Community

Actor stats

0

Bookmarked

12

Total users

1

Monthly active users

4 days ago

Last modified

Share

@contextractor/apify

Apify Actor that crawls websites and extracts main-content text.

Built on rs-trafilatura (extraction) and Crawlee (TypeScript crawler driving Playwright).

Supported output formats

txt, markdown, json, html, original (raw page HTML).

Local prerequisites

  • Rust toolchain via rustup (cargo + rustc on PATH for napi build).
  • Apify CLI ≥ 1.4 (older versions reject the modern actor.json format).
  • Node 22+, pnpm 10+.

Local development

pnpm install
pnpm --filter @contextractor/apify build
apify run # from apps/apify-actor/

Input

The full input surface is generated from the Zod 4 schema in ../../packages/schema/README.md by ../../tools/gen-input-schema/README.md; the table below is auto-rebuilt from that schema by ../../tools/gen-md-regions/.

FieldTypeDefaultDescription
startUrlsarrayrequiredURLs to extract content from
crawlerTypeenum (playwright-adaptive | playwright-firefox | playwright-chromium | cheerio)"playwright-adaptive"Browser engine or HTTP client for crawling. playwright-adaptive automatically switches between browser and HTTP client per page. cheerio uses raw HTTP only (fastest, no JS).
renderingTypeDetectionPercentageinteger10(Adaptive only) Percentage of pages on which the crawler runs a rendering-type detection probe. Higher values are more accurate but slower.
globsarray[]Glob patterns matching URLs of pages that will be included in crawling. Setting this option allows you to customize the crawling scope. For example https://{store,docs}.example.com/** lets the craw…
excludesarray[]Glob patterns matching URLs of pages that will be excluded from crawling. Note that this affects only links found on pages, but not Start URLs, which are always crawled.
linkSelectorstring""CSS selector for links to enqueue. Leave empty to disable link enqueueing.
keepUrlFragmentsbooleanfalseURL fragments (the parts of URL after a #) are not considered when the scraper determines whether a URL has already been visited. Turn this on to treat URLs with different fragments as different page…
useSitemapsbooleanfalseIf enabled, the crawler looks for sitemap.xml at the root of each start URL domain and enqueues matching URLs from it in addition to link-following.
deduplicationenum (none | url | content-hash)"url"Deduplication level applied on top of Crawlee's built-in URL deduplication. url (default): skip pages whose was already extracted, across all handler types. content-hash: also…
respectRobotsTxtFilebooleanfalseIf enabled, the crawler will consult the robots.txt file for each domain before crawling pages.
initialCookiesarrayoptionalCookies that will be pre-set to all pages the scraper opens. This is useful for pages that require login. The value is expected to be a JSON array of objects with name and value properties. For e…
customHttpHeadersobjectoptionalHTTP headers that will be added to all requests made by the crawler. This is useful for setting custom authentication headers or other headers required by the target website. The value is expected to…
maxPagesPerCrawlinteger0Maximum pages to crawl. Includes start URLs and pagination pages. The crawler will automatically finish after reaching this number. 0 means unlimited.
maxResultsPerCrawlinteger0Maximum number of results that will be saved to dataset. The scraper will terminate after reaching this number. 0 means unlimited.
maxCrawlingDepthinteger0Maximum link depth from Start URLs. Pages discovered further from start URLs than this limit will not be crawled. 0 means unlimited.
initialConcurrencyinteger0Initial number of browser pages or HTTP clients running in parallel. Crawlee auto-scales up to maxConcurrency. 0 lets Crawlee pick the default.
maxConcurrencyinteger50Maximum number of browser pages running in parallel. This setting is useful to avoid overloading target websites and getting blocked.
maxRequestRetriesinteger3Maximum number of retries for failed requests on network, proxy, or server errors.
modeenum (precision | balanced | recall)"balanced"Extraction mode. precision minimizes noise (may miss some content); recall maximizes content (may include noise); balanced is the default.
includeCommentsbooleantrueInclude HTML comments in the extracted text.
includeTablesbooleantrueInclude table content in the extracted text.
includeImagesbooleanfalseInclude image alt text and captions in the extracted text.
includeLinksbooleantrueInclude hyperlinks in the extracted text.
targetLanguagestring""Filter extracted content by language code (e.g. "en"). Leave empty to accept any language.
savearray["markdown"]Output formats to extract and save. "original" saves the raw page HTML before extraction.
saveDestinationarray["key-value-store"]Where to save extracted content. Supported by both Actor and CLI.
datasetNamestringoptionalName or ID of the dataset for storing results. Leave empty to use the default run dataset.
keyValueStoreNamestringoptionalName or ID of the key-value store for content files. Leave empty to use the default store.
requestQueueNamestringoptionalName of the request queue for pending URLs. Leave empty to use the default queue.
storeSkippedUrlsbooleanfalseIf enabled, pushes a dataset record for each URL skipped during crawling (excluded by globs, robots.txt, depth limit, or concurrency cap). Can produce high record volume — enable for auditing only.
proxyConfigurationobjectoptionalEnables loading websites from IP addresses in specific geographies and to circumvent blocking.
proxyRotationenum (recommended | per-request | until-failure)"recommended"Proxy rotation strategy. recommended automatically picks the best proxies. per-request uses a new proxy for each request. until-failure uses one proxy until it fails.
sessionPoolNamestringoptionalName for a persistent, shared session pool. Sessions (IP + cookies) are saved under this key and reused across Actor runs. Useful when proxies are frequently blocked — previously working sessions are…
maxSessionRotationsinteger10Maximum number of session (IP + browser fingerprint) rotations per request on block detection. Independent of maxRequestRetries. Set to 0 to disable session rotation.
pageLoadTimeoutSecsinteger60Maximum time to wait for page load in seconds
blockMediabooleanfalseBlock loading of images, stylesheets, fonts (.woff), PDFs, and ZIPs. Reduces bandwidth and speeds up crawling. Has no effect when using the raw HTTP crawler type or non-Chromium browsers (Chromium on…
waitForSelectorstring""Wait for this CSS selector to appear before extracting content. The request fails and is retried if the selector does not appear within the timeout. Leave empty to disable.
softWaitForSelectorstring""Wait for this CSS selector to appear before extracting content. Unlike waitForSelector, the request continues even if the selector does not appear within the timeout. Leave empty to disable.
dynamicContentWaitSecsinteger0Maximum seconds to wait for dynamic page content to load after navigation. The crawler continues when the network goes idle or this timeout elapses, whichever comes first. 0 disables this wait. Also…
waitUntilenum (load | domcontentloaded | networkidle | commit)"load"When to consider navigation finished. networkidle waits for 500ms of network silence (best for JS-heavy SPAs, slower); load waits for the load event (default, good for most articles); domcontentloade…
headlessbooleantrueRun browser in headless mode
ignoreCorsAndCspbooleanfalseIgnore Content Security Policy and Cross-Origin Resource Sharing restrictions. Enables free XHR/Fetch requests from pages.
closeCookieModalsbooleantrueAutomatically dismiss cookie consent modals with Ghostery-based blocking.
maxScrollHeightPixelsinteger5000Maximum pixels to scroll down the page until all content is loaded. Setting to 0 disables scrolling.
userAgentstring""Custom User-Agent string for the browser. Leave empty to use the default browser User-Agent.
ignoreSslErrorsbooleanfalseIgnore SSL certificate errors. Use at your own risk.

Output

Successful dataset entries include status: 'success' together with loadedUrl, loadedAt, httpStatus, metadata (title, author, publishedAt, description, siteName, lang), and originalHash (32-char MD5 hex of the raw HTML, always present). Failed requests are stored as status: 'failed' records after retries are exhausted, and skipped URLs can be recorded as status: 'skipped' when storeSkippedUrls is enabled.

When saveDestination includes dataset: each enabled format (markdown, txt, json, html) appears as an inline string alongside a {format}Hash field (e.g. markdownHash) containing its 32-char MD5 hex.

When saveDestination includes key-value-store (default): each enabled format appears as a ContentInfo object (hash, length, key, url); raw HTML is stored under {hash}-original.html when save includes "original".