> ## 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.

> ## Agent Instructions
> The Financial Datasets API is served at https://api.financialdatasets.ai. Authenticate with the `X-API-KEY` header; create keys at https://financialdatasets.ai. Agents can open and fund their own account without a dashboard: see https://docs.financialdatasets.ai/agents.md.
> Tool-using agents can call Financial Datasets without writing code through the hosted MCP server at https://mcp.financialdatasets.ai/.
> The OpenAPI spec at https://financialdatasets.ai/openapi.json is the source of truth for request and response schemas.
> The index of every docs page is at https://docs.financialdatasets.ai/llms.txt. Append .md to any docs URL to get that page as Markdown.

# Latest CPI and PCE Inflation API

> The latest month of all 14 US inflation series in one call, 12 CPI and 2 PCE, with month-over-month and year-over-year changes, updated within minutes of each monthly release.

### Overview

The Inflation Snapshot API returns the most recent month of every inflation series we track, fourteen rows (twelve CPI, two PCE), 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 within minutes of each release: CPI in the middle of the month, PCE about two weeks later, so for part of each month the two families show different months. To receive each new print without polling, subscribe to the `inflation.created` [webhook](https://docs.financialdatasets.ai/webhooks/events.md).

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

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

### Coverage

| History | Series | Updated |
| - | - | - |
| Latest month | 14 | Within minutes of each monthly release |

### Series

CPI: 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`. PCE: `pce_all_sa` and `pce_core_sa`, seasonally adjusted only. 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 for CPI, 2017 = 100 for PCE).
* `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`; the Fed's preferred measure is `change_12m_pct` of `pce_core_sa`.
* 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 fourteen.

### 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, fourteen in total: the twelve CPI series on their newest month, then the two PCE series on theirs.


## 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: Insider Sale Notices
    description: SEC Form 144 notices of proposed insider stock sales
  - name: Politician Trades
    description: Stock trades disclosed by members of Congress
  - 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.
  - name: Search
    description: Search financial documents with one question and get cited passages back
paths:
  /macro/inflation/snapshot:
    get:
      tags:
        - Macroeconomics
      summary: Inflation (Snapshot)
      description: >-
        The most recent month of every inflation series (fourteen rows: twelve
        CPI, two PCE), 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 fourteen, e.g.
            cpi_core_sa or pce_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 or pce_core_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 for CPI series, 2017 = 100
            for PCE series). 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; for pce_core_sa it is the
            Federal Reserve's preferred measure.
    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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.