Reference

API reference

Base URL https://api.economicdata.dev. Every endpoint is a GET and returns JSON unless the path ends in another format.

Generated from the dataset contracts when this site was built. Add @{version} after any dataset id to pin a version (how). Errors are problem documents.

Endpoints

GET /v1

The API index for this site.

  • site, name, tagline
  • api_version: "v1"
  • links.catalog, links.status

Example: https://api.economicdata.dev/v1

GET /v1/catalog

Every dataset published on this site.

  • site
  • datasets[]: id, kind, title, description, current (version), published_at, cadence, check_every, sla, discontinued
  • datasets[].source: name, url, license, commercial_ok
  • datasets[].coverage: start, end

Example: https://api.economicdata.dev/v1/catalog

GET /v1/status

How fresh each dataset is.

  • site, generated_at, overall ("ok" or "degraded")
  • datasets[]: id, status, version, checked_at, source_updated_at, sla, consecutive_failures, last_error
  • status is one of ok, pending, late, stale-upstream, failing, blocked, discontinued

Example: https://api.economicdata.dev/v1/status

GET /v1/{dataset}

Metadata for one dataset: the version that answered, its coverage, source, validation and downloads.

  • dataset, kind, title, description, cadence
  • version, current_version, pinned, published_at
  • source: id, name, publisher, url, license, commercial_ok, attribution, retrieved_at, source_updated_at
  • coverage: start, end
  • validation: status (pass, warn), warnings[]
  • series[]: id, name; for tables also key[] and partition
  • downloads[]: name, bytes, url
  • links: locations, versions, this_version

Example: https://api.economicdata.dev/v1/bea-county-income

Errors: unknown-dataset , unknown-version , data-unavailable , and rate-limited for any endpoint.

GET /v1/{dataset}/versions

The version history.

  • dataset, current, published_at
  • previous[]: earlier version ids, newest first
  • snapshots: month (YYYY-MM) to version id

Example: https://api.economicdata.dev/v1/bea-county-income/versions

Errors: unknown-dataset , and rate-limited for any endpoint.

GET /v1/{dataset}/locations

What can be requested: each series with its location ids, or for tables the partitions (under the series id "table").

  • dataset, version, kind
  • series[]: id, name, locations[] (ids)
  • locations[]: id, name

Example: https://api.economicdata.dev/v1/bea-county-income/locations

Errors: unknown-dataset , unknown-version , and rate-limited for any endpoint.

GET /v1/{dataset}/{series}/{location}.json

One series at one place, ordered by date. Also .csv.

  • meta: dataset, series, series_name, location, location_name, units, source, license, attribution
  • data[]: one object per row, with the dataset's columns

Example: https://api.economicdata.dev/v1/bea-county-income/annual/usa.json

Errors: unknown-file , unknown-format , and rate-limited for any endpoint.

GET /v1/{dataset}/table/{partition}.json

Rows of a table for one partition value; table/all has every row for tables up to 50,000 rows. Also .csv.

  • meta: dataset, key, partition (when partitioned), rows (count), units, source, license, attribution
  • rows[]: one object per row

Errors: unknown-file , unknown-format , and rate-limited for any endpoint.

GET /v1/{dataset}/download/{dataset}.csv

The whole dataset in one file. Also .parquet. Series downloads add series and location columns.

  • CSV (text/csv) or Parquet (application/vnd.apache.parquet)
  • Supports Range requests (206)

Example: https://api.economicdata.dev/v1/bea-county-income/download/bea-county-income.csv

Errors: unknown-file , and rate-limited for any endpoint.

GET /v1/{dataset}/{path}

A file of a files dataset, at its published path.

  • The file, with a content type from its extension

Errors: unknown-file , and rate-limited for any endpoint.

Datasets

County personal income (BEA CAINC1) Time series

Id
bea-county-income
Updates
Yearly
Series
annual
Columns
date year (YYYY) , personal_income integer, thousands of USD , population integer, persons , per_capita_personal_income integer, USD
What Path
Metadata: version, coverage, downloads, validation /v1/bea-county-income
Versions and monthly snapshots /v1/bea-county-income/versions
Series and locations /v1/bea-county-income/locations
Annual estimates (JSON) /v1/bea-county-income/annual/{location}.json
Annual estimates (CSV) /v1/bea-county-income/annual/{location}.csv
Whole dataset (CSV) /v1/bea-county-income/download/bea-county-income.csv
Whole dataset (Parquet) /v1/bea-county-income/download/bea-county-income.parquet

Median household income (ACS 5-year) Time series

Id
census-acs-income
Updates
Yearly
Series
median-household-income
Columns
date year (YYYY) , median_household_income integer, USD , margin_of_error integer, USD , estimate_annotation text , moe_annotation text
What Path
Metadata: version, coverage, downloads, validation /v1/census-acs-income
Versions and monthly snapshots /v1/census-acs-income/versions
Series and locations /v1/census-acs-income/locations
Median household income in the past 12 months (B19013_001) (JSON) /v1/census-acs-income/median-household-income/{location}.json
Median household income in the past 12 months (B19013_001) (CSV) /v1/census-acs-income/median-household-income/{location}.csv
Whole dataset (CSV) /v1/census-acs-income/download/census-acs-income.csv
Whole dataset (Parquet) /v1/census-acs-income/download/census-acs-income.parquet

Local area unemployment (LAUS) Time series

Id
laus
Updates
Monthly
Series
nsa, sa
Columns
date month (YYYY-MM) , labor_force integer, persons , employed integer, persons , unemployed integer, persons , unemployment_rate number, percent , preliminary true / false , footnotes text
What Path
Metadata: version, coverage, downloads, validation /v1/laus
Versions and monthly snapshots /v1/laus/versions
Series and locations /v1/laus/locations
Not seasonally adjusted (every state, CBSA and county) (JSON) /v1/laus/nsa/{location}.json
Not seasonally adjusted (every state, CBSA and county) (CSV) /v1/laus/nsa/{location}.csv
Seasonally adjusted (states, Detroit, Cleveland and Seattle metros) (JSON) /v1/laus/sa/{location}.json
Seasonally adjusted (states, Detroit, Cleveland and Seattle metros) (CSV) /v1/laus/sa/{location}.csv
Whole dataset (CSV) /v1/laus/download/laus.csv
Whole dataset (Parquet) /v1/laus/download/laus.parquet

County employment and wages (QCEW) Time series

Id
qcew
Updates
Quarterly
Series
total-covered
Columns
date month (YYYY-MM) , establishments integer, establishments , month1_employment integer, jobs , month2_employment integer, jobs , month3_employment integer, jobs , total_wages integer, USD , avg_weekly_wage integer, USD , suppressed true / false
What Path
Metadata: version, coverage, downloads, validation /v1/qcew
Versions and monthly snapshots /v1/qcew/versions
Series and locations /v1/qcew/locations
Total covered, all industries (ownership code 0, NAICS 10) (JSON) /v1/qcew/total-covered/{location}.json
Total covered, all industries (ownership code 0, NAICS 10) (CSV) /v1/qcew/total-covered/{location}.csv
Whole dataset (CSV) /v1/qcew/download/qcew.csv
Whole dataset (Parquet) /v1/qcew/download/qcew.parquet

World macro core indicators Time series

Id
world-macro
Updates
Quarterly
Series
annual
Columns
date year (YYYY) , gdp_usd number, USD , gdp_growth_pct number, percent , gdp_per_capita_usd number, USD , inflation_cpi_pct number, percent , unemployment_pct number, percent , population integer, persons
What Path
Metadata: version, coverage, downloads, validation /v1/world-macro
Versions and monthly snapshots /v1/world-macro/versions
Series and locations /v1/world-macro/locations
Annual values (JSON) /v1/world-macro/annual/{location}.json
Annual values (CSV) /v1/world-macro/annual/{location}.csv
Whole dataset (CSV) /v1/world-macro/download/world-macro.csv
Whole dataset (Parquet) /v1/world-macro/download/world-macro.parquet