# Article Extractor to Markdown for AI & RAG (`robindesbios/article-markdown-extractor`) Actor

Extract clean articles from any news site, blog, RSS/Atom feed or sitemap: title, author, date, summary, tags, word count, plain text and LLM-ready Markdown. Auto-discovers the latest articles, respects robots.txt, no browser or API key. Pay only per article saved.

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

## Pricing

from $1.00 / 1,000 results

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

## Article Extractor to Markdown for AI & RAG

Turn any **news site, blog, RSS/Atom feed or sitemap** into clean, structured articles: title, author, publish date, summary, tags, plain text **and LLM-ready Markdown**. Paste a homepage and the Actor finds the latest articles for you. No browser, no API key, no setup.

### Who is it for?

- **AI & RAG builders** feeding vector databases, chatbots and agents with clean Markdown instead of noisy HTML.
- **Media monitoring & PR teams** tracking what competitors, newsrooms and industry blogs publish.
- **Researchers & analysts** building text corpora from public publications.
- **Content & SEO teams** auditing their own or competitors' blog archives (word count, reading time, tags, dates).

### How it works

For every start URL the Actor:

1. Detects whether the URL is an **RSS/Atom feed**, a **sitemap**, or a normal web page.
2. For web pages, follows the site's advertised **feed**, then its **sitemaps** (from robots.txt or `/sitemap.xml`), then the **article-looking links** on the page.
3. Sorts candidates **newest first**, applies your date filter, and downloads each page.
4. Extracts the main content with a proven boilerplate-removal engine (menus, ads, footers and cookie banners are dropped) and saves one record per article.

It **respects robots.txt by default** and uses polite concurrency.

### Input

| Field | Type | Description |
|---|---|---|
| `startUrls` | array | Homepages, section pages, RSS/Atom feeds or sitemap URLs. |
| `articleUrls` | array | Optional direct article URLs (no discovery). |
| `maxItems` | integer | Max articles saved (default 20). |
| `maxArticlesPerSite` | integer | Optional cap per start URL (0 = none). |
| `maxAgeDays` | integer | Only articles from the last N days (0 = any). |
| `minWords` | integer | Minimum body length to count as an article (default 150). |
| `includeMarkdown` | boolean | Add the `markdown` field (default true). |
| `includeLinks` | boolean | Keep hyperlinks in Markdown (default false). |
| `respectRobotsTxt` | boolean | Skip pages disallowed by robots.txt (default true). |
| `maxConcurrency` | integer | Parallel downloads, 1-20 (default 5). |

#### Example input

```json
{
  "startUrls": [
    { "url": "https://blog.apify.com/" },
    { "url": "https://feeds.bbci.co.uk/news/technology/rss.xml" }
  ],
  "maxItems": 50,
  "maxAgeDays": 7,
  "includeMarkdown": true
}
```

### Output

One dataset item per article:

| Field | Description |
|---|---|
| `url` | Final article URL |
| `title` | Headline |
| `author` | Author(s), when published |
| `date` | Publish date (YYYY-MM-DD) |
| `description` | Summary / meta description |
| `siteName`, `hostname` | Publisher |
| `language` | Detected language code |
| `image` | Main image URL |
| `tags`, `categories` | Arrays of tags / categories |
| `wordCount`, `readingTimeMinutes` | Length metrics |
| `text` | Clean plain text |
| `markdown` | Clean Markdown (headings, lists, tables, emphasis) |
| `sourceUrl` | The start URL that led to this article (or `direct`) |
| `scrapedAt` | Extraction timestamp (UTC) |

#### Example item

```json
{
  "url": "https://blog.apify.com/black-friday-checklist/",
  "title": "Black Friday price monitoring: a 6-week checklist for e-commerce teams",
  "author": "...",
  "date": "2026-11-13",
  "siteName": "Apify Blog",
  "language": "en",
  "wordCount": 1840,
  "readingTimeMinutes": 8,
  "tags": ["E-commerce"],
  "text": "...",
  "markdown": "## Six weeks out\n\n- Pick the competitors...",
  "sourceUrl": "https://blog.apify.com/",
  "scrapedAt": "2026-11-15T09:00:00+00:00"
}
```

Export to JSON, CSV, Excel, XML or HTML, or pull the data via the Apify API, webhooks, Make, Zapier, n8n or LangChain.

### Pricing

**Pay per result: you only pay for articles saved to the dataset.** Pages that are skipped (too short, too old, blocked by robots.txt, failed) cost nothing. See the price on the Pricing tab. Set `maxItems` to control your budget.

### Limits

- Plain HTTP only (no headless browser): sites that render articles **only with JavaScript** may return few or no results. Most news sites and blogs (WordPress, Ghost, Substack, Medium-style, newsrooms) work fine.
- Paywalled content is not bypassed; you only get what the page publicly serves.
- Sites protected by aggressive anti-bot systems may block requests.
- Author and date depend on what the publisher exposes in the page metadata.

### Legal note

The Actor only reads publicly available pages and honours robots.txt by default. You are responsible for using the extracted content in line with the publisher's terms and copyright (e.g. internal analysis, summarisation, search indexing).

# Actor input Schema

## `startUrls` (type: `array`):

Homepage or section of a news site / blog, an RSS or Atom feed URL, or a sitemap.xml URL. The Actor finds the article links automatically (feed first, then sitemaps, then links on the page), newest first.

## `articleUrls` (type: `array`):

Optional list of article pages to extract directly, with no discovery.

## `maxItems` (type: `integer`):

Stop after this many articles are saved (you pay per saved article).

## `maxArticlesPerSite` (type: `integer`):

Optional cap per start URL, useful when monitoring many sites. 0 = no cap.

## `maxAgeDays` (type: `integer`):

Skip articles older than this many days. 0 = any date.

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

Pages with less body text than this are not treated as articles (filters out index and contact pages).

## `includeMarkdown` (type: `boolean`):

Add a 'markdown' field with headings, lists, tables and emphasis kept - ideal for LLMs, RAG and vector databases.

## `includeLinks` (type: `boolean`):

Keep hyperlinks inside the Markdown output.

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

Skip pages that the website's robots.txt disallows. Recommended.

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

Parallel page downloads (1-20). Keep it low to be polite to small websites.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://blog.apify.com/"
    }
  ],
  "maxItems": 20,
  "maxArticlesPerSite": 0,
  "maxAgeDays": 0,
  "minWords": 150,
  "includeMarkdown": true,
  "includeLinks": false,
  "respectRobotsTxt": true,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        {
            "url": "https://blog.apify.com/"
        }
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("robindesbios/article-markdown-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 = {
    "startUrls": [{ "url": "https://blog.apify.com/" }],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("robindesbios/article-markdown-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 '{
  "startUrls": [
    {
      "url": "https://blog.apify.com/"
    }
  ],
  "maxItems": 20
}' |
apify call robindesbios/article-markdown-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,robindesbios/article-markdown-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/P6ypZozPIneJ7bicw/builds/1fsaJmTChKrrMIKQQ/openapi.json
