> ## Documentation Index
> Fetch the complete documentation index at: https://docs.financialdatasets.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Snapshot

> Get the latest US consumer price index print for every series: headline and core CPI plus food, energy, shelter, and services, with month-over-month and year-over-year changes.

### Overview

The Inflation Snapshot API returns the most recent month of every CPI series we track, twelve rows, each with the month-over-month and year-over-year percent changes computed for you. Pass `series` to get one row.

We source the data directly from authoritative government sources. The snapshot refreshes the morning each month's figures are published.

To get started, please create an account and grab your <b>API key</b> at [financialdatasets.ai](https://financialdatasets.ai).

You will use the API key to authenticate your API requests.

### Coverage

| History      | Series | Updated |
| ------------ | ------ | ------- |
| Latest month | 12     | Monthly |

### Series

Six concepts, each seasonally adjusted (`_sa`) and not seasonally adjusted (`_nsa`): `cpi_all`, `cpi_core`, `cpi_food`, `cpi_energy`, `cpi_shelter`, `cpi_services_less_energy`. The full list is one free `GET` request away:
[https://api.financialdatasets.ai/macro/inflation/series/](https://api.financialdatasets.ai/macro/inflation/series/)

### Reading the fields

* `date` is the reference month as its first day, not the release date.
* `value` is the published index level (1982-84 = 100).
* `change_1m_pct` and `change_12m_pct` are percent changes from the prior month and from a year earlier, rounded to one decimal. The headline "inflation rate" is `change_12m_pct` of `cpi_all_nsa`.
* A change is `null` when the comparison month was not published (for example, October 2025).

### Getting Started

There are only 2 steps for making a successful API call:

1. Add your API key to the header of the request as `X-API-KEY`.
2. Execute the API request. Add `series` to get one series instead of all twelve.

### Example

```python Inflation Snapshot theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import requests

# add your API key to the headers
headers = {
    "X-API-KEY": "your_api_key_here"
}

# create the URL
url = 'https://api.financialdatasets.ai/macro/inflation/snapshot'

# make API request
response = requests.get(url, headers=headers)

# parse the latest prints from the response
inflation = response.json().get('inflation')
```

### Example Response

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "inflation": [
    {
      "series": "cpi_all_sa",
      "date": "2026-08-01",
      "value": 334.131,
      "change_1m_pct": 0.4,
      "change_12m_pct": 3.4
    },
    {
      "series": "cpi_all_nsa",
      "date": "2026-08-01",
      "value": 334.98,
      "change_1m_pct": 0.3,
      "change_12m_pct": 3.4
    }
  ]
}
```

The live response has one row per series, twelve in total.


## OpenAPI

````yaml GET /macro/inflation/snapshot
openapi: 3.0.1
info:
  title: Financial Datasets API
  description: >-
    Stock market API with real-time and historical financial data for 27,000+
    tickers over 30+ years. Financial statements, equity prices, insider trades,
    SEC filings, and more.
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  contact:
    name: API Support
    url: mailto:support@financialdatasets.ai
    email: support@financialdatasets.ai
  termsOfService: https://financialdatasets.ai/terms-of-use
servers:
  - url: https://api.financialdatasets.ai/
    description: Production server
security:
  - X-API-KEY: []
tags:
  - name: Financial Statements
    description: Access to income statements, balance sheets, and cash flow statements
  - name: Market Data
    description: Real-time and historical price data
  - name: Company Information
    description: Company facts like ticker, name, and description
  - name: Earnings
    description: Earnings data and related information
  - name: News
    description: Real-time and historical news articles
  - name: SEC Filings
    description: SEC filings and regulatory documents
  - name: Insider Trades
    description: Insider trading activity and transactions
  - name: Activist Ownership
    description: Activist stakes from SEC Schedule 13D filings, in real time
  - name: Beneficial Ownership
    description: >-
      Holders of more than 5% of a company's shares, from SEC Schedules 13D and
      13G
  - name: Insider Ownership
    description: Insider ownership statements from SEC Forms 3 and 5
  - name: Institutional Holdings
    description: SEC-direct 13F equity holdings of institutional investment managers
  - name: IPOs
    description: >-
      Upcoming IPOs from SEC registration statements (Form S-1), with extracted
      pre-IPO financial statements
  - name: Index Funds
    description: >-
      ETF and index-fund holdings, weights, and the funds that hold a given
      security
  - name: Financial Metrics
    description: Financial ratios, metrics, and key performance indicators
  - name: Macroeconomics
    description: Real-time and historical macroeconomic data like interest rates
  - name: KPIs
    description: Sector-specific operational KPIs extracted from earnings releases.
  - name: Agent Account
    description: Self-serve account creation and funding for AI agents.
paths:
  /macro/inflation/snapshot:
    get:
      tags:
        - Macroeconomics
      summary: Inflation (Snapshot)
      description: >-
        The most recent month of every CPI series (twelve rows), or of one
        series when series is given, each with the month-over-month and
        year-over-year percent changes.
      operationId: getInflationSnapshot
      parameters:
        - name: series
          in: query
          description: >-
            Optional series id to return one row instead of all twelve, e.g.
            cpi_core_sa.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Inflation snapshot response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InflationSnapshotResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/PaymentRequiredError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    InflationSnapshotResponse:
      type: object
      properties:
        inflation:
          type: array
          items:
            $ref: '#/components/schemas/InflationObservation'
    InflationObservation:
      type: object
      properties:
        series:
          type: string
          description: The series id, e.g. cpi_all_sa.
        date:
          type: string
          description: >-
            The reference month as its first day in YYYY-MM-DD format, e.g.
            2026-08-01 for August 2026. Not the release date.
        value:
          type: number
          nullable: true
          description: >-
            The published index level (1982-84 = 100). Null when the month was
            not published.
        change_1m_pct:
          type: number
          nullable: true
          description: >-
            Percent change from the prior month, rounded to one decimal. Null
            when either month was not published.
        change_12m_pct:
          type: number
          nullable: true
          description: >-
            Percent change from the same month a year earlier, rounded to one
            decimal. Null when either month was not published. For cpi_all_nsa
            this is the headline inflation rate.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: A short error message.
        message:
          type: string
          description: A more detailed error message.
  responses:
    BadRequestError:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Bad Request
            message: Invalid request parameters
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Unauthorized
            message: Invalid API key provided
    PaymentRequiredError:
      description: The request requires a paid subscription
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Payment Required
            message: >-
              This endpoint requires a paid subscription. Please upgrade your
              plan.
    NotFoundError:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Not Found
            message: Ticker XXXX not found
  securitySchemes:
    X-API-KEY:
      type: apiKey
      name: X-API-KEY
      description: API key for authentication.
      in: header

````