US consumer prices

One CPI component: weight, monthly and yearly change.

Routes

Base URL https://api.gloom.sh. Send a key with each call; the key's account needs a plan.

GET /v1/macro/cpi

US CPI components, weights and contributions. Reads stored data only and needs a key on an account with a plan; every plan reads every live dataset in full. Unknown, empty and repeated parameters are rejected. History and coverage metadata are null when the stored service cannot establish them.

  • Credits: 1 (lookup x1)
  • Plans: Basic, Desk, Enterprise

Example response

Synthetic values, marked in meta. GET /v1/datasets/cpi/sample returns it with no key and no account.

json
{
  "data": {
    "source": "BLS",
    "generatedAt": "2026-09-30T12:00:00.000Z",
    "retrievedAt": "2026-09-30T12:00:00.000Z",
    "status": "partial",
    "gaps": [
      "ILLUSTRATIVE sample only"
    ],
    "release": {
      "period": "2026-08",
      "releasedAt": null,
      "weightsPeriod": null,
      "nextPeriod": null,
      "nextReleaseAt": null
    },
    "rows": [
      {
        "id": "all-items",
        "code": "SA0",
        "label": "All items",
        "depth": 0,
        "parent": null,
        "pinned": true,
        "derived": false,
        "weight": null,
        "change": 0.1,
        "annualized3m": null,
        "annualized6m": null,
        "yoy": 2.1,
        "contribution": null,
        "contributionYoy": null,
        "read": null,
        "history": [
          [
            "2026-08",
            0.1,
            2.1
          ]
        ]
      },
      {
        "id": "core",
        "code": "SA0L1E",
        "label": "All items less food and energy",
        "depth": 0,
        "parent": null,
        "pinned": true,
        "derived": false,
        "weight": null,
        "change": 0.2,
        "annualized3m": null,
        "annualized6m": null,
        "yoy": 2.2,
        "contribution": null,
        "contributionYoy": null,
        "read": null,
        "history": [
          [
            "2026-08",
            0.2,
            2.2
          ]
        ]
      },
      {
        "id": "shelter",
        "code": "SAH1",
        "label": "Shelter",
        "depth": 0,
        "parent": null,
        "pinned": true,
        "derived": false,
        "weight": null,
        "change": 0.3,
        "annualized3m": null,
        "annualized6m": null,
        "yoy": 2.3,
        "contribution": null,
        "contributionYoy": null,
        "read": null,
        "history": [
          [
            "2026-08",
            0.3,
            2.3
          ]
        ]
      }
    ]
  },
  "meta": {
    "dataset": "cpi",
    "asOf": null,
    "source": [
      {
        "id": "bls-cpi",
        "attribution": "U.S. Bureau of Labor Statistics",
        "licence": "Public domain; retain BLS disclaimer"
      },
      {
        "id": "fred-bls-mirror",
        "attribution": "Federal Reserve Bank of St. Louis, original source BLS",
        "licence": "BLS-origin CPI mirror only, not a general FRED resale grant"
      }
    ],
    "historyStarts": null,
    "coverage": null,
    "lastUpdated": null,
    "sample": true,
    "note": "ILLUSTRATIVE: synthetic examples showing the response fields; not real company disclosures or published observations.",
    "disclaimer": "BLS.gov cannot vouch for the data or analyses derived from these data after the data have been retrieved from BLS.gov. Derived calculations are Gloom's, not BLS figures."
  }
}

Meta fields

Field

dataset

Here

The dataset id

In the example

"cpi"

Field

asOf

Here

The release month, YYYY-MM

In the example

null

Field

source

Here

Attribution and licence of each source

In the example

2 sources

Field

historyStarts

Here

Earliest stored history when established by the service; otherwise null.

In the example

null, not stated yet

Field

coverage

Here

Service-established coverage; null when unavailable.

In the example

null

Field

lastUpdated

Here

When the BLS levels were retrieved

In the example

null

Sources

Source

U.S. Bureau of Labor Statistics

Licence

Public domain; retain BLS disclaimer

Source

Federal Reserve Bank of St. Louis, original source BLS

Licence

BLS-origin CPI mirror only, not a general FRED resale grant

Errors

These routes can answer 400, 401, 402, 403, 404, 429, 503. See Errors for the codes.

Gloom Datasets reads stored data only: a call never starts a collection.