API
The app's server function fetches the newest observations straight from BLS, BEA and the Federal Reserve Board and returns them as one JSON document. It is free, stores nothing, and needs a SkillSafe app token for this app. The full history the page ships with is a static file: data.js.
1. Get a token
Exchange your SkillSafe API key for an app token. Requests with a guest token are refused with 401.
curl -s -X POST https://api.skillsafe.ai/v1/app-api/authorize \
-H "Authorization: Bearer YOUR_SKILLSAFE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"slug":"econ-pulse"}'
# -> {"ok":true,"data":{"token":"aut_...","expires_at":"..."}}
import requests
r = requests.post("https://api.skillsafe.ai/v1/app-api/authorize",
headers={"Authorization": "Bearer YOUR_SKILLSAFE_API_KEY"},
json={"slug": "econ-pulse"})
token = r.json()["data"]["token"]
const r = await fetch("https://api.skillsafe.ai/v1/app-api/authorize", {
method: "POST",
headers: { Authorization: "Bearer YOUR_SKILLSAFE_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ slug: "econ-pulse" }),
});
const token = (await r.json()).data.token;
2. Fetch the latest data
GET https://econ-pulse.skillsafe.ai/api/latest
Response: {"asof": ISO time, "series": {CODE: [[period, value], ...]}, "errors": {source: message}}. Periods are YYYY-MM or YYYY-Qn. A source that fails is named in errors and the others still return (status 200; 502 only when all three fail).
| Code | Series | Window |
|---|---|---|
A191RL | Real GDP, percent change at an annual rate (BEA) | last 120 quarters |
DPCERG, DPCCRG | PCE and core PCE price indexes (BEA) | last 120 months |
CUUR0000SA0, CUUR0000SA0L1E | CPI-U all items and less food and energy, NSA index (BLS) | last 10 years |
LNS14000000 | Unemployment rate, SA (BLS) | last 10 years |
CES0000000001 | Total nonfarm employment, thousands, SA (BLS) | last 10 years |
FF, TIPS10, CMT1M ... CMT30Y | Effective fed funds rate, 10-year TIPS yield, Treasury constant-maturity yields, monthly averages (Federal Reserve H.15) | last 36 months |
curl -s https://econ-pulse.skillsafe.ai/api/latest -H "Authorization: Bearer YOUR_APP_TOKEN"
r = requests.get("https://econ-pulse.skillsafe.ai/api/latest",
headers={"Authorization": "Bearer " + token})
unrate = dict(r.json()["series"]["LNS14000000"])
print(unrate)
const res = await fetch("https://econ-pulse.skillsafe.ai/api/latest",
{ headers: { Authorization: "Bearer " + token } });
const { series, errors } = await res.json();
Errors
| Status | Meaning |
|---|---|
| 401 | No token, a guest token, or an expired token |
| 404 | Unknown route (/api/latest and /api/health exist) |
| 502 | None of BLS, BEA or the Federal Reserve answered; see errors |
BLS's keyless API allows a limited number of requests per day, so the server keeps each source's answer for up to three hours. Data: U.S. Bureau of Labor Statistics, U.S. Bureau of Economic Analysis, Board of Governors of the Federal Reserve System. Not endorsed by any agency.