# Smart Article Extractor - Clean Text, Markdown & Metadata (`consequential_programmer/article-text-extractor`) Actor

Extract clean article text, title, author, date, main image, word count and language from any URL. Optionally crawl a site for article links. Markdown output ready for AI and RAG. Fast HTTP, no browser, no proxy. Failed pages are free. From $1.20 per 1,000 articles.

- **URL**: https://apify.com/consequential_programmer/article-text-extractor.md
- **Developed by:** [Nirajan Prasai](https://apify.com/consequential_programmer) (community)
- **Categories:** AI, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 articles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Smart Article Extractor - Clean Text, Markdown & Metadata

**Smart Article Extractor** turns any article URL into **clean text and Markdown**, with **title, author, publish date, main image, word count and language**. Menus, ads, cookie banners and footers are stripped. Give it a list of URLs, or turn on **crawl** to discover article links from a homepage, blog index, RSS feed or sitemap.

It is fast (plain HTTP, no browser, no proxy and no login) and **priced about 40% below the typical Apify article extractor: $1.20 per 1,000 articles**. Failed, blocked or non-article pages are never charged.

### What can this article text extractor do?

- 📄 **Clean article text** — main body only, boilerplate removed (Mozilla-style readability via Trafilatura)
- ✍️ **Metadata**: title, author, publish date, description, site name, main image, word count, language
- 📝 **Markdown output** for AI, LLM prompts and RAG pipelines (headings and lists preserved)
- 🔗 **Bulk URLs** — paste a list and extract them in parallel
- 🕸️ **Optional site crawl** — discover article links on the same site from RSS/Atom feeds, sitemaps and on-page links
- 🚫 **No charge on failures** — paywalls, bot walls, empty pages and non-articles are skipped
- ⚡ **Fast HTTP** — no headless browser, no proxy required
- 🎚️ Caps on article count, word-count threshold, text length and concurrency so spend stays predictable

### Why extract article text?

- **AI / LLM / RAG pipelines** — feed clean Markdown or text into agents, summarizers and vector databases
- **Content monitoring & research** — archive news, blogs and docs without the surrounding chrome
- **SEO & content analysis** — titles, dates, word counts and language at scale
- **Training and evaluation datasets** — consistent article records from mixed publishers
- **Media monitoring** — pull the actual story, not just the URL

### How to use it

1. Paste one or more **article URLs** (or a site / blog homepage).
2. Optionally turn on **Crawl site for articles** to discover more links on the same site.
3. Choose **plain text**, **Markdown**, or **both**.
4. Click **Start** and download results as JSON, CSV, Excel, XML or HTML — or use the API, webhooks, Zapier, Make, n8n or Google Sheets integrations.

### Input example

Extract specific articles:

```json
{
  "urls": [
    "https://blog.cloudflare.com/introducing-cloudflare-radar/",
    "https://idlewords.com/2010/03/scott_and_scurvy.htm"
  ],
  "outputFormat": "both",
  "maxArticles": 10
}
```

Discover and extract articles from a blog:

```json
{
  "urls": ["https://blog.cloudflare.com/"],
  "crawl": true,
  "sameDomainOnly": true,
  "maxCrawlPages": 3,
  "maxArticles": 20,
  "outputFormat": "markdown"
}
```

### Output example

```json
{
  "url": "https://blog.cloudflare.com/introducing-cloudflare-radar/",
  "finalUrl": "https://blog.cloudflare.com/introducing-cloudflare-radar/",
  "domain": "blog.cloudflare.com",
  "title": "Introducing Cloudflare Radar",
  "author": "John Graham-Cumming",
  "date": "2020-09-30",
  "description": "Cloudflare Radar is a new hub that showcases global Internet traffic insights.",
  "image": "https://blog.cloudflare.com/cdn-cgi/image/.../radar-hero.png",
  "siteName": "The Cloudflare Blog",
  "language": "en",
  "text": "Today we are launching Cloudflare Radar, a hub that showcases global Internet traffic insights...",
  "markdown": "Today we are launching **Cloudflare Radar**, a hub that showcases global Internet traffic insights...",
  "wordCount": 1283,
  "discovered": false,
  "scrapedAt": "2026-11-13T04:10:00+00:00"
}
```

`text` and/or `markdown` appear according to *Output format*. A run summary (counts and skipped-URL reasons) is saved to the key-value store as `SUMMARY`.

### How much does it cost to extract articles?

Pay only for successfully extracted articles — no monthly rental, and platform usage is included in the event price:

| Event | Price |
|---|---|
| Article extracted (clean text and/or Markdown, title, author, date, image, word count, language) | **$0.0012** ($1.20 / 1,000) |
| Actor start | $0.00005 per run |

10 articles ≈ **$0.01**. 1,000 articles = **$1.20**. The median comparable article extractor on the Apify Store charges about $2.00 per 1,000 (list price); this Actor is about 40% below that. Set *Maximum cost per run* in the run options to cap spend.

### Tips

- Leave **Crawl** off when you already have the article URLs — you only pay for those pages, and the run is faster.
- Use **Max articles** as a budget cap, especially when crawling a large blog or news section.
- Lower **Minimum word count** (default 40) for short announcements; raise it to skip thin pages.
- Some publishers (FT, WSJ, Bloomberg, and sites with aggressive bot protection) block automated access or show a paywall. Those URLs are reported in `SUMMARY` and are not charged.
- This Actor is HTTP-only. Pages that exist only after heavy JavaScript rendering may return no article text.

### FAQ

**Is it legal to extract article text?** This Actor reads public web pages — no login and no personal data. You are responsible for how you use the content: respect publishers' copyright and terms (feeding a private RAG index is often fine; republishing full articles usually is not) and applicable laws such as GDPR.

**How is this different from lukaskrivka/article-extractor-smart?** That Actor is a well-known site crawler billed on Apify platform usage. This one is pay-per-article, HTTP-only, and always returns Markdown-ready text plus metadata at a fixed low price.

**Why was a URL skipped?** Typical reasons: HTTP 403/401 (bot protection or paywall), no main article body, or word count below the minimum. Check the `SUMMARY` record for details.

**Can I use it via API or with AI agents?** Yes — call it through the Apify API, Python/JS clients, or the Apify MCP server.

Found a bug or need a field? Open an issue on the Issues tab — we usually reply within a day.

# Actor input Schema

## `urls` (type: `array`):

One URL per line. Each URL is extracted as an article. With 'Crawl site for articles' turned on, these can also be a homepage, blog index or section page — the Actor discovers article links on the same site (RSS, sitemap and on-page links).

## `crawl` (type: `boolean`):

Discover article links from the URLs above (same site only): RSS/Atom feeds, sitemaps and article-like links on the page. The start URLs themselves are still extracted when they are articles. Discovered pages that fail or are not articles are never charged.

## `maxCrawlPages` (type: `integer`):

When crawling, how many start / index pages to read for links (feeds and sitemaps included). Does not include the article pages themselves.

## `sameDomainOnly` (type: `boolean`):

When crawling, only follow links on the same domain as the start URL (subdomains are treated as the same site when 'www.' is the only difference).

## `maxArticles` (type: `integer`):

Hard cap on successfully extracted articles for the whole run. Keeps cost predictable.

## `outputFormat` (type: `string`):

Clean plain text, Markdown (headings and lists preserved, ideal for AI / RAG), or both.

## `minWords` (type: `integer`):

A page must have at least this many words of main text to count as an article. Lower it for short posts. Pages below this threshold are skipped and not charged.

## `maxTextChars` (type: `integer`):

Truncate extracted text and Markdown to this many characters (0 = no limit).

## `maxConcurrency` (type: `integer`):

Parallel HTTP requests. Keep it moderate to stay polite to target sites.

## Actor input object example

```json
{
  "urls": [
    "https://blog.cloudflare.com/introducing-cloudflare-radar/",
    "https://idlewords.com/2010/03/scott_and_scurvy.htm"
  ],
  "crawl": false,
  "maxCrawlPages": 5,
  "sameDomainOnly": true,
  "maxArticles": 10,
  "outputFormat": "both",
  "minWords": 40,
  "maxTextChars": 0,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `articles` (type: `string`):

No description

## `markdown` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://blog.cloudflare.com/introducing-cloudflare-radar/",
        "https://idlewords.com/2010/03/scott_and_scurvy.htm"
    ],
    "maxArticles": 10,
    "outputFormat": "both"
};

// Run the Actor and wait for it to finish
const run = await client.actor("consequential_programmer/article-text-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": [
        "https://blog.cloudflare.com/introducing-cloudflare-radar/",
        "https://idlewords.com/2010/03/scott_and_scurvy.htm",
    ],
    "maxArticles": 10,
    "outputFormat": "both",
}

# Run the Actor and wait for it to finish
run = client.actor("consequential_programmer/article-text-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://blog.cloudflare.com/introducing-cloudflare-radar/",
    "https://idlewords.com/2010/03/scott_and_scurvy.htm"
  ],
  "maxArticles": 10,
  "outputFormat": "both"
}' |
apify call consequential_programmer/article-text-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,consequential_programmer/article-text-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/mPbksXFw0qa8B71st/builds/wkNSdJ0GQYRhJ0bWt/openapi.json
