API reference / Energy & global macro

Energy & global macro

Energy commodity benchmarks and World Bank international indicators.

4 endpoints. Pay per call in USDC via x402 with no account, or get unlimited calls for $99/mo. Every response is shaped { ticker, data, source, as_of }.

GET/api/v1/energy$0.02

Energy commodities snapshot: WTI, Brent, natural gas, gasoline prices in one call

Every energy benchmark in one call: WTI and Brent crude oil spot, Henry Hub natural gas spot, and US regular retail gasoline — each with its latest price, prior reading, and change. The catalog's commodities feed (no equity/forex/crypto endpoint carries these). For one benchmark with history use /api/v1/energy/{product}. Source: U.S. Energy Information Administration (EIA).

Example request
GET /api/v1/energy
Response type (TypeScript)
interface EnergyResponse {
  source: string;
  as_of: string;
  series: string;
  products: Array<{
    product: string;
    series_id: string;
    name: string;
    unit: string;
    eia_units: string;
    frequency: string;
    latest: {
      date: string;
      value: number;
    };
    prior: {
      date: string;
      value: number;
    };
    change: number;
    change_percent: number;
  }>;
  attribution: string;
}
Example response (click to expand)
{
  "source": "eia",
  "as_of": "2026-06-01T00:00:00.000Z",
  "series": "energy_prices",
  "products": [
    {
      "product": "wti",
      "series_id": "RWTC",
      "name": "WTI Crude Oil — Cushing, OK Spot Price FOB",
      "unit": "usd_per_barrel",
      "eia_units": "$/BBL",
      "frequency": "daily",
      "latest": {
        "date": "2026-06-01",
        "value": 95.96
      },
      "prior": {
        "date": "2026-05-29",
        "value": 91.16
      },
      "change": 4.8,
      "change_percent": 5.27
    },
    {
      "product": "brent",
      "series_id": "RBRTE",
      "name": "Brent Crude Oil — Europe Spot Price FOB",
      "unit": "usd_per_barrel",
      "eia_units": "$/BBL",
      "frequency": "daily",
      "latest": {
        "date": "2026-06-01",
        "value": 98.29
      },
      "prior": {
        "date": "2026-05-29",
        "value": 92.88
      },
      "change": 5.41,
      "change_percent": 5.82
    },
    {
      "product": "natural-gas",
      "series_id": "RNGWHHD",
      "name": "Henry Hub Natural Gas Spot Price",
      "unit": "usd_per_mmbtu",
      "eia_units": "$/MMBTU",
      "frequency": "daily",
      "latest": {
        "date": "2026-06-01",
        "value": 3.07
      },
      "prior": {
        "date": "2026-05-29",
        "value": 3.34
      },
      "change": -0.27,
      "change_percent": -8.08
    },
    {
      "product": "gasoline",
      "series_id": "EMM_EPMR_PTE_NUS_DPG",
      "name": "U.S. Regular All Formulations Retail Gasoline Price",
      "unit": "usd_per_gallon",
      "eia_units": "$/GAL",
      "frequency": "weekly",
      "latest": {
        "date": "2026-06-01",
        "value": 4.305
      },
      "prior": {
        "date": "2026-05-25",
        "value": 4.475
      },
      "change": -0.17,
      "change_percent": -3.8
    }
  ],
  "attribution": "Source: U.S. Energy Information Administration (EIA)"
}
GET/api/v1/energy/{product}$0.01

One energy benchmark price with history: wti, brent, natural-gas, or gasoline

Price history for one energy benchmark — `wti` (WTI crude, $/bbl), `brent` (Brent crude, $/bbl), `natural-gas` (Henry Hub, $/MMBtu), or `gasoline` (US regular retail, $/gal) — with the latest value, prior reading, change, and recent history. Tune with `?limit=` (default 30, max 365). The catalog's commodities feed. Source: U.S. Energy Information Administration (EIA).

Example request
GET /api/v1/energy/wti
Response type (TypeScript)
interface EnergyPriceResponse {
  source: string;
  as_of: string;
  product: string;
  series_id: string;
  name: string;
  unit: string;
  eia_units: string;
  frequency: string;
  latest: {
    date: string;
    value: number;
  };
  prior: {
    date: string;
    value: number;
  };
  change: number;
  change_percent: number;
  history: Array<{
    date: string;
    value: number;
  }>;
  attribution: string;
}
Example response (click to expand)
{
  "source": "eia",
  "as_of": "2026-06-01T00:00:00.000Z",
  "product": "wti",
  "series_id": "RWTC",
  "name": "WTI Crude Oil — Cushing, OK Spot Price FOB",
  "unit": "usd_per_barrel",
  "eia_units": "$/BBL",
  "frequency": "daily",
  "latest": {
    "date": "2026-06-01",
    "value": 95.96
  },
  "prior": {
    "date": "2026-05-29",
    "value": 91.16
  },
  "change": 4.8,
  "change_percent": 5.27,
  "history": [
    {
      "date": "2026-06-01",
      "value": 95.96
    },
    {
      "date": "2026-05-29",
      "value": 91.16
    },
    {
      "date": "2026-05-28",
      "value": 92.65
    },
    {
      "date": "2026-05-27",
      "value": 92.35
    },
    {
      "date": "2026-05-26",
      "value": 97.63
    },
    {
      "date": "2026-05-22",
      "value": 100.35
    },
    {
      "date": "2026-05-21",
      "value": 100.2
    },
    {
      "date": "2026-05-20",
      "value": 101.69
    },
    {
      "date": "2026-05-19",
      "value": 112.09
    },
    {
      "date": "2026-05-18",
      "value": 112.25
    },
    {
      "date": "2026-05-15",
      "value": 108.99
    },
    {
      "date": "2026-05-14",
      "value": 104.66
    },
    {
      "date": "2026-05-13",
      "value": 104.52
    },
    {
      "date": "2026-05-12",
      "value": 105.78
    },
    {
      "date": "2026-05-11",
      "value": 101.56
    },
    {
      "date": "2026-05-08",
      "value": 98.87
    },
    {
      "date": "2026-05-07",
      "value": 98.38
    },
    {
      "date": "2026-05-06",
      "value": 98.75
    },
    {
      "date": "2026-05-05",
      "value": 105.66
    },
    {
      "date": "2026-05-04",
      "value": 109.76
    },
    {
      "date": "2026-05-01",
      "value": 105.38
    },
    {
      "date": "2026-04-30",
      "value": 108.64
    },
    {
      "date": "2026-04-29",
      "value": 110.47
    },
    {
      "date": "2026-04-28",
      "value": 103.45
    },
    {
      "date": "2026-04-27",
      "value": 99.89
    },
    {
      "date": "2026-04-24",
      "value": 98.42
    },
    {
      "date": "2026-04-23",
      "value": 99.27
    },
    {
      "date": "2026-04-22",
      "value": 94.76
    },
    {
      "date": "2026-04-21",
      "value": 93.64
    },
    {
      "date": "2026-04-20",
      "value": 91.06
    }
  ],
  "attribution": "Source: U.S. Energy Information Administration (EIA)"
}
GET/api/v1/world-bank/country/{iso}$0.02

Country macro snapshot: GDP, growth, inflation, unemployment, debt and more in one call

A country's macro profile in one call: latest GDP, GDP growth, GDP per capita, inflation, unemployment, population, government debt, current account, exports, and FDI, from the World Bank's World Development Indicators. Pass an ISO country code in the path (e.g. US, CN, IN, DE). International macro the US-only FRED/BLS endpoints don't cover. Source: World Bank (CC BY 4.0).

Example request
GET /api/v1/world-bank/country/US
Response type (TypeScript)
interface WorldBankResponse {
  source: string;
  as_of: string;
  country: {
    code: string;
    name: string;
    iso3: string;
  };
  indicators: Array<{
    indicator: string;
    indicator_code: string;
    indicator_name: string;
    latest: {
      year: string;
      value: number;
    };
  }>;
  attribution: string;
}
Example response (click to expand)
{
  "source": "world_bank",
  "as_of": "2025-12-31T00:00:00.000Z",
  "country": {
    "code": "US",
    "name": "United States",
    "iso3": "USA"
  },
  "indicators": [
    {
      "indicator": "gdp",
      "indicator_code": "NY.GDP.MKTP.CD",
      "indicator_name": "GDP (current US$)",
      "latest": {
        "year": "2024",
        "value": 28750956130731.2
      }
    },
    {
      "indicator": "gdp-growth",
      "indicator_code": "NY.GDP.MKTP.KD.ZG",
      "indicator_name": "GDP growth (annual %)",
      "latest": {
        "year": "2024",
        "value": 2.79300127716779
      }
    },
    {
      "indicator": "gdp-per-capita",
      "indicator_code": "NY.GDP.PCAP.CD",
      "indicator_name": "GDP per capita (current US$)",
      "latest": {
        "year": "2024",
        "value": 84534.0407841548
      }
    },
    {
      "indicator": "inflation",
      "indicator_code": "FP.CPI.TOTL.ZG",
      "indicator_name": "Inflation, consumer prices (annual %)",
      "latest": {
        "year": "2024",
        "value": 2.94952520485207
      }
    },
    {
      "indicator": "unemployment",
      "indicator_code": "SL.UEM.TOTL.ZS",
      "indicator_name": "Unemployment, total (% of total labor force) (modeled ILO estimate)",
      "latest": {
        "year": "2025",
        "value": 4.198
      }
    },
    {
      "indicator": "population",
      "indicator_code": "SP.POP.TOTL",
      "indicator_name": "Population, total",
      "latest": {
        "year": "2024",
        "value": 340110988
      }
    },
    {
      "indicator": "govt-debt",
      "indicator_code": "GC.DOD.TOTL.GD.ZS",
      "indicator_name": "Central government debt, total (% of GDP)",
      "latest": {
        "year": "2024",
        "value": 117.973234857902
      }
    },
    {
      "indicator": "current-account",
      "indicator_code": "BN.CAB.XOKA.GD.ZS",
      "indicator_name": "Current account balance (% of GDP)",
      "latest": {
        "year": "2024",
        "value": -4.12262463415284
      }
    },
    {
      "indicator": "exports",
      "indicator_code": "NE.EXP.GNFS.ZS",
      "indicator_name": "Exports of goods and services (% of GDP)",
      "latest": {
        "year": "2024",
        "value": 11.1074566893674
      }
    },
    {
      "indicator": "fdi",
      "indicator_code": "BX.KLT.DINV.WD.GD.ZS",
      "indicator_name": "Foreign direct investment, net inflows (% of GDP)",
      "latest": {
        "year": "2024",
        "value": 1.03321085618604
      }
    }
  ],
  "attribution": "Source: World Bank, World Development Indicators (CC BY 4.0)"
}
GET/api/v1/world-bank/{indicator}$0.01

One World Bank indicator's annual time series for any country

Annual time series of one World Bank indicator for a country, with latest value, prior year, and change. Indicators: gdp, gdp-growth, gdp-per-capita, inflation, unemployment, population, govt-debt, current-account, exports, fdi. Pick the country with `?country=US` (ISO2/ISO3, default US) and the span with `?limit=` years (default 10). Cross-country macro reference. Source: World Bank (CC BY 4.0).

Example request
GET /api/v1/world-bank/NY.GDP.MKTP.CD
Response type (TypeScript)
interface WorldBankIndicatorResponse {
  source: string;
  as_of: string;
  indicator: string;
  indicator_code: string;
  indicator_name: string;
  country: {
    code: string;
    name: string;
    iso3: string;
  };
  last_updated: string;
  latest: {
    year: string;
    value: number;
  };
  prior: {
    year: string;
    value: number;
  };
  change: number;
  change_percent: number;
  history: Array<{
    year: string;
    value: number;
  }>;
  attribution: string;
}
Example response (click to expand)
{
  "source": "world_bank",
  "as_of": "2024-12-31T00:00:00.000Z",
  "indicator": "gdp",
  "indicator_code": "NY.GDP.MKTP.CD",
  "indicator_name": "GDP (current US$)",
  "country": {
    "code": "US",
    "name": "United States",
    "iso3": "USA"
  },
  "last_updated": "2026-04-08",
  "latest": {
    "year": "2024",
    "value": 28750956130731.2
  },
  "prior": {
    "year": "2023",
    "value": 27292170793214.4
  },
  "change": 1458785337516.8008,
  "change_percent": 5.35,
  "history": [
    {
      "year": "2025",
      "value": null
    },
    {
      "year": "2024",
      "value": 28750956130731.2
    },
    {
      "year": "2023",
      "value": 27292170793214.4
    },
    {
      "year": "2022",
      "value": 25604848907611
    },
    {
      "year": "2021",
      "value": 23315080560000
    },
    {
      "year": "2020",
      "value": 21060473613000
    },
    {
      "year": "2019",
      "value": 21380976119000
    },
    {
      "year": "2018",
      "value": 20533057312000
    },
    {
      "year": "2017",
      "value": 19477336549000
    },
    {
      "year": "2016",
      "value": 18695110842000
    }
  ],
  "attribution": "Source: World Bank, World Development Indicators (CC BY 4.0)"
}