Inflation (Snapshot)
curl --request GET \
--url https://api.financialdatasets.ai/macro/inflation/snapshot \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.financialdatasets.ai/macro/inflation/snapshot"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.financialdatasets.ai/macro/inflation/snapshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.financialdatasets.ai/macro/inflation/snapshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.financialdatasets.ai/macro/inflation/snapshot"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.financialdatasets.ai/macro/inflation/snapshot")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.financialdatasets.ai/macro/inflation/snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"inflation": [
{
"series": "<string>",
"date": "<string>",
"value": 123,
"change_1m_pct": 123,
"change_12m_pct": 123
}
]
}{
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"error": "Unauthorized",
"message": "Invalid API key provided"
}{
"error": "Payment Required",
"message": "This endpoint requires a paid subscription. Please upgrade your plan."
}{
"error": "Not Found",
"message": "Ticker XXXX not found"
}Inflation
Snapshot
Get the latest US inflation print for every series: headline and core CPI plus food, energy, shelter, and services, and the headline and core PCE price index, with month-over-month and year-over-year changes.
GET
/
macro
/
inflation
/
snapshot
Inflation (Snapshot)
curl --request GET \
--url https://api.financialdatasets.ai/macro/inflation/snapshot \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.financialdatasets.ai/macro/inflation/snapshot"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.financialdatasets.ai/macro/inflation/snapshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.financialdatasets.ai/macro/inflation/snapshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.financialdatasets.ai/macro/inflation/snapshot"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.financialdatasets.ai/macro/inflation/snapshot")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.financialdatasets.ai/macro/inflation/snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"inflation": [
{
"series": "<string>",
"date": "<string>",
"value": 123,
"change_1m_pct": 123,
"change_12m_pct": 123
}
]
}{
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"error": "Unauthorized",
"message": "Invalid API key provided"
}{
"error": "Payment Required",
"message": "This endpoint requires a paid subscription. Please upgrade your plan."
}{
"error": "Not Found",
"message": "Ticker XXXX not found"
}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. Passseries 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.
To get started, please create an account and grab your API key at 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/
Reading the fields
dateis the reference month as its first day, not the release date.valueis the published index level (1982-84 = 100 for CPI, 2017 = 100 for PCE).change_1m_pctandchange_12m_pctare percent changes from the prior month and from a year earlier, rounded to one decimal. The headline “inflation rate” ischange_12m_pctofcpi_all_nsa; the Fed’s preferred measure ischange_12m_pctofpce_core_sa.- A change is
nullwhen the comparison month was not published (for example, October 2025).
Getting Started
There are only 2 steps for making a successful API call:- Add your API key to the header of the request as
X-API-KEY. - Execute the API request. Add
seriesto get one series instead of all fourteen.
Example
Inflation Snapshot
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
{
"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
}
]
}