← Agent Data Hub · Search endpoints · /llms.txt
Total primary energy consumption and production for every country and the world, every year since 1980, in quadrillion Btu (quads), million metric tons of oil equivalent (-mtoe) and terajoules (-tj), from the U.S. Energy Information Administration (public domain). Options for series: country: WLD, AE, AF, AG, AL, AM, AO, AR, AT, AU, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BN, BO, BR, BS, BT, BW, BY, BZ, CA, CD, CF, CG, CH, CI, CL, CM, CN, CO, CR, CU, CV, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, ER, ES, ET, FI, FJ, FM, FR, GA, GB, GD, GE, GH, GM, GN, GQ, GR, GT, GW, GY, HN, HR, HT, HU, ID, IE, IL, IN, IQ, IR, IS, IT, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KZ, LA, LB, LC, LK, LR, LS, LT, LU, LV, LY, MA, MD, ME, MG, MK, ML, MM, MN, MR, MT, MU, MV, MW, MX, MY, MZ, NA, NE, NG, NI, NL, NO, NP, NR, NZ, OM, PA, PE, PG, PH, PK, PL, PT, PY, QA, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SI, SK, SL, SN, SO, SR, SS, ST, SV, SY, SZ, TD, TG, TH, TJ, TL, TM, TN, TO, TR, TT, TZ, UA, UG, US, UY, UZ, VC, VE, VN, VU, WS, YE, ZA, ZM, ZW, AW, AS, BM, CK, KY, EH, FK, FO, GI, GP, GL, GF, GU, HK, MO, MS, MQ, NC, NU, PR, PS, PF, RE, SH, PM, TC, TW, VG, VI; measure: consumption, production, consumption-mtoe, production-mtoe, consumption-tj, production-tj.
GET https://api.agentdatahub.de/api/v1/call/primary-energy-by-country?country=WLD&measure=consumption&compact=1
Full metadata: verbose=1 · Markdown: format=llm · Only some fields: add &fields=a,b.c · MCP: tool call_api with {"apiId":"primary-energy-by-country"}
curl:
curl -s 'https://api.agentdatahub.de/api/v1/call/primary-energy-by-country?country=WLD&measure=consumption&compact=1'
Python (standard library only):
import json, urllib.request
url = "https://api.agentdatahub.de/api/v1/call/primary-energy-by-country?country=WLD&measure=consumption&compact=1"
with urllib.request.urlopen(url, timeout=30) as r:
data = json.load(r)
print(json.dumps(data, indent=2)[:2000])
Google Sheets:
=IMPORTDATA("https://api.agentdatahub.de/api/v1/history/primary-energy-by-country?country=WLD&measure=consumption&_order=desc&_limit=500&format=csv")
The recorded history of this call as CSV, newest first. Excel: Data → From Web with the same address.
country | Country or territory (ISO-2 code or name), or WLD for the world (required; several comma-separated to compare, up to 10 series): WLD, AE, AF, AG, AL, AM, AO, AR, AT, AU, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BN, BO, BR, BS, BT, BW, BY, BZ, CA, CD, CF, CG, CH, CI, CL, CM, CN, CO, CR, CU, CV, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, ER, ES, ET, FI, FJ, FM, FR, GA, GB, GD, GE, GH, GM, GN, GQ, GR, GT, GW, GY, HN, HR, HT, HU, ID, IE, IL, IN, IQ, IR, IS, IT, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KZ, LA, LB, LC, LK, LR, LS, LT, LU, LV, LY, MA, MD, ME, MG, MK, ML, MM, MN, MR, MT, MU, MV, MW, MX, MY, MZ, NA, NE, NG, NI, NL, NO, NP, NR, NZ, OM, PA, PE, PG, PH, PK, PL, PT, PY, QA, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SI, SK, SL, SN, SO, SR, SS, ST, SV, SY, SZ, TD, TG, TH, TJ, TL, TM, TN, TO, TR, TT, TZ, UA, UG, US, UY, UZ, VC, VE, VN, VU, WS, YE, ZA, ZM, ZW, AW, AS, BM, CK, KY, EH, FK, FO, GI, GP, GL, GF, GU, HK, MO, MS, MQ, NC, NU, PR, PS, PF, RE, SH, PM, TC, TW, VG, VI |
measure | consumption (default), production (quadrillion Btu); -mtoe and -tj for other units (required; several comma-separated to compare, up to 10 series): consumption, production, consumption-mtoe, production-mtoe, consumption-tj, production-tj |
series | Optional full series key as returned by /ask (instead of the parameters above), comma-separated for several |
from | Optional start YYYY, YYYY-MM or YYYY-MM-DD |
to | Optional end YYYY, YYYY-MM or YYYY-MM-DD |
last | Number of most recent periods when no from/to is given, 1-500 (default: 13) |
group | Optional country group instead of country (EU27, EA, OECD, G7, G20, a continent): one row per member, newest value each |
period | Only with group: latest (default) or common (one period across members) |
{
"apiId": "primary-energy-by-country",
"trust": "checked",
"data_freshness": "cached",
"data": {
"country": "WLD",
"measure": "consumption",
"series": "World — Total energy consumption (quadrillion Btu, yearly)",
"unit": "quadrillion Btu",
"frequency": "A",
"latest": {
"period": "2024",
"value": 606.037
},
"history": [
{
"period": "2012",
"value": 526.0972
},
{
"period": "2013",
"value": 534.4333
},
{
"period": "2014",
"value": 538.2782
},
{
"period": "2015",
"value": 538.5048
},
{
"period": "2016",
"value": 544.1037
},
{
"period": "2017",
"value": 549.2969
},
{
"period": "2018",
"value": 562.2398
},
{
"period": "2019",
"value": 570.5483
},
{
"period": "2020",
"value": 546.5006
},
{
"period": "2021",
"value": 573.0386
},
{
"period": "2022",
"value": 579.3161
},
{
"period": "2023",
"value": 592.0332
},
{
"period": "2024",
"value": 606.037
}
],
"available": {
"from": "1980",
"to": "2024",
"points": 45
},
"note": "World total of the EIA.",
"verification": {
"checked_at": "2026-12-01T04:50:40.854Z",
"checks": []
},
"source": {
"publisher": "U.S. Energy Information Administration (EIA)",
"licence": "Public domain (U.S. government publication); EIA asks for an acknowledgment with the publication date",
"licence_url": "https://www.eia.gov/about/copyrights_reuse.php",
"source_url": "https://www.eia.gov/international/data/world",
"source_url_level": "dataset",
"series_title": "Total energy consumption, World, Annual"
},
"attribution": "Source: U.S. Energy Information Administration, International Energy Statistics"
},
"source": "U.S. Energy Information Administration (EIA)",
"source_url": "https://www.eia.gov/international/data/world",
"license": "Public domain (U.S. government publication); EIA asks for an acknowledgment with the publication date",
"licence_status": "yellow",
"as_of": "2024",
"checked": "2026-12-01"
}
Recorded history available: /api/v1/history/primary-energy-by-country?country=WLD&measure=consumption
| Source | U.S. Energy Information Administration (EIA) |
| License | Public domain (U.S. government publication); EIA asks for an acknowledgment with the publication date |
| Source URL | https://www.eia.gov/about/copyrights_reuse.php |
| Terms | https://www.eia.gov/about/copyrights_reuse.php |
| Category | Energy & Climate › Energy by Country (EIA) · more: us-retail-fuel-prices · world-air-quality · world-climate-normals |