← Agent Data Hub · Search endpoints · /llms.txt

Demographic Life Expectancy at Birth (Years) by Country

Official World Bank life expectancy at birth in years (essential for pension, insurance, and actuarial agents).

Call it (no API key)

GET https://api.agentdatahub.de/api/v1/call/macro-life-expectancy?country=CH&compact=1

Full metadata: without compact=1 · Markdown: format=llm · Only some fields: add &fields=a,b.c · MCP: tool call_api with {"apiId":"macro-life-expectancy"}

Parameters

countryISO-2 country code e.g. US, DE, CH, CN, JP, GB (default: CH)

Example response (live, compact)

{
  "apiId": "macro-life-expectancy",
  "data_freshness": "cached",
  "data": {
    "country": "CH",
    "country_name": "Switzerland",
    "indicator": "SP.DYN.LE00.IN",
    "unit": "Years",
    "latest_year": "2024",
    "latest_value": 84.41,
    "history": [
      {
        "year": "2024",
        "value": 84.41
      },
      {
        "year": "2023",
        "value": 84.16
      },
      {
        "year": "2022",
        "value": 83.6
      },
      {
        "year": "2021",
        "value": 83.75
      },
      {
        "year": "2020",
        "value": 83
      }
    ]
  },
  "source": "World Bank Open Data (SP.DYN.LE00.IN)",
  "license": "World Bank CC-BY 4.0 Open Data"
}

Recorded history available: /api/v1/history/macro-life-expectancy?country=CH

Source & license

SourceWorld Bank Open Data (SP.DYN.LE00.IN)
LicenseWorld Bank CC-BY 4.0 Open Data
Source URLhttps://api.worldbank.org/v2/country/CH/indicator/SP.DYN.LE00.IN?format=json
Termshttps://www.worldbank.org/en/about/legal/terms-of-use-for-datasets
CategoryFinance & Markets › 6. Macroeconomics & Central Banks