# Article Extractor — Clean Web Content to Markdown/Text (`omao/article-extractor`) Actor

Extract the main article from any web page into clean Markdown or text, with title, author, date and description. Strips nav, ads and boilerplate. Fast, no setup.

- **URL**: https://apify.com/omao/article-extractor.md
- **Developed by:** [Marouane Oulabass](https://apify.com/omao) (community)
- **Categories:** Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 95.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.16 / 1,000 article 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Article Extractor — Clean Web Content to Markdown / Text

**Extract the main article from any web page — as clean Markdown or plain text.** This actor strips away nav bars, ads, cookie banners, sidebars and boilerplate, and returns just the content that matters, plus metadata: title, author, publish date, description, site name and language. Perfect for feeding clean text to LLMs, building datasets, or archiving content.

> AI-agent ready: this Actor is callable and payable by AI agents via [x402](https://docs.apify.com/platform/integrations/x402) (USDC on Base), no Apify account required.

Give it a URL, get back a clean article. No readability tuning, no HTML soup, no setup.

### Who uses this

- 🤖 **AI / LLM & RAG pipelines** — get clean Markdown to embed, summarize or fine-tune on.
- 📰 **Content & news monitoring** — archive articles as readable text with metadata.
- 🔎 **Researchers & analysts** — build clean corpora from the open web.
- ✍️ **Marketers & writers** — pull competitor content and references without the clutter.
- 🧑‍💻 **Developers** — a reliable readability/boilerplate-removal endpoint by URL.

### What you get — one clean row per URL

| Field | Description |
|---|---|
| `content` | **The main article** as clean Markdown or plain text |
| `title` | Article title |
| `author` | Author / byline |
| `date` | Publish date |
| `description` | Meta description / summary |
| `sitename` | Publisher / site name |
| `language` | Detected language |
| `wordCount` | Word count of the extracted body |
| `bodyFormat` | `markdown` or `txt` |
| `url`, `scrapedAt` | Source & provenance |

### Example

**Input**

```json
{ "urls": ["https://en.wikipedia.org/wiki/Web_scraping"], "outputFormat": "markdown" }
```

**Output (one item)**

```json
{
  "url": "https://en.wikipedia.org/wiki/Web_scraping",
  "title": "Web scraping",
  "author": null,
  "date": "2026-05-01",
  "sitename": "Wikipedia",
  "language": "en",
  "bodyFormat": "markdown",
  "content": "# Web scraping\n\nWeb scraping is the process of automatically extracting data...",
  "wordCount": 3421
}
```

### Why this extractor

- ✅ **Boilerplate gone** — nav, ads, cookie banners, sidebars and footers removed.
- 📝 **Markdown or plain text** — pick the format your pipeline needs.
- 🏷️ **Rich metadata** — title, author, date, description, site name and language.
- 🤖 **LLM-ready** — clean Markdown is ideal for RAG, summarization and fine-tuning.
- ⚡ **Fast & affordable** — pay only per article extracted.

### Input options

- `urls` *(required)* — one or more page URLs (`https://` added if missing).
- `outputFormat` — `markdown` (default) or `txt`.

### FAQ

**Markdown or plain text?** Both — set `outputFormat` to `markdown` or `txt`.

**Does it remove ads and navigation?** Yes — it isolates the main article and strips nav, ads, cookie banners and boilerplate.

**Can I process many URLs in one run?** Yes — pass a list; each row carries its own `url` and metadata.

**Is it good for LLM / RAG use?** Yes — clean Markdown with metadata is exactly what embedding and summarization pipelines need.

**How fresh is the data?** Live — it fetches each page in real time on every run.

**Can I export to CSV/Excel/Google Sheets?** Yes — the dataset exports to JSON, CSV, Excel and HTML, or pull it via the API.

**What does it cost?** Pay-per-article — you're only charged for articles actually extracted.

***

*Tip: pair this with the RSS Feed Reader — discover URLs from feeds, then extract full clean article text for your dataset.*

# Actor input Schema

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

Web page URLs to extract the main article from (https:// added if missing).

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

Format of the extracted article body.

## `healthCheckMode` (type: `boolean`):

Internal monitoring: extract a canary article and FAIL if broken (no billing).

## Actor input object example

```json
{
  "urls": [
    "https://example.com/blog/post",
    "https://news.site/article"
  ],
  "outputFormat": "markdown",
  "healthCheckMode": false
}
```

# Actor output Schema

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

All extracted articles (title, author, date, clean Markdown/text content).

# 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://en.wikipedia.org/wiki/Web_scraping"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("omao/article-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://en.wikipedia.org/wiki/Web_scraping"] }

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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://en.wikipedia.org/wiki/Web_scraping"
  ]
}' |
apify call omao/article-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=omao/article-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/sthc9qD6xZyvQffer/builds/QEMLVtHwrlIOfdFjh/openapi.json
