# Article Content Extractor (`codingfrontend/article-content-extractor`) Actor

Extract clean article content, metadata and structured information from any web page. Returns title, description, author, publish date, plain content, word count, images, and more.

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

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Content Extractor

Extract clean article content, metadata, images, and structured data from any web page URL. Provides title, description, author, publish date, plain text content, word count, reading time, images, links, and JSON-LD structured data.

### Features

- Extracts article body using Readability-like algorithm (tries `<article>`, `[itemprop="articleBody"]`, `.post-content`, `main`, etc.)
- Parses all meta tags: Open Graph, Twitter Cards, standard HTML meta
- Extracts JSON-LD Schema.org structured data (`Article`, `NewsArticle`, `BlogPosting`, etc.)
- Detects author, publish date, modified date, section, tags, and language
- Collects image list with dimensions (up to 50 images)
- Optionally gathers internal & external links
- Calculates word count and estimated reading time (200 WPM)
- Works with news sites, blogs, Wikipedia, Medium, and most static/SSR pages

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `urls` | array | required | Article URLs to extract (one per item) |
| `includeImages` | boolean | `true` | Include list of images found in the article |
| `includeLinks` | boolean | `false` | Include internal and external hyperlinks |
| `includeHtml` | boolean | `false` | Include cleaned article HTML in addition to plain text |
| `extractSchema` | boolean | `true` | Parse JSON-LD structured data embedded in the page |
| `proxyConfiguration` | object | — | Proxy settings (residential recommended for paywalled sites) |

#### Example Input

```json
{
  "urls": [
    "https://en.wikipedia.org/wiki/Artificial_intelligence",
    "https://www.bbc.com/news"
  ],
  "includeImages": true,
  "includeLinks": true,
  "includeHtml": false,
  "extractSchema": true
}
```

### Output

Each URL produces one dataset item:

```json
{
  "position": 1,
  "url": "https://en.wikipedia.org/wiki/Artificial_intelligence",
  "title": "Artificial intelligence - Wikipedia",
  "description": "Artificial intelligence (AI) is the intelligence of machines...",
  "author": null,
  "publishDate": null,
  "modifiedDate": null,
  "section": null,
  "tags": ["technology", "science"],
  "language": "en",
  "siteName": null,
  "canonical": "https://en.wikipedia.org/wiki/Artificial_intelligence",
  "domain": "en.wikipedia.org",
  "content": "From Wikipedia, the free encyclopedia...",
  "contentHtml": null,
  "wordCount": 30000,
  "readingTimeMinutes": 150,
  "ogImage": null,
  "images": [
    { "src": "https://upload.wikimedia.org/...", "alt": "AI illustration", "width": 350, "height": 230 }
  ],
  "internalLinks": [{ "text": "Machine learning", "href": "https://en.wikipedia.org/wiki/Machine_learning" }],
  "externalLinks": [{ "text": "Nature paper", "href": "https://www.nature.com/..." }],
  "schemaData": { "@type": "Article", "name": "Artificial intelligence" },
  "favicon": "https://en.wikipedia.org/favicon.ico",
  "scrapedAt": "2025-01-01T00:00:00.000Z"
}
```

### Dataset Views

| View | Fields |
|------|--------|
| **Overview** | position, title, author, publishDate, domain, language, wordCount, readingTimeMinutes, url |
| **Content** | title, description, author, publishDate, modifiedDate, section, tags, content, wordCount, url |
| **Media** | title, url, images, internalLinks, externalLinks |

### Known Limitations

- **Paywalled / login-required sites**: Actor extracts whatever is publicly visible. Pages behind auth walls may return empty content.
- **Heavy JavaScript SPAs**: Content rendered by client-side JavaScript (React, Vue) may not be fully extracted. The actor waits up to 15 seconds for content to appear before extracting.
- **Author field on Wikipedia**: Wikipedia pages list the authority control section as the "author", since there is no standard author meta tag. This is a limitation of relying solely on meta tags.
- **Cloudflare / Bot-protected sites**: Sites protected by Cloudflare Managed Challenge, DataDome, or PerimeterX will return empty or error results. Use residential proxies to improve success rate. See the [anti-bot bypassing guide](../.github/instructions/anti-bot-bypassing.instructions.md).

### Proxy

Residential proxies are recommended for news sites and paywalled content:

```json
{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

# Actor input Schema

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

List of article/webpage URLs to extract content from.

## `includeImages` (type: `boolean`):

Include a list of image URLs found in the article.

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

Include internal and external links found in the article.

## `includeHtml` (type: `boolean`):

Include the cleaned article HTML (in addition to plain text).

## `extractSchema` (type: `boolean`):

Extract JSON-LD structured data (Schema.org Article, NewsArticle, BlogPosting, etc.).

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

Proxy settings for accessing websites. Residential proxies recommended for blocked sites.

## Actor input object example

```json
{
  "urls": [
    "https://en.wikipedia.org/wiki/Artificial_intelligence"
  ],
  "includeImages": true,
  "includeLinks": false,
  "includeHtml": false,
  "extractSchema": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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/Artificial_intelligence"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/article-content-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/Artificial_intelligence"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/article-content-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/Artificial_intelligence"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call codingfrontend/article-content-extractor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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