/v1/cpi
US CPI-U (latest month): index, MoM and YoY
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/bls-api/v1/cpi" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bls-api/v1/cpi", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bls-api/v1/cpi");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/bls-api/v1/cpi",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"base": "1982-84 = 100",
"index": 335.123,
"period": "2026 May",
"source": "US Bureau of Labor Statistics (series CUUR0000SA0)",
"country": "United States",
"indicator": "Consumer Price Index for All Urban Consumers (CPI-U, all items)",
"period_iso": "2026-05",
"change_mom_pct": 0.63,
"change_yoy_pct": 4.25
},
"meta": {
"timestamp": "2026-06-15T20:40:38.984Z",
"request_id": "e28020c2-664a-415d-854f-96061a1596f5"
},
"status": "ok",
"message": "US CPI retrieved",
"success": true
}