# Economist Scraper (`kibaale/economist-scraper`) Actor

Full Economist articles from every section, plus complete daily World in Brief issues, as clean structured records — body in reading order, headline, teaser, dates, section, lead image and links. One URL in, one record out. No login, no API key.

- **URL**: https://apify.com/kibaale/economist-scraper.md
- **Developed by:** [kibalee](https://apify.com/kibaale) (community)
- **Stats:** 2 total users, 1 monthly users, 80.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.00 / 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/actors/running/actors-in-store.md#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

## Economist Scraper

Clean, structured records from The Economist — no browser, no login, no API
key. Paste an URL and get one JSON record per page, ready for monitoring,
newsletters, analysis or AI pipelines.

Two kinds of pages are supported:

- **Full articles from any section** — one record with the complete body in
  reading order, headline, teaser, section tagline, publication and
  modification times, section, lead image, inline images, outbound links and
  word count.
- **World in Brief** — every daily issue is split across several pages. The
  actor follows the pagination chain (forwards *and* backwards, so you can
  start from any page of the issue) and merges the whole issue into one
  record: the overview, every brief, all dates, images, audio and outbound
  links.

### What you get

- **Full articles, one record each** — body paragraphs in reading order,
  with headline, teaser, rubric and fly-title when the article has them
- **One record per daily issue** — the World in Brief overview plus all
  briefs (pages are fetched and merged automatically)
- **Clean structured body** — every paragraph in reading order
- **Editorial metadata** — article or issue id, date, publication and
  modification times, headline, teaser, section
- **Media** — lead image with alt text and credit, inline images, and the
  text-to-speech audio link when the page provides one
- **Links** — every economist.com link inside the content, deduplicated
- **Forgiving input** — start from *any* page of a World in Brief issue;
  earlier and later pages are followed until the whole issue is complete
- **Always fresh** — content is fetched live on every run

#### A note on data availability

Author attribution is not included in the data this actor receives (it does
not log in to economist.com), so the record's `byline` is always an empty
list. Fields stay empty when the source is empty — nothing is invented.

### Quick start

Input:

```json
{
  "url": "https://www.economist.com/middle-east-and-africa/2026/08/24/iran-will-be-able-to-shrug-off-americas-financial-threats",
  "fetchAllPages": true
}
```

`fetchAllPages` only matters for World in Brief issues — a standard article
is always returned as one record.

### Example records

#### A full article

Real output from the URL above (first body paragraph and links trimmed):

```json
{
  "id": "62301743-9ff1-4cae-9e1a-a1498af7a5d8",
  "url": "https://www.economist.com/middle-east-and-africa/2026/08/24/iran-will-be-able-to-shrug-off-americas-financial-threats",
  "headline": "Iran will be able to shrug off America’s financial threats",
  "teaser": "In the face of fresh sanctions, the regime is defiant",
  "rubric": "In the face of fresh sanctions, the regime is defiant",
  "flyTitle": "Losing pressure",
  "date": "2026-08-27",
  "firstPublished": "2026-08-27T15:45:02.000Z",
  "section": "middle-east-and-africa",
  "byline": [],
  "body": ["WHEN DONALD TRUMP began Operation Epic Fury nearly six months ago he hoped that America’s military might would crush Iran’s regime. When its bombs failed, he bet on sweeteners...", "..."],
  "images": [
    {
      "url": "https://www.economist.com/content-assets/images/20260829_MAC047.png",
      "altText": "",
      "caption": "",
      "credit": "The Economist"
    }
  ],
  "leadImage": {
    "url": "https://www.economist.com/content-assets/images/20260829_MAP502.jpg",
    "altText": "Iranians walk past an anti-US billboard featuring US President Donald Trump in southern Tehran, Iran.",
    "caption": "",
    "credit": "EPA/Shutterstock"
  },
  "linksOut": ["https://www.economist.com/united-states/2026/07/19/the-iran-war-is-americas-least-popular-since-polls-began", "..."],
  "wordCount": 1112
}
```

#### World in Brief issue (merged)

Real output for a daily issue (paragraphs trimmed):

```json
{
  "id": "f78ff34d-dc74-4af7-8312-db68223b7f3e",
  "url": "https://www.economist.com/the-world-in-brief/2026/09/06/581aef78-7b03-432c-8685-e33c1b0c86fb",
  "headline": "World in Brief: America strikes Iranian oil tankers; Trump envoys head to Ukraine and Russia",
  "date": "2026-09-06",
  "firstPublished": "2026-09-06T00:00:00.000Z",
  "section": "the-world-in-brief",
  "byline": [],
  "pages": 8,
  "body": ["America said it struck three Iranian oil tankers after Iran launched ballistic missiles ...", "..."],
  "stories": [
    {
      "page": 2,
      "headline": "Oil on troubled waters",
      "body": ["On Sunday the Organisation of the Petroleum Exporting Countries ..."],
      "images": []
    }
  ],
  "linksOut": ["https://www.economist.com/middle-east-and-africa/2026/08/24/iran-will-be-able-to-shrug-off-americas-financial-threats"],
  "leadImage": {"url": "https://www.economist.com/content-assets/images/20260905_IBP907.jpg", "caption": "..."}
}
```

### Input fields

| Field | Description |
|---|---|
| `url` | Full economist.com URL — a standard article in any section, or a World in Brief page (`www.economist.com/the-world-in-brief/YYYY/MM/DD/<id>`) |
| `fetchAllPages` | World in Brief only: when enabled (default), every page of the issue is fetched and merged into one record. Disable to scrape only the page in the URL. |

### Record fields

| Field | Meaning |
|---|---|
| `id` | Article content id or issue id (World in Brief) |
| `url` / `requestedUrl` | Page URL / the URL you pasted |
| `headline` / `teaser` | Headline and teaser |
| `rubric` / `flyTitle` | Section tagline and the small label above the headline — when the page provides them (usually present on articles, not on World in Brief) |
| `date` / `firstPublished` / `lastModified` | Date and timestamps (ISO 8601, UTC) |
| `section` / `sectionUrl` | Section path, e.g. `middle-east-and-africa` |
| `byline` | Always an empty list (see note on data availability) |
| `summary` | Empty unless the source provides one |
| `body` | Paragraphs in reading order (the overview page for World in Brief) |
| `stories` | World in Brief: the individual briefs on pages 2+ (`page`, `headline`, `teaser`, `body`, `images`, `linksOut`) |
| `linksOut` | All economist.com links inside the content |
| `images` / `leadImage` | Inline images and the lead image (`url`, `altText`, `caption`, `credit`) |
| `audio` | Text-to-speech audio (`url`, `durationSeconds`, `isAiGenerated`) when the page provides one |
| `page` / `pages` / `pageUrls` | Pagination context (World in Brief) and all page URLs |
| `wordCount` | Total words |

### Notes

- Times are UTC (ISO 8601 with `Z`) — unambiguous, convert freely.
- Articles are always returned as a single record. In single-page mode
  (`fetchAllPages: false`) a World in Brief record describes only the page in
  the URL; the same shape minus `stories`.
- Full article text comes from what the pages themselves make publicly
  available; this actor performs no login, keeps no session and bypasses
  nothing.

### How much does it cost you?

One World in Brief issue = one dataset item; a standard article = one item.
You pay per item only when a run actually finishes — failed runs cost
nothing.

### FAQ

**Can I scrape any economist.com article?** Pages the actor supports are
standard articles in any section and World in Brief issues. Both work the
same way: paste the URL, get one clean record.

**How is a World in Brief issue merged?** The actor starts from the page in
your URL and follows the issue's pagination in both directions until every
page of the day's issue is collected, then combines them into a single
record. Disable `fetchAllPages` to get just the one page instead.

**Why is `byline` empty?** The data this actor receives does not include
author attribution — no login is used (see note on data availability).

**What if the issue has changed by the time I run?** Each run fetches the
issue for the date in the URL. Old URLs keep returning their own issue;
nothing is cached, everything is live.

# Actor input Schema

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

Full URL of the economist.com page you want to scrape — World in Brief (e.g. https://www.economist.com/the-world-in-brief/2026/09/06/581aef78-7b03-432c-8685-e33c1b0c86fb) or a standard article in any section. World in Brief issues are followed across pages and merged into one complete record.

## `fetchAllPages` (type: `boolean`):

World in Brief issues are split across several pages. When enabled (default), the actor follows the pagination chain and merges every page into one complete record of the day. Disable to scrape only the exact page in the URL.

## Actor input object example

```json
{
  "url": "https://www.economist.com/the-world-in-brief/2026/09/06/581aef78-7b03-432c-8685-e33c1b0c86fb",
  "fetchAllPages": true
}
```

# Actor output Schema

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

Scrape records stored in the run's default dataset

# 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 = {
    "url": "https://www.economist.com/the-world-in-brief/2026/09/06/581aef78-7b03-432c-8685-e33c1b0c86fb"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kibaale/economist-scraper").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 = { "url": "https://www.economist.com/the-world-in-brief/2026/09/06/581aef78-7b03-432c-8685-e33c1b0c86fb" }

# Run the Actor and wait for it to finish
run = client.actor("kibaale/economist-scraper").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 '{
  "url": "https://www.economist.com/the-world-in-brief/2026/09/06/581aef78-7b03-432c-8685-e33c1b0c86fb"
}' |
apify call kibaale/economist-scraper --silent --output-dataset

```

## MCP server setup

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

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/e8ID6zPp5owNJ8ebS/builds/bJudKRF6JfPTFwYdk/openapi.json
