# Smart Article Extractor (`skilled_glee/article-text-extractor`) Actor

Article URLs in, structured article data out. Title, author, published date, clean text, word count, content hash. Handles JSON-LD, bylines, missing dates. Deterministic, no AI, no browser.

- **URL**: https://apify.com/skilled_glee/article-text-extractor.md
- **Developed by:** [EchoEmpire Machine Foundry (EchoEmpire LLC)](https://apify.com/skilled_glee) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.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.

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

## Smart Article Extractor

Give me static article URLs and I return structured article text, metadata, and a deterministic content hash.

Extracts title, author, published date, text, word count, language, canonical URL, source URL, and whether text was truncated. Author and date may be empty when page metadata is missing. Extraction uses HTML paragraphs and metadata; it does not use AI or a browser.

### Input

```json
{"articleUrls": ["https://blog.python.org/2024/10/python-3130-final-released/"], "maxChars": 20000}
```

Accepts 1–50 URLs per run. Exact duplicates after trimming are processed once. `maxChars` is 1,000–100,000, default 20,000. Invalid URLs become individual error records; malformed input objects fail validation.

### Output

Useful records have `status: "ok"`, article fields, `contentHash`, `input`, `url`, `finalUrl`, `sourceUrl`, `actorVersion`, and `contractId`. Failed URLs have `status: "error"` and an error message. The hash describes the returned text, including truncation; it is a 16-character SHA-256 prefix for routine deduplication, not a security identifier.

### Summary and failures

Read the `SUMMARY` key-value record for submitted and deduplicated counts, processed/succeeded/failed counts, actually charged units, status, settings, and unprocessed URLs. The legacy `run-summary` key contains the same record.

A mixed batch preserves useful articles and reports `partial_success`. A batch with no usable article fails after saving its error records and summary. Storage failures prevent charging. Billing failures stop further work, preserve existing results, and fail the run. Spending limits stop further extraction and identify remaining URLs.

### Pricing

$0.001 per useful article saved ($1 per 1,000). A usable title and nonempty text are required. Failed or empty extractions are not charged. Platform usage is included in the public pay-per-event price. Owner development runs incur platform costs separately. This does not promise settled creator revenue or profit.

### Limitations

Static, publicly accessible article HTML only. No crawling, JavaScript rendering, HTML meta-refresh redirect handling, login, paywall bypass, or proxy fallback. Use the final article URL for HTML redirect pages. Not intended for article index pages. Paragraph extraction is heuristic and may miss lists, tables, captions, or unusual layouts. Metadata accuracy depends on the source. Respect the publisher's access and reuse conditions.

### API and agent use

Start a run using the Apify API Actor ID `5SmjtjmTos1ONDyV7` with the input above. Read article records from its default dataset and `SUMMARY` from its default key-value store. The Actor output exposes both result links. Keep API credentials in a secret store.

# Actor input Schema

## `maxChars` (type: `integer`):

Maximum content characters per page.

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

1–50 static article URLs; duplicates are processed once. Failed URLs are not billed.

## Actor input object example

```json
{
  "maxChars": 20000,
  "articleUrls": [
    "https://blog.python.org/2024/10/python-3130-final-released/"
  ]
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "articleUrls": [
        "https://blog.python.org/2024/10/python-3130-final-released/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("skilled_glee/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 = { "articleUrls": ["https://blog.python.org/2024/10/python-3130-final-released/"] }

# Run the Actor and wait for it to finish
run = client.actor("skilled_glee/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 '{
  "articleUrls": [
    "https://blog.python.org/2024/10/python-3130-final-released/"
  ]
}' |
apify call skilled_glee/article-text-extractor --silent --output-dataset

```

## MCP server setup

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