# Article to Text Extractor (for TTS/LLMs) (`andok/tts-reader`) Actor

Extract the core readable text of any article or blog post, stripping out boilerplate. Perfect for Text-to-Speech or AI summaries.

- **URL**: https://apify.com/andok/tts-reader.md
- **Developed by:** [Andok](https://apify.com/andok) (community)
- **Categories:** AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 14 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## Article Text Extractor for TTS & AI

Extract clean, readable article text from any web page, stripped of navigation, ads, and boilerplate. Feed the output directly into text-to-speech engines, summarization models, or LLM pipelines without wasting tokens on HTML noise. Bulk-process hundreds of URLs with parallel concurrency.

### Features

- **Readability engine** — uses Mozilla Readability to isolate the main article content from page clutter
- **Plain text output** — returns clean text ready for TTS APIs like ElevenLabs or OpenAI TTS
- **Bulk processing** — extract articles from hundreds of URLs in a single run
- **Metadata extraction** — captures title, author byline, and excerpt alongside the article text
- **Redirect tracking** — follows HTTP redirects and records the final URL
- **Configurable concurrency** — process 1 to 50 URLs in parallel
- **Backwards compatible** — accepts both `urls` array and single `url` field

### Input

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `urls` | `array` | No | — | List of webpage URLs to extract article text from |
| `url` | `string` | No | — | Single URL for backwards compatibility (use `urls` for bulk) |
| `timeoutSeconds` | `integer` | No | `15` | Maximum seconds to wait for each URL response |
| `concurrency` | `integer` | No | `10` | Number of URLs to process in parallel (1-50) |

#### Input Example

```json
{
  "urls": [
    "https://crawlee.dev",
    "https://blog.apify.com/what-is-web-scraping/"
  ],
  "timeoutSeconds": 15,
  "concurrency": 10
}
```

### Output

Each URL produces one dataset item containing the extracted plain text and metadata.

Key output fields:

- `inputUrl` (`string`) — the original URL provided
- `finalUrl` (`string`) — the URL after following redirects
- `status` (`number`) — HTTP status code
- `pageTitle` (`string`) — extracted article title
- `byline` (`string`) — author name if available
- `excerpt` (`string`) — short summary of the article
- `textContent` (`string`) — the full article text, cleaned and ready for TTS or AI processing
- `error` (`string`) — error message if extraction failed, otherwise `null`
- `checkedAt` (`string`) — ISO 8601 timestamp of when the extraction was performed

#### Output Example

```json
{
  "inputUrl": "https://crawlee.dev",
  "finalUrl": "https://crawlee.dev/",
  "status": 200,
  "pageTitle": "Crawlee - Build reliable crawlers. Fast.",
  "byline": null,
  "excerpt": "Crawlee is a web scraping and browser automation library for Node.js.",
  "textContent": "Crawlee\n\nBuild reliable crawlers. Fast.\n\nCrawlee is a web scraping and browser automation library that helps you build reliable crawlers...",
  "error": null,
  "checkedAt": "2025-01-15T10:30:00.000Z"
}
```

### Pricing

| Event | Cost |
|-------|------|
| Article Extracted | Pay-per-event (see actor pricing page) |

The actor respects the per-run max charge limit. Processing stops automatically when the spending cap is reached.

### Use Cases

- **Podcast generation** — turn blog posts and news articles into clean text payloads for TTS APIs
- **LLM summarization** — feed distraction-free article text into GPT, Claude, or other models
- **Content monitoring** — track article changes over time with clean text snapshots
- **Accessibility tools** — extract readable text for screen readers and assistive technology
- **Newsletter curation** — pull article text from multiple sources for digest generation

### Related Actors

| Actor | What it adds |
|-------|-------------|
| [Web Page to Markdown Converter for LLMs](https://apify.com/andok/markdown-extractor) | Markdown-formatted output with heading structure preserved |
| [PDF to Text Converter for AI & RAG](https://apify.com/andok/pdf-text-converter) | Extend text extraction to PDF documents |
| [RSS Feed Parser & Reader](https://apify.com/andok/rss-parser) | Discover article URLs automatically from RSS feeds |

# Actor input Schema

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

List of webpage URLs to extract article text from. Each URL will be fetched and processed with Mozilla Readability to isolate the main content.

## `url` (type: `string`):

Single URL to extract text from. For backwards compatibility — use the URLs field above for bulk processing.

## `timeoutSeconds` (type: `integer`):

Maximum seconds to wait for each URL response before timing out. Increase for slow-loading pages.

## `concurrency` (type: `integer`):

Number of URLs to process in parallel. Lower this if you experience rate limiting from target sites.

## Actor input object example

```json
{
  "urls": [
    "https://crawlee.dev"
  ],
  "timeoutSeconds": 15,
  "concurrency": 10
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `resultsCsv` (type: `string`):

No description

## `run` (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://crawlee.dev"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("andok/tts-reader").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://crawlee.dev"] }

# Run the Actor and wait for it to finish
run = client.actor("andok/tts-reader").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://crawlee.dev"
  ]
}' |
apify call andok/tts-reader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,andok/tts-reader"
        }
    }
}
```

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/74YpvJ44goFma2luy/builds/seH3MOMbvZcanJ3XL/openapi.json
