# Article Text Extractor — Clean Text & Markdown from Web Pages (`tidydata/article-text-extractor`) Actor

Turn news articles, blog posts and docs into clean text or Markdown without menus, ads or footers. Title, author, date and language included. Ready for AI and RAG. $2 per 1,000 pages.

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

## Pricing

from $1.60 / 1,000 page extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 📄 Article Text Extractor — clean text and Markdown from any web page

Turn **news articles, blog posts and documentation pages** into clean **Markdown or plain text**, without menus, ads, cookie banners or footers. Includes **title, author, date, language, site name and word count**. Ready for **AI, RAG, summaries and research**. **$2 per 1,000 pages.**

- ✅ Main-content extraction (the same idea as the "reader mode" of a browser)
- ✅ Markdown keeps headings, lists, links and tables
- ✅ Respects `robots.txt` by default
- ✅ Pages without readable text are reported and **not charged**
- ✅ Up to 50,000 pages per run

### How to use it

1. Paste the article links.
2. Choose Markdown or plain text, and whether to keep tables or comments.
3. Run and export, or send the dataset to your AI pipeline.

### Output example

```json
{
  "url": "https://example.com/post",
  "title": "How we built it",
  "author": "Jane Doe", "date": "2026-09-14", "language": "en",
  "wordCount": 1250,
  "markdown": "## How we built it\n\nIt started with…"
}
```

### Pricing

**$0.002 per page extracted** ($2 per 1,000).

### Limits

- It does not run JavaScript, so pages that show their text only after scripts run, or that need a login, cannot be read.
- Use it only on content you have the right to process; follow each website's terms.

# Actor input Schema

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

Articles, blog posts or documentation pages. Use pages you have the right to process.

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

Markdown keeps headings, lists and links. Plain text is the cleanest for search and embeddings.

## `includeTables` (type: `boolean`):

Keep tables found inside the article.

## `includeComments` (type: `boolean`):

Also keep reader comments under the article.

## `respectRobotsTxt` (type: `boolean`):

Skip pages the website asks automated tools not to read. Recommended.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://en.wikipedia.org/wiki/Web_scraping"
    },
    {
      "url": "https://www.bbc.com/news"
    }
  ],
  "outputFormat": "markdown",
  "includeTables": true,
  "includeComments": false,
  "respectRobotsTxt": true
}
```

# Actor output Schema

## `results` (type: `string`):

One row per result.

# 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": [
        {
            "url": "https://en.wikipedia.org/wiki/Web_scraping"
        },
        {
            "url": "https://www.bbc.com/news"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidydata/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": [
        { "url": "https://en.wikipedia.org/wiki/Web_scraping" },
        { "url": "https://www.bbc.com/news" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tidydata/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": [
    {
      "url": "https://en.wikipedia.org/wiki/Web_scraping"
    },
    {
      "url": "https://www.bbc.com/news"
    }
  ]
}' |
apify call tidydata/article-text-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tidydata/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/mOrYU7XEEmUec0Ll3/builds/sAhAePiHBsCAF7btm/openapi.json
