Data API
Use the BBER REST API to retrieve current public datasets in a scriptable format for research, classroom work, and applied analysis. The examples below focus on the active read-only endpoints and request patterns available through the API.
Use these endpoints to download BBER data as API responses, JSON, CSV, and map-ready resources where each dataset exposes those formats.
https://api.bber.unm.edu/api/data/rest/bbertable
Use the REST endpoint to request a table, limit the returned variables when needed, and filter observations by geography, time period, and other supported dimensions.
https://api.bber.unm.edu/api/data/rest/bbertableMetadata requests are useful for discovering available tables, variables, and valid filter values before scripting a query.
https://api.bber.unm.edu/api/data/rest/metadata?api=tablevalues&table=s0801&variables=[stfips,areatype,periodyear,periodtype]The parameters below are commonly used across BBER REST datasets. Available fields can vary by table, so confirm table-level metadata before building production scripts.
| Parameter | Description | Sample Values |
|---|---|---|
| table | Data source table to query. | rp80, dp05 |
| variables | List of variables to return from the selected table. | foodmedt, grosstax |
| stfips | Federal Information Processing Standards state code. | 00, 35 |
| areatype | Code describing the type of geography, such as statewide, county, or metropolitan area. | 00, 01, 04, 21 |
| area | Six-digit geographic identifier based on Census geography codes. | 000001, 000028 |
| periodtype | Code for the period type, such as day, month, quarter, or annual. | 01, 04 |
| periodyear | Year represented by the observation. | 2020, 2021 |
| period | Period within the year, such as month number, quarter number, or 00 for annual values. | 1, 2 |
| indcode | Two- to six-digit industry code when available. | 11, 23 |
| adjusted | Seasonal adjustment flag where supported by the selected dataset. | 0, 1 |
| ownership | Ownership identifier for labor-market series and similar datasets. | 00, 50 |
| token | Authentication token for private or subscription-based datasets when required. | ABCXXXX |
The `periodyear` parameter accepts both ranges and comma-separated selections, which makes it practical to request contiguous spans or selected benchmark years.
https://api.bber.unm.edu/api/data/rest/bbertable?table=sp500&periodyear=2018-2021https://api.bber.unm.edu/api/data/rest/bbertable?table=sp500&periodyear=2005-2010,2015-2020https://api.bber.unm.edu/api/data/rest/bbertable?table=sp500&periodyear=2010,2015,2020When requesting multiple tables together, specify variables as `TABLENAME.VARIABLENAME` to distinguish fields cleanly and preserve a usable merged response.
https://api.bber.unm.edu/api/data/rest/bbertable?table=b11005,b11001&variables=b11005.tot_hhoneplusu18_famhh_marriedfam_e,b11001.tot_nonfamhh_hhalone_eMerged results align on shared columns such as geography and time fields. Requesting the same variable name from two tables is not supported when those columns are already used for the merge.
API responses are returned in JSON with data rows and descriptive metadata packaged together.
{ "metadata": { "columns": [...], "table": {...} }, "data": [...] }data: the observation rows returned for the request.
metadata.columns: field-level descriptions and display labels.
metadata.table: source-level information such as title, release timing, and update date.
Use the map endpoint for GEOJSON output and the metadata endpoint to inspect available tables, variables, and values before building a request.
https://api.bber.unm.edu/api/data/rest/makemaphttps://api.bber.unm.edu/api/data/rest/metadata?api=tableshttps://api.bber.unm.edu/api/data/rest/metadata?api=tablevalues&table=s0801&variables=[stfips,areatype,periodyear,periodtype]