# Our World in Data Chart & Article Extractor (`nimbryxo-studio/our-world-in-data-chart-and-article-extractor`) Actor

Browse Our World in Data articles by topic or keyword, download the dataset behind any chart by its slug, or pull country profile pages, with article, chart, and data-row records.

- **URL**: https://apify.com/nimbryxo-studio/our-world-in-data-chart-and-article-extractor.md
- **Developed by:** [Nimbryxo-studio](https://apify.com/nimbryxo-studio) (community)
- **Categories:** Automation, News, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 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.
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

## Our World in Data Chart & Article Extractor

Our World in Data publishes its research as articles, topic pages and interactive charts, and most charts have a downloadable dataset behind them. This actor turns those public resources into structured records: searchable articles, a chart catalog you can browse by topic or country, full chart metadata plus wide or long data rows, and country profiles that list the indicators available for that country.

No login, cookie or API key is needed. Every request goes to a public Our World in Data page or endpoint.

### What you can collect

- **Articles** — keyword search across OWID's articles, data insights, announcements and topic pages, with topic, author, page-type, date-range and sort filters.
- **Chart catalog** — find chart slugs by keyword, topic or the countries a chart covers. Use the slugs with the chart-data modes.
- **Chart data** — fetch one chart by slug or URL: title, subtitle, citation, units, column descriptions, source URLs, and its full CSV dataset.
- **Chart data bulk** — fetch several charts in one run, with the same filters.
- **Country profiles** — country name, code, profile pages, and the charts/indicators available for that country.

### Quick start

Recent climate articles:

```json
{
  "mode": "articles",
  "searchQuery": "climate change",
  "topic": "Climate Change",
  "sortBy": "newest",
  "maxItems": 25
}
```

One chart's data for two countries and a short year range:

```json
{
  "mode": "chartData",
  "chartSlug": "life-expectancy",
  "entities": ["Germany", "France"],
  "yearFrom": 2000,
  "yearTo": 2023,
  "maxItems": 100
}
```

Discover chart slugs for a country:

```json
{
  "mode": "chartCatalog",
  "searchQuery": "energy",
  "entities": ["Germany"],
  "maxItems": 50
}
```

A country profile with its available indicators:

```json
{
  "mode": "countries",
  "countries": ["Germany"],
  "maxIndicatorsPerCountry": 50
}
```

### Inputs

| Field | Type | Default | What it does |
|---|---|---|---|
| `mode` | select | `articles` | `articles`, `chartCatalog`, `chartData`, `chartDataBulk`, or `countries`. |
| `searchQuery` | text | — | Keyword for articles and chart catalog; also a country-name search in countries mode when no country list is set. |
| `topic` | select | All topics | Restricts articles and chart catalog results to one OWID topic. Legacy topic slugs are accepted. |
| `author` | select | Any author | Restricts articles to one OWID author. |
| `articleType` | select | `editorial` | Editorial (articles, data insights, announcements, topic pages), one exact page type, or everything. |
| `sortBy` | select | `newest` | `newest`, `oldest`, or search `relevance`. |
| `dateFrom` | text | — | Earliest publication date, `YYYY-MM-DD`. |
| `dateTo` | text | — | Latest publication date, `YYYY-MM-DD`. |
| `includeContent` | boolean | `false` | Adds OWID's full article text to each article record. |
| `includeArticleDetails` | boolean | `false` | Visits each selected article page to fill related charts and any missing page metadata. Slower. |
| `chartSlug` | text | — | One chart slug or full chart URL, e.g. `life-expectancy`. |
| `chartSlugs` | string list | `[]` | Several chart slugs/URLs for bulk chart data. |
| `entities` | string list | `[]` | Keep chart rows for these countries/regions. Names (`Germany`) and codes (`DEU`) both work. Empty means all. |
| `columns` | string list | `[]` | Keep only these data columns, matched by CSV header, short name, display title or variable ID. Empty means all. |
| `yearFrom` | integer | — | Earliest year in chart data rows. |
| `yearTo` | integer | — | Latest year in chart data rows. |
| `dataFormat` | select | `wide` | `wide`: one record per entity-year; `long`: one record per entity-year-column. |
| `includeChartConfig` | boolean | `true` | Emit a chart metadata record before the chart's data rows. |
| `countries` | string list | `[]` | Country names, slugs or ISO codes for countries mode. Empty uses `searchQuery`, then all listed countries. |
| `maxIndicatorsPerCountry` | integer | `100` | How many chart indicators to list inside each country record, up to `5,000`. |
| `maxItems` | integer | `100` | Hard cap on emitted records, up to `25,000`. |

### Output per record

Every record has `recordType` and `scrapedAt`. Empty values are omitted at every depth — a field is present only when the source really has it.

#### Articles (`recordType: "article"`)

`articleSlug`, `title`, `publishedAt`, `updatedAt`, `authors`, `primaryAuthor`, `excerpt`, `excerptLong`, `thumbnailUrl`, `tags`, `pageType`, `importance`, `availableEntities`, `relatedCharts`, `content` (when requested), `articleUrl`.

#### Chart catalog (`recordType: "chart"`)

`chartSlug`, `title`, `subtitle`, `variantName`, `chartType`, `chartTypes`, `tags`, `availableEntityCount`, `publishedAt`, `updatedAt`, `queryParams`, `chartUrl`, `csvUrl`, `metadataUrl`, `searchResultUrl`.

#### Chart metadata (`recordType: "chartConfig"`)

`chartSlug`, `chartId`, `title`, `subtitle`, `note`, `variantName`, `originUrl`, `chartVersion`, `chartTypes`, `availableTabs`, `citation`, `source`, `columnDetails`, `dataColumns`, `unit`, `entityType`, `entityCount`, `grapherQueryParams`, `dateDownloaded`, `selectedEntityNames`, `dimensionVariableIds`, `isPublished`, `hasMapTab`, `lastUpdated`, `nextUpdate`, `chartUrl`, `csvUrl`, `metadataUrl`, `configUrl`, `searchResultUrl`, `dataAvailable`.

When a chart has no downloadable CSV, the record also includes `dataUnavailableReason`, `valuesUrl` (OWID's public start/end values endpoint) and `previewValues` (the entities and values OWID shows in its search result for that chart). These are real OWID values, not a full time series.

`columnDetails` is one object per data column with `column`, `titleShort`, `titleLong`, `shortName`, `unit`, `timespan`, `type`, `variableId`, `lastUpdated`, `nextUpdate`, `citationShort`, `descriptionShort`, and the chart's display name when it has one.

#### Chart data rows (`recordType: "chartDataRow"`)

Wide format: `chartSlug`, `chartTitle`, `entity`, `entityCode`, `year` or `date`, one field per data column (named from the chart's own CSV header, in camelCase), and `sourceUrl`.

Long format: `chartSlug`, `chartTitle`, `entity`, `entityCode`, `year` or `date`, `column`, `columnTitle`, `columnName`, `unit`, `value`, and `sourceUrl`.

#### Countries (`recordType: "country"`)

`countrySlug`, `countryName`, `countryCode`, `countryShortCode`, `countryUrl`, `searchUrl`, `description`, `thumbnailUrl`, `tags`, `profiles`, `profileCount`, `availableIndicatorCount`, `availableIndicators`, `relatedCharts`, plus `isHistorical` / `isUnlisted` when they apply.

Each profile object has `title`, `profileSlug`, `profileUrl`, `excerpt`, `tags`, `thumbnailUrl`, `publishedAt` and `updatedAt`. Each available indicator has `chartSlug`, `title`, `subtitle`, `tags`, `chartTypes` and `chartUrl`.

### How the filters combine

- Article filters compose: query + topic + author + page type + date range are all applied together.
- Chart data filters compose: selected chart(s) + entities + years + columns.
- `entities` accepts country names as they appear in the chart (`United States`), OWID/ISO codes (`USA`, `OWID_WRL` for World), two-letter codes (`DE`) and country slugs. Matching is case-insensitive and ignores a leading `~`; short forms are expanded through OWID's own country catalog so they match the chart's names and codes.
- `columns` accepts the CSV header, a short name (`life_expectancy_0`), a display title, `titleLong`, or a numeric OWID variable ID. A token that matches nothing produces no data rows rather than all columns.
- `dataFormat: "long"` is useful when charts have many columns: each value becomes its own record with its unit.

### Data quality and limits

- OWID does not redistribute every chart. About 2% of charts return `403` for their CSV and about 4% return `404`. The actor still emits their metadata when it exists, marks `dataAvailable: false`, adds `dataUnavailableReason`, and includes `previewValues` and `valuesUrl` when OWID publishes them. The run status names the affected slugs. The preview is not a full time series.
- Chart rows are the full public CSV unless `entity`, `yearFrom`, `yearTo` or `columns` narrows them.
- Article search covers OWID's public search index, not just the recent RSS feed. The index has 2,013 `pages` and 1,179 chronological records; merging and deduplicating them yields about 2,109 local records across all page types. Some canonical OWID pages that appear in the sitemap are absent from that index (for example `battery-price-decline`), so keyword search cannot return every sitemap URL. Date filtering is applied to the publication date.
- The chart index caps a single query at 3,000 hits. The actor partitions by topic tag when you request the full catalog, so `chartCatalog` without filters can return all 4,092 `type:chart` records observed on 2026-11-21. The full catalog peaks around 215 MiB locally.
- Country profile counts come from OWID; `availableIndicators` is capped by `maxIndicatorsPerCountry` while `availableIndicatorCount` reports the full total. Germany's 3,010 indicators fit within the 5,000 maximum and peak around 135 MiB locally.
- `maxItems` caps emitted records across a run, including chart metadata records, and now allows up to 25,000. Verified locally (45.6 s, 131 MiB) and on the 512 MB cloud build (25,000 rows, 34.315 s, 112 MB).
- Some charts use `Day` instead of `Year`; those rows expose a `date` field and a derived `year`.
- The actor never fabricates missing values and omits empty fields.

### FAQ

**Do I need an API key, login or proxy?**
No. Everything is public. The actor does not ask for cookies or proxy configuration and works without either.

**Where do I get a chart slug?**
Use `chartCatalog` mode, or copy the part after `/grapher/` in a chart URL. Chart-data inputs also accept the full URL.

**Why does a chart return metadata but no rows?**
OWID publishes metadata for more charts than it can redistribute as CSV. `dataAvailable`, `dataUnavailableReason`, `previewValues`, `valuesUrl` and the run status tell you which case you hit.

**Why do chart columns change from chart to chart?**
Each chart publishes its own data columns. Wide mode keeps those names (camelCased); long mode puts each column into `column`, `columnTitle` and `unit` so every chart has the same shape.

**Can I get one country's full history for many charts?**
Yes. Use `chartDataBulk` with several slugs and `entities: ["Germany"]`, or use `countries` mode to discover indicators first.

**Does article mode return every page OWID has ever published?**
It searches OWID's public page index, which covers articles, data insights, announcements, topic pages, about pages, profiles and featured visualizations. It does not cover every canonical sitemap URL: a small number of pages are absent from the search index and cannot be found by keyword. Choose `articleType` to narrow the result; `editorial` is the default.

**Can I filter articles by author and date together?**
Yes — combine `author`, `dateFrom`, `dateTo`, `topic` and `searchQuery` in one run.

**Is this affiliated with Our World in Data?**
No. It reads public pages and data files and is not affiliated with, endorsed by, or connected to Our World in Data or the Global Change Data Lab. OWID's charts, articles and data are published under CC BY unless stated otherwise; third-party data keeps its own terms, so check the citation in each chart's metadata before republishing.

# Actor input Schema

## `mode` (type: `string`):

Choose what to collect.

## `searchQuery` (type: `string`):

Keyword search. Used by articles mode and chart catalog mode, and as a country-name search in countries mode when no country list is set.

## `topic` (type: `string`):

Restrict articles (and chart catalog results) to one OWID topic tag.

## `author` (type: `string`):

Restrict articles to one OWID author.

## `articleType` (type: `string`):

Which page types articles mode may return. 'Editorial' covers articles, data insights, announcements and topic pages; 'All' also includes profiles and featured visualizations.

## `sortBy` (type: `string`):

Order of article records.

## `dateFrom` (type: `string`):

Only articles published on or after this date (YYYY-MM-DD).

## `dateTo` (type: `string`):

Only articles published on or before this date (YYYY-MM-DD).

## `includeContent` (type: `boolean`):

Add OWID's full text to each article record (larger output).

## `includeArticleDetails` (type: `boolean`):

Visit each selected article page to fill related charts and any missing page metadata. Slower; off by default.

## `chartSlug` (type: `string`):

A Grapher slug or full URL, e.g. 'life-expectancy' or the URL of that chart.

## `chartSlugs` (type: `array`):

Several chart slugs/URLs for chartDataBulk mode.

## `entities` (type: `array`):

Keep chart data rows for these entities only. Names ('Germany'), OWID/ISO codes ('DEU'), two-letter codes ('DE') and slugs all work. Empty means all entities.

## `columns` (type: `array`):

Keep only these data columns. Match by CSV header, short name, titleLong, display title or OWID variable ID. Empty means every column.

## `yearFrom` (type: `integer`):

Earliest year to keep in chart data rows.

## `yearTo` (type: `integer`):

Latest year to keep in chart data rows.

## `dataFormat` (type: `string`):

'Wide' keeps one record per entity-year with one field per data column. 'Long' emits one record per entity-year-column with column, value and unit fields.

## `includeChartConfig` (type: `boolean`):

Emit the chart's title, citation, units, column details and source URLs before its rows.

## `countries` (type: `array`):

Countries mode: names, slugs or ISO codes. Empty means all listed countries, or the searchQuery country match.

## `maxIndicatorsPerCountry` (type: `integer`):

How many chart indicators to list inside each country record, up to 5,000.

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

Hard cap on emitted records, up to 25,000.

## Actor input object example

```json
{
  "mode": "articles",
  "searchQuery": "climate change",
  "topic": "",
  "author": "",
  "articleType": "editorial",
  "sortBy": "newest",
  "includeContent": false,
  "includeArticleDetails": false,
  "chartSlug": "life-expectancy",
  "chartSlugs": [],
  "entities": [],
  "columns": [],
  "dataFormat": "wide",
  "includeChartConfig": true,
  "countries": [],
  "maxIndicatorsPerCountry": 100,
  "maxItems": 100
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset containing article, chart, chart-data, and country records. Empty values are omitted at every depth.

# 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 = {
    "mode": "articles",
    "searchQuery": "climate change",
    "topic": "",
    "author": "",
    "articleType": "editorial",
    "sortBy": "newest",
    "includeContent": false,
    "includeArticleDetails": false,
    "chartSlug": "life-expectancy",
    "chartSlugs": [],
    "entities": [],
    "columns": [],
    "dataFormat": "wide",
    "includeChartConfig": true,
    "countries": [],
    "maxIndicatorsPerCountry": 100,
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("nimbryxo-studio/our-world-in-data-chart-and-article-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 = {
    "mode": "articles",
    "searchQuery": "climate change",
    "topic": "",
    "author": "",
    "articleType": "editorial",
    "sortBy": "newest",
    "includeContent": False,
    "includeArticleDetails": False,
    "chartSlug": "life-expectancy",
    "chartSlugs": [],
    "entities": [],
    "columns": [],
    "dataFormat": "wide",
    "includeChartConfig": True,
    "countries": [],
    "maxIndicatorsPerCountry": 100,
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("nimbryxo-studio/our-world-in-data-chart-and-article-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 '{
  "mode": "articles",
  "searchQuery": "climate change",
  "topic": "",
  "author": "",
  "articleType": "editorial",
  "sortBy": "newest",
  "includeContent": false,
  "includeArticleDetails": false,
  "chartSlug": "life-expectancy",
  "chartSlugs": [],
  "entities": [],
  "columns": [],
  "dataFormat": "wide",
  "includeChartConfig": true,
  "countries": [],
  "maxIndicatorsPerCountry": 100,
  "maxItems": 100
}' |
apify call nimbryxo-studio/our-world-in-data-chart-and-article-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/our-world-in-data-chart-and-article-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/ioGlcDa1GgkfCF8WV/builds/otRcer49ceMIc3esl/openapi.json
