Inflation API
FinanceMAINTAINED1 token / call

Inflation API

US inflation calculator and CPI data since 1913: what $100 from 1990 is worth today, and why

US inflation, answered the way people actually ask: what is $100 from 1990 worth today? ($246.32.) Built on the official BLS Consumer Price Index — 405,747 monthly and annual values across 726 US-average series, the all-items index back to 1913 and granular categories from eggs to gasoline to rent — refreshed daily so each mid-month CPI release lands automatically. The calculator endpoint converts any amount between any two years or months since 1913; the rate endpoint returns year-over-year inflation for any period (2022: 8.0%, June 2022: 9.1% — matching BLS published figures exactly) for the headline index or any category; the history endpoint returns a century of annual inflation rates in one call; and raw CPI series are queryable for charting. A dollar from 1913 resolves to $32.52. Built for fintech and payroll products, pricing and contract-escalation tools, real-estate and salary calculators, journalism and education. Public-domain BLS data, self-hosted — no third-party calls at request time.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 1 token per call, so the free plan covers about 500 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response.json
{
  "ok": true,
  "amount": 100,
  "from": {
    "year": 1990,
    "month": 6,
    "cpi": 129.9
  },
  "to": {
    "year": 2025,
    "month": 6,
    "cpi": 322.561
  },
  "adjusted_amount": 248.31,
  "factor": 2.4831,
  "cumulative_inflation_pct": 148.31
}
Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform — anime, finance, sports, and more.

Use cases for Inflation API

  • Add an inflation calculator to a finance, real-estate or history site that converts any amount between any two dates.

  • Adjust historical prices, salaries or contract values to today's dollars in reports and dashboards.

  • Show the current year-over-year inflation rate and its trend the day each CPI release lands.

  • Chart the price history of a specific category such as eggs, gasoline, rent or medical care.

Inflation API endpoints

Every endpoint with its parameters and a real example response.

GETAnnual Inflation History

https://api-inflation.dataandapis.com/v1/inflation/history

Query parameters

ParameterExample
from2019Optional
to2023Optional

Example request

curl "https://api-inflation.dataandapis.com/v1/inflation/history?from=2019&to=2023" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "count": 5,
  "results": [
    {
      "year": 2019,
      "cpi": 255.657,
      "inflation_rate_pct": 1.81
    },
    {
      "year": 2020,
      "cpi": 258.811,
      "inflation_rate_pct": 1.23
    },
    {
      "year": 2021,
      "cpi": 270.97,
      "inflation_rate_pct": 4.7
    },
    {
      "year": 2022,
      "cpi": 292.655,
      "inflation_rate_pct": 8
    },
    {
      "year": 2023,
      "cpi": 304.702,
      "inflation_rate_pct": 4.12
…
Show full response
{
  "ok": true,
  "count": 5,
  "results": [
    {
      "year": 2019,
      "cpi": 255.657,
      "inflation_rate_pct": 1.81
    },
    {
      "year": 2020,
      "cpi": 258.811,
      "inflation_rate_pct": 1.23
    },
    {
      "year": 2021,
      "cpi": 270.97,
      "inflation_rate_pct": 4.7
    },
    {
      "year": 2022,
      "cpi": 292.655,
      "inflation_rate_pct": 8
    },
    {
      "year": 2023,
      "cpi": 304.702,
      "inflation_rate_pct": 4.12
    }
  ]
}

GETCPI Series Catalog

https://api-inflation.dataandapis.com/v1/cpi/series

Query parameters

ParameterExample
limit50Optional
qgasolineOptional
seasonalUOptional

Example request

curl "https://api-inflation.dataandapis.com/v1/cpi/series?limit=50&q=gasoline&seasonal=U" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "count": 4,
  "series": [
    {
      "id": "CUUR0000SETB01",
      "item_code": "SETB01",
      "name": "Gasoline (all types)",
      "seasonal": "U",
      "begin_year": 1935,
      "end_year": 2026
    },
    {
      "id": "CUUR0000SS47014",
      "item_code": "SS47014",
      "name": "Gasoline, unleaded regular",
      "seasonal": "U",
      "begin_year": 1976,
      "end_year": 2026
    },
    {
      "id": "CUUR0000SS47015",
      "item_code": "SS47015",
      "name": "Gasoline, unleaded midgrade",
      "seasonal": "U",
      "begin_year": 1993,
      "end_year": 2026
    },
…
Show full response
{
  "ok": true,
  "count": 4,
  "series": [
    {
      "id": "CUUR0000SETB01",
      "item_code": "SETB01",
      "name": "Gasoline (all types)",
      "seasonal": "U",
      "begin_year": 1935,
      "end_year": 2026
    },
    {
      "id": "CUUR0000SS47014",
      "item_code": "SS47014",
      "name": "Gasoline, unleaded regular",
      "seasonal": "U",
      "begin_year": 1976,
      "end_year": 2026
    },
    {
      "id": "CUUR0000SS47015",
      "item_code": "SS47015",
      "name": "Gasoline, unleaded midgrade",
      "seasonal": "U",
      "begin_year": 1993,
      "end_year": 2026
    },
    {
      "id": "CUUR0000SS47016",
      "item_code": "SS47016",
      "name": "Gasoline, unleaded premium",
      "seasonal": "U",
      "begin_year": 1981,
      "end_year": 2026
    }
  ]
}

GETCPI Values

https://api-inflation.dataandapis.com/v1/cpi

Query parameters

ParameterExample
from2025Optional
seriesCUUR0000SA0Optional
to2026Optional

Example request

curl "https://api-inflation.dataandapis.com/v1/cpi?from=2025&series=CUUR0000SA0&to=2026" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "series": "CUUR0000SA0",
  "series_name": "All items",
  "count": 6,
  "values": [
    {
      "year": 2025,
      "month": 1,
      "value": 317.671
    },
    {
      "year": 2025,
      "month": 2,
      "value": 319.082
    },
    {
      "year": 2025,
      "month": 3,
      "value": 319.799
    },
    {
      "year": 2025,
      "month": 4,
      "value": 320.795
    },
    {
      "year": 2025,
…
Show full response
{
  "ok": true,
  "series": "CUUR0000SA0",
  "series_name": "All items",
  "count": 6,
  "values": [
    {
      "year": 2025,
      "month": 1,
      "value": 317.671
    },
    {
      "year": 2025,
      "month": 2,
      "value": 319.082
    },
    {
      "year": 2025,
      "month": 3,
      "value": 319.799
    },
    {
      "year": 2025,
      "month": 4,
      "value": 320.795
    },
    {
      "year": 2025,
      "month": 5,
      "value": 321.465
    },
    {
      "year": 2025,
      "month": 6,
      "value": 322.561
    }
  ]
}

GETData Sources

https://api-inflation.dataandapis.com/v1/sources

This endpoint takes no parameters.

Example request

curl "https://api-inflation.dataandapis.com/v1/sources" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "attribution": "CPI-U, US city average, 1982-84=100 (BLS, public domain)",
  "count": 1,
  "sources": [
    {
      "slug": "bls-cpi",
      "name": "Consumer Price Index (CPI-U, US city average)",
      "publisher": "US Bureau of Labor Statistics",
      "licence": "US Government work - public domain",
      "source_url": "https://www.bls.gov/cpi/",
      "file_url": "https://download.bls.gov/pub/time.series/cu/cu.data.2.Summaries",
      "cadence": "monthly (mid-month release)",
      "record_count": 435095,
      "retrieved_at": "2026-09-06"
    }
  ]
}

GETInflation Calculator

https://api-inflation.dataandapis.com/v1/inflation/calculator

Query parameters

ParameterExample
amount100Required
from_month6Optional
from_year1990Required
to_month6Optional
to_year2025Optional

Example request

curl "https://api-inflation.dataandapis.com/v1/inflation/calculator?amount=100&from_month=6&from_year=1990&to_month=6&to_year=2025" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "amount": 100,
  "from": {
    "year": 1990,
    "month": 6,
    "cpi": 129.9
  },
  "to": {
    "year": 2025,
    "month": 6,
    "cpi": 322.561
  },
  "adjusted_amount": 248.31,
  "factor": 2.4831,
  "cumulative_inflation_pct": 148.31
}

GETInflation Rate

https://api-inflation.dataandapis.com/v1/inflation/rate

Query parameters

ParameterExample
month6Optional
seriesCUUR0000SA0Optional
year2022Optional

Example request

curl "https://api-inflation.dataandapis.com/v1/inflation/rate?month=6&series=CUUR0000SA0&year=2022" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "series": "CUUR0000SA0",
  "series_name": "All items",
  "period": {
    "year": 2022,
    "month": 6
  },
  "cpi": 296.311,
  "previous_cpi": 271.696,
  "inflation_rate_pct": 9.06
}

Where the data comes from

Source
Bureau of Labor Statistics Consumer Price Index, CPI-U US city average (public domain).
Freshness
Daily refresh; each monthly CPI release lands automatically.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
6endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses — auto-completion in your IDE
  • Tracks the API in lockstep — new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://api-inflation.dataandapis.com/v1/inflation/history',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

Inflation API · X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key

Query Parameters

from(Optional)
to(Optional)
import axios from 'axios';

const url = 'https://api-inflation.dataandapis.com/v1/inflation/history';
const { data } = await axios.get(url, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time — we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales →

Questions about Inflation API

Ship Inflation API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.