# URL & HTML to Markdown: Article Extractor (Text, Author, Date) (`pagecraft/article-extractor`) Actor

Turn article URLs, whole web pages or your own HTML into clean Markdown or text, with title, author, publish date, site name and main image. Menus, ads and banners removed. Ready for LLMs and RAG.

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

## Pricing

from $2.00 / 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/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

## URL & HTML to Markdown: Article Extractor with Clean Text, Author and Date

**For** AI, RAG and content teams who need web pages as clean Markdown or text. **You get** the article (or the whole page) without menus and ads, with title, author, publish date, site name and word count.

**Real run (13 Nov 2026, Markdown mode):** 2 pages (a Wikipedia article and a blog post) in 2 seconds, both read. **Two pages cost 0.6 cents** on Apify's Free plan; the plan's $5 of free monthly usage covers about 1,600 pages. Try it in one click with the ready-made task [Convert web pages to Markdown for LLMs](https://apify.com/pagecraft/article-extractor/examples/convert-web-pages-to-markdown-for-llms).

| page | title | author | published | words |
| --- | --- | --- | --- | --- |
| blog.apify.com/what-is-web-scraping | What is web scraping? | David Barton | 2024-10-15 | 1,358 |
| en.wikipedia.org/wiki/Markdown | Markdown | Contributors to Wikimedia projects | 2005-08-09 | 2,799 |

Paste a list of **news articles, blog posts or any page with a main body of text** and get back the **clean article text** (or **Markdown**, ready for AI and RAG pipelines) with the **title, author, publish date, site name, language and main image**. Menus, ads, cookie banners, comments and footers are stripped out. You can also convert a **whole page**, or **paste your own HTML**, to Markdown or text (**HTML to Markdown**). Works in bulk, with no login and no browser.

![HTML to Markdown demo: HTML goes in, clean Markdown comes out](https://raw.githubusercontent.com/pagecraftAPI/pagecraft-mcp/main/media/html-to-markdown.gif)

### Quick start

1. Press **Try for free**. The form opens with a working example (`https://en.wikipedia.org/wiki/Web_scraping`, `https://blog.apify.com/what-is-web-scraping/`).
2. Replace it with your own article URLs.
3. Press **Start**. Results appear as they are found; download them as Excel, CSV or JSON, or use the API.

A result looks like this (some columns):

| url | title | author | publishedAt | modifiedAt |
| --- | --- | --- | --- | --- |
| https://news.example.co.uk/business/rail... | Rail fares to rise by 4.6% in March | Aoife Byrne | 2026-11-06T07:00:00.000Z | 2026-11-06T09:30:00.000Z |

### What it does

- 📰 **Main text only**: uses Mozilla Readability, the engine behind Firefox Reader View, to keep the article body and drop everything around it.
- 🧾 **Metadata you can sort by**: title, all authors, published and updated dates (ISO 8601), site name, description, language, canonical URL and the main image, read from the page's own schema.org data first, then Open Graph and meta tags.
- 🧾 **HTML to Markdown**: paste HTML (or send a list through the API in `htmlDocuments`) and get Markdown, text and metadata back, with nothing downloaded.
- 🌐 **Whole page or main article**: keep only the article, or convert everything on the page (docs, product and landing pages).
- 🤖 **Markdown for AI**: headings, lists, links and code blocks kept as Markdown, ideal for LLM prompts, embeddings and RAG. Clean HTML is available too.
- 📏 **Word count and reading time** for every article, and an optional character limit to keep prompts short.
- 🧹 **Clear failures**: pages that need JavaScript or a login, or are not articles, come back with a plain-English reason instead of empty text.

### Who it's for

- **AI and RAG builders** feeding clean article text into models and vector stores.
- **Researchers, analysts and PR teams** collecting coverage with authors and dates.
- **Content and SEO teams** auditing their own or competitors' articles in bulk.
- **AI agents** through the Apify MCP server, Make, n8n and Zapier.

### Input

| Field | What to enter |
| --- | --- |
| Article URLs | One per line, e.g. `https://www.example.com/news/story` |
| HTML | Optional, one HTML document to convert instead of (or as well as) URLs |
| HTML documents (list) | Optional, for the API: many HTML documents at once |
| Output formats | Plain text (default), Markdown and/or clean HTML |
| What to keep | Main article only (default) or the whole page |
| Maximum characters per article | Optional, 0 = no limit |
| Proxy | Optional, under Advanced |

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

HTML to Markdown, through the API (the optional `url` resolves relative links):

```json
{
  "urls": [],
  "htmlDocuments": [{ "html": "<h1>Pricing</h1><p>Plans for <a href=\"/teams\">teams</a>.</p>", "url": "https://www.example.com/pricing" }],
  "outputFormats": ["markdown"],
  "contentMode": "page"
}
```

### Output

One row per URL:

```json
{
  "url": "https://news.example.co.uk/business/rail-fares",
  "title": "Rail fares to rise by 4.6% in March",
  "author": "Aoife Byrne",
  "authors": ["Aoife Byrne", "Tom Price"],
  "publishedAt": "2026-11-06T07:00:00.000Z",
  "modifiedAt": "2026-11-06T09:30:00.000Z",
  "siteName": "Daily Ledger",
  "description": "Regulated fares in England will rise by 4.6% from 1 March.",
  "language": "en-GB",
  "mainImage": "https://news.example.co.uk/img/trains-1200.jpg",
  "canonicalUrl": "https://news.example.co.uk/business/rail-fares",
  "wordCount": 382,
  "readingTimeMinutes": 2,
  "text": "By Aoife Byrne and Tom Price\nWhat changes\n...",
  "markdown": null,
  "html": null,
  "textTruncated": false,
  "finalUrl": "https://news.example.co.uk/business/rail-fares",
  "source": "url",
  "htmlDocument": null,
  "error": null
}
```

Fields the page does not provide (an author on a company page, say) are `null`. Download the results as JSON, CSV or Excel, or read them through the API.

### Pricing

| Event | When it is charged | Price per 1,000 (Free / Bronze / Silver / Gold plan) |
| --- | --- | --- |
| Article extracted | Each page whose article text and metadata are returned. | $3 / $2.75 / $2.50 / $2 |
| Page failed | A page that could not be loaded or had no article text (it still uses server time). | $2 on every plan |

Example: 1,000 articles cost $3 on the Free plan. Pages that cannot be read are charged the smaller failed fee, because they still use server time.

### Notes and limits

- The tool reads the page as the server sends it, without a browser. Sites that build their articles with JavaScript, or put them behind a login or paywall, return the "No article text found" reason.
- Each page has 25 seconds and 3 MB; four pages are read at a time.
- Some sites block cloud servers. If you see "refused access", try again with Apify datacenter proxies under Advanced.
- Respect each site's terms and copyright when you reuse the text.

### Use with AI agents (MCP)

Connect this tool to Claude, Cursor, VS Code or any other MCP client through the [Apify MCP server](https://mcp.apify.com/). To load only this tool, use this server URL:

```
https://mcp.apify.com?tools=pagecraft/article-extractor
```

Then ask, for example: "Get these five articles as Markdown with their authors and publish dates" or "Convert this HTML to Markdown". The agent gets back the article text or Markdown, title, authors, dates, site name and main image for each URL. Each call is charged per event at the prices in Pricing above. Agents without an Apify account can also pay per run through [Apify's agentic payments](https://docs.apify.com/agents/payments).

### Workflows with other Pagecraft tools

Pagecraft tools are built to work together. Ideas that use this one:

**Turn documents and web pages into AI-ready text.** Feed a RAG system, a vector database or an LLM prompt with clean text.

1. [Sitemap URL Extractor](https://apify.com/pagecraft/sitemap-url-extractor): List every page URL of a website from its sitemaps.
2. **This tool**: Get clean text or Markdown, with title, author and date, for each page.
3. [PDF to Markdown & Text Extractor](https://apify.com/pagecraft/pdf-text-extractor): Add the text of any PDF reports or papers, page by page.
4. [OCR Image to Text](https://apify.com/pagecraft/ocr-image-to-text): Read text from scans, screenshots and images the other steps cannot.

**Monitor news and social mentions.** Follow a brand, topic or market across news and social platforms.

1. [Google News Scraper](https://apify.com/pagecraft/google-news-scraper): News articles by keyword and country.
2. [RSS Feed Reader](https://apify.com/pagecraft/rss-feed-reader): Every new post from the blogs and news sites you follow.
3. [Hacker News Scraper](https://apify.com/pagecraft/hacker-news-scraper): Stories and comments from the tech community.
4. [Bluesky Posts & Profiles Scraper](https://apify.com/pagecraft/bluesky-scraper): Posts mentioning your keywords on Bluesky.
5. [Telegram Channel Scraper](https://apify.com/pagecraft/telegram-channel-scraper): Posts from public Telegram channels.
6. **This tool**: The full text of any article you want to analyse.

### More Pagecraft tools

- [Google News Scraper](https://apify.com/pagecraft/google-news-scraper): find the articles first, by keyword and country.
- [RSS Feed Reader](https://apify.com/pagecraft/rss-feed-reader): every new post from any blog or news feed.
- [Website Contact Extractor](https://apify.com/pagecraft/website-contact-extractor): emails, phones and social links from any website.

# Actor input Schema

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

News articles, blog posts or any page with a main body of text, one per line. Up to 10,000 per run.

## `html` (type: `string`):

Optional: paste one HTML document to convert it to Markdown or text without downloading anything (HTML to Markdown). Clear the URLs field if you only want the HTML. For many documents, use the field below.

## `htmlDocuments` (type: `array`):

Optional, mainly for the API: a list of HTML strings, or objects like {"html": "...", "url": "https://..."} so relative links resolve.

## `outputFormats` (type: `array`):

Plain text by default. Markdown keeps headings, lists and links, which suits AI and RAG pipelines.

## `contentMode` (type: `string`):

Main article suits news and blog posts. Whole page converts everything (docs pages, product pages, landing pages, emails) to Markdown or text.

## `maxCharacters` (type: `integer`):

Cut long articles to this many characters (0 = no limit). The word count always covers the whole article.

## `proxyConfiguration` (type: `object`):

Not usually needed. Use Apify datacenter proxies for sites that block cloud servers.

## Actor input object example

```json
{
  "urls": [
    "https://en.wikipedia.org/wiki/Web_scraping",
    "https://blog.apify.com/what-is-web-scraping/"
  ],
  "htmlDocuments": [],
  "outputFormats": [
    "text"
  ],
  "contentMode": "article",
  "maxCharacters": 0
}
```

# Actor output Schema

## `results` (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://en.wikipedia.org/wiki/Web_scraping",
        "https://blog.apify.com/what-is-web-scraping/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pagecraft/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",
        "https://blog.apify.com/what-is-web-scraping/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("pagecraft/article-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://en.wikipedia.org/wiki/Web_scraping",
    "https://blog.apify.com/what-is-web-scraping/"
  ]
}' |
apify call pagecraft/article-extractor --silent --output-dataset

```

## MCP server setup

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