Skip to content

Our World in Data API: Get statistic

Finds the Our World in Data chart that best matches a statistic and returns its country-by-year numeric values, definition and source.

ourworldindata.org (opens in a new tab)Version 1ReadNo sign-inVerified Nov 2, 2026

Unofficial. Not affiliated with or endorsed by Our World in Data.

Inputs

Values from the run on Oct 23, 2026, shown under Output.

To Year optionalto_year

Last year to include. Example: 2020. Defaults to the latest available year.

2020

Whole number.

Countries optionalcountries

Country names separated by commas. Example: France, Germany. Defaults to World.

France, Germany

Default World.

From Year optionalfrom_year

First year to include. Example: 2000. Defaults to the earliest available year.

2018

Whole number.

Statistic, requiredstatistic

The statistic to measure, in plain words. Example: life expectancy.

life expectancy

Output

From a run on Oct 23, 2026, shortened for this page.
{  "unit": "years",  "source": "Riley (2005); Zijdeman et al. (2015); HMD (2025); UN WPP (2024) – with major processing by Our World in Data",  "values": [    {      "year": 2018,      "value": 82.5682,      "country": "France"    },    {      "year": 2019,      "value": 82.7304,      "country": "France"    },    {      "year": 2020,      "value": 82.1993,      "country": "France"    }  ],  "chart_link": "https://ourworldindata.org/grapher/life-expectancy",  "definition": "Period life expectancy is the number of years the average person born in a certain year would live if they experienced the same chances of dying at each age as people did that year.",  "chart_title": "Life expectancy"}
Price
1 credit per completed run (1¢ with pay as you go); failed runs are free.
Method
ourworldindata.org/get_statistic
Returns
chart title, unit, definition, source, chart link, values by country and year

Use it from your agent

Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method ourworldindata.org/get_statistic with the inputs above.

Ask your agent

  • Get the yearly CO2 emissions per capita for Japan and South Korea from 1990 to 2015, with the source and definition.
  • I need life expectancy at birth for Brazil, Nigeria and India across 1960 through 2019, values by country and year.
  • Pull the share of population living in extreme poverty for Kenya between 2000 and 2018, including the chart link.
  • What is the global child mortality rate by year up to 2010? Include the unit and data source.
  • Show me renewable electricity share of total generation for Germany, Spain and Denmark from 2005 to the latest year available on ourworldindata.org.

See more

  • Looks up a World Bank statistic for a country and returns its annual values and latest value for the selected years.

    data.worldbank.org/get_country_statistic
  • Ranks countries by a World Development Indicators statistic for a given year, or for the latest year with broad country coverage. Regional aggregates and countries without data for that year are left out.

    worldbank.org/compare_countries
  • Gets the latest WHO value of a health statistic for a country, with sex-specific values, the regional value for the same year, and up to 10 years of history.

    who.int/get_country_health_statistics
  • Looks up an official Eurostat statistic for an EU or EEA country and the EU27 figure for the same period. Quarterly and half-yearly series return the reporting period that contains a requested month.

    ec.europa.eu/get_statistic
  • Gets World Economic Outlook figures for a country or region by year, labelled as actual or forecast. Measures the IMF does not publish for a year are null.

    imf.org/get_economic_forecast
  • Gets a public FRED economic series by plain name or series ID, with its observations, latest value and source details.

    fred.stlouisfed.org/get_economic_indicator
  • Compares the latest reported value of an economic indicator across countries in a region, highest first. World includes all listed countries; Australia uses the Oceania region.

    tradingeconomics.com/list_countries_by_indicator
  • Gets Kworb's latest YouTube music chart, worldwide or for one country, ordered by daily views. The worldwide chart covers the past 24 hours. Country charts report daily track streams.

    kworb.net/get_youtube_music_chart