# Any Website URL to Article Summarizer (`codingfrontend/any-website-url-to-article-summarizer`) Actor

Extract and summarize articles from any website URL. Returns title, author, publish date, word count, reading time, full text, and a concise AI-style summary using extractive summarization.

- **URL**: https://apify.com/codingfrontend/any-website-url-to-article-summarizer.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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Any Website URL to Article Summarizer

Extract and summarize article content from any website URL. Works on news sites, blogs, Wikipedia, Medium, documentation, and more.

Uses extractive summarization (selects the most important sentences from the article itself) — no external AI API key required.

### Features

- 📰 Extract articles from **any URL** — news sites, blogs, Wikipedia, Medium, etc.
- 📝 Automatic **extractive summary** generation (selects most informative sentences)
- 🔑 **Key points** — top 5 most important sentences from the article
- 👤 Extracts title, author, publish date, description, and hero image
- 📊 Word count and reading time estimation
- 🔒 No AI API key required — all summarization happens locally
- 🌐 Supports multiple URLs per run
- 💾 Optional: include full cleaned article text in output

### How Summarization Works

This actor uses **extractive summarization**:
1. Article text is cleaned and split into sentences
2. Each sentence is scored by word frequency (TF-style scoring)
3. The top-scoring sentences are selected and returned in their original reading order
4. Position bias boosts early sentences (intros are typically more important)

This approach works across all languages and domains without requiring an LLM or external API.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `urls` | `array` | **required** | List of article URLs to summarize |
| `summaryLength` | `string` | `"medium"` | `short` (3 sentences), `medium` (5), `long` (8) |
| `includeFullText` | `boolean` | `false` | Include full cleaned article text in output |
| `maxItems` | `integer` | `10` | Maximum number of articles to process |

#### Example Input

```json
{
  "urls": [
    "https://en.wikipedia.org/wiki/Artificial_intelligence",
    "https://techcrunch.com/2024/01/01/sample-article/"
  ],
  "summaryLength": "medium",
  "includeFullText": false,
  "maxItems": 10
}
````

### Output

Each dataset record represents one summarized article:

| Field | Type | Description |
|-------|------|-------------|
| `position` | `integer` | Position in results |
| `url` | `string` | Article URL |
| `domain` | `string` | Website domain (e.g. `"techcrunch.com"`) |
| `title` | `string` | Article title |
| `author` | `string\|null` | Article author name |
| `publishDate` | `string\|null` | Publish date (ISO format or raw string) |
| `description` | `string\|null` | Meta description or excerpt |
| `summary` | `string` | Extractive summary of the article |
| `keyPoints` | `array` | Top 5 key sentences from the article |
| `wordCount` | `integer` | Total word count |
| `readingTime` | `string` | Estimated reading time (e.g. `"5 min read"`) |
| `image` | `string\|null` | Hero image URL (og:image) |
| `siteName` | `string\|null` | Website name (og:site\_name) |
| `language` | `string\|null` | Document language code |
| `fullText` | `string` | Full cleaned article text (if `includeFullText=true`) |
| `scrapedAt` | `string` | ISO 8601 scrape timestamp |

#### Example output

```json
{
  "position": 1,
  "url": "https://en.wikipedia.org/wiki/Machine_learning",
  "domain": "en.wikipedia.org",
  "title": "Machine learning - Wikipedia",
  "author": null,
  "publishDate": null,
  "description": "Machine learning (ML) is a field of study...",
  "summary": "Machine learning is a subset of artificial intelligence...",
  "keyPoints": ["Machine learning models are often vulnerable to...", "..."],
  "wordCount": 9653,
  "readingTime": "48 min read",
  "image": null,
  "siteName": null,
  "language": "en",
  "scrapedAt": "2025-08-01T12:00:00.000Z"
}
```

### Dataset Views

- **Articles Overview** — table with title, author, date, word count, reading time, URL, and summary
- **Summaries** — focused view showing title, summary, key points, URL, and domain

### Technical Notes

- Uses real Google Chrome browser (Playwright) for handling JavaScript-rendered pages
- Fingerprint injection for natural browser behavior
- Article content is extracted using a multi-selector heuristic that prioritizes `<article>`, `[itemprop="articleBody"]`, and common blog/CMS CSS classes
- Wikipedia `[edit]` and footnote `[1]` markers are automatically removed
- Reference sections (`.reflist`, `.references`) are removed from Wikipedia pages
- For paywalled articles, only publicly visible content is extracted

### License

Apache-2.0

# Actor input Schema

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

List of article URLs to extract and summarize.

## `summaryLength` (type: `string`):

How long the summary should be.

## `includeFullText` (type: `boolean`):

If true, include the full cleaned article text in the output.

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

Maximum number of articles to process.

## Actor input object example

```json
{
  "urls": [
    "https://en.wikipedia.org/wiki/Artificial_intelligence"
  ],
  "summaryLength": "medium",
  "includeFullText": false,
  "maxItems": 10
}
```

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/any-website-url-to-article-summarizer").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"] }

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/any-website-url-to-article-summarizer").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"
  ]
}' |
apify call codingfrontend/any-website-url-to-article-summarizer --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Any Website URL to Article Summarizer",
        "description": "Extract and summarize articles from any website URL. Returns title, author, publish date, word count, reading time, full text, and a concise AI-style summary using extractive summarization.",
        "version": "1.0",
        "x-build-id": "oactPU7QacvTQCHgC"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/codingfrontend~any-website-url-to-article-summarizer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-codingfrontend-any-website-url-to-article-summarizer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/codingfrontend~any-website-url-to-article-summarizer/runs": {
            "post": {
                "operationId": "runs-sync-codingfrontend-any-website-url-to-article-summarizer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/codingfrontend~any-website-url-to-article-summarizer/run-sync": {
            "post": {
                "operationId": "run-sync-codingfrontend-any-website-url-to-article-summarizer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "Article URLs",
                        "type": "array",
                        "description": "List of article URLs to extract and summarize.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "summaryLength": {
                        "title": "Summary Length",
                        "enum": [
                            "short",
                            "medium",
                            "long"
                        ],
                        "type": "string",
                        "description": "How long the summary should be.",
                        "default": "medium"
                    },
                    "includeFullText": {
                        "title": "Include Full Article Text",
                        "type": "boolean",
                        "description": "If true, include the full cleaned article text in the output.",
                        "default": false
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of articles to process.",
                        "default": 10
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
