# Census — Zapi reference > Dated values for any Census economic-indicator series. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ content, message, errors }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/finance/census - Endpoint catalog: https://zpi.web.id/category/finance - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## Census **Category:** finance · **Slug:** `census` **Detail page:** https://zpi.web.id/api/finance/census Dated values for any Census economic-indicator series. **Tags:** finance, census ### Series Dated values for any Census economic-indicator series. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:census/series` - **Cache TTL:** 21600s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `program` | string | query | yes | Program code. `programs` lists all 21. | | `category` | string | query | yes | Category code from `program` — 44X72 is retail trade and food services in MARTS. | | `dataType` | string | query | yes | Data-type code from `program` — SM is sales in MARTS, MPCSM the monthly percent change. | | `geoLevel` | string | query | no | Geography level from `program`. Default US. | | `adjusted` | enum(yes|no) | query | no | Seasonally adjusted. Word-valued upstream — `1` is silently read as no. Default yes. | | `errorData` | enum(yes|no) | query | no | Return the sampling-variability series instead of the estimate. Default no. | | `includeUnreleased` | enum(true|false) | query | no | Keep the pre-allocated months past the last release, which the bureau publishes as NA. Default false. | | `from` | string | query | no | First year, YYYY. Default five years ago. | | `to` | string | query | no | Last year, YYYY. Default the current year. | | `length` | number | query | no | Observations to return, newest first. Default 120, max 2000. | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:census/series?program=MARTS&category=44X72&dataType=SM&geoLevel=US&adjusted=yes&errorData=no&includeUnreleased=false&from=2020&to=2026&length=24" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:census/series?program=MARTS&category=44X72&dataType=SM&geoLevel=US&adjusted=yes&errorData=no&includeUnreleased=false&from=2020&to=2026&length=24", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:census/series?program=MARTS&category=44X72&dataType=SM&geoLevel=US&adjusted=yes&errorData=no&includeUnreleased=false&from=2020&to=2026&length=24", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "to": "2026", "from": "2021", "unit": "Millions of Dollars", "count": 67, "items": [ { "label": "Jul-2026", "value": 763602, "period": "2026-07" }, { "label": "Jun-2026", "value": 768072, "period": "2026-06" }, { "label": "May-2026", "value": 766192, "period": "2026-05" }, { "label": "Apr-2026", "value": 759097, "period": "2026-04" }, { "label": "Mar-2026", "value": 754013, "period": "2026-03" }, { "label": "Feb-2026", "value": 741278, "period": "2026-02" }, { "label": "Jan-2026", "value": 734503, "period": "2026-01" }, { "label": "Dec-2025", "value": 734717, "period": "2025-12" } ], "total": 67, "source": "Advance Monthly Sales for Retail and Food Services", "dataset": "series", "program": "MARTS", "adjusted": "yes", "category": "44X72", "dataType": "SM", "geoLevel": "US", "provider": "census", "errorData": "no", "seriesName": "Seasonally Adjusted Sales - Monthly", "unreleased": 5, "extractedAt": "August 20, 2026 (10:23 pm)", "latestValue": 763602, "categoryName": "44X72: Retail Trade and Food Services: U.S. Total", "latestPeriod": "2026-07" } ``` --- ### Programs The Census Bureau's economic indicator programs — the vocabulary every other - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:census/programs` - **Cache TTL:** 86400s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `query` | string | query | no | Case-insensitive filter over the program code and name. | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:census/programs?query=retail" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:census/programs?query=retail", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:census/programs?query=retail", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 3, "items": [ { "name": "Advance Monthly Sales for Retail and Food Services", "bulkUrl": "https://www.census.gov/econ_getzippedfile/?programCode=MARTS", "program": "MARTS" }, { "name": "Advance Retail Inventories", "bulkUrl": "https://www.census.gov/econ_getzippedfile/?programCode=MRTSADV", "program": "MRTSADV" }, { "name": "Monthly Retail Trade and Food Services", "bulkUrl": "https://www.census.gov/econ_getzippedfile/?programCode=MRTS", "program": "MRTS" } ], "query": "retail", "total": 21, "dataset": "programs", "provider": "census" } ``` --- ### Program One Census economic indicator program's whole code vocabulary — categories, - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:census/program` - **Cache TTL:** 86400s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `program` | string | query | yes | Program code — MARTS, MRTS, M3, M3ADV, RESCONST, FTD and 15 more. `programs` lists them. | | `query` | string | query | no | Case-insensitive filter over the category code and description. | | `length` | number | query | no | Categories to return. Default 200, max 2000. | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:census/program?program=MARTS&query=grocery&length=50" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:census/program?program=MARTS&query=grocery&length=50", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:census/program?program=MARTS&query=grocery&length=50", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 21, "items": [ { "indent": 0, "category": "44X72", "description": "44X72: Retail Trade and Food Services", "categoryIndex": 1 }, { "indent": 0, "category": "44Y72", "description": "44Y72: Retail Trade and Food Services, ex Auto", "categoryIndex": 2 }, { "indent": 0, "category": "44Z72", "description": "44Z72: Retail Trade and Food Services, ex Gas", "categoryIndex": 3 }, { "indent": 0, "category": "44W72", "description": "44W72: Retail Trade and Food Services, ex Auto and Gas", "categoryIndex": 4 }, { "indent": 0, "category": "44000", "description": "44000: Retail Trade", "categoryIndex": 5 }, { "indent": 0, "category": "441", "description": "441: Motor Vehicle and Parts Dealers", "categoryIndex": 6 }, { "indent": 0, "category": "441X", "description": "4411,4412: Auto and Other Motor Vehicles", "categoryIndex": 7 }, { "indent": 0, "category": "442", "description": "442: Furniture and Home Furnishings Stores", "categoryIndex": 8 } ], "query": null, "total": 21, "dataset": "program", "periods": 420, "program": "MARTS", "provider": "census", "dataTypes": [ { "unit": "MLN$", "dataType": "SM", "description": "Sales - Monthly", "dataTypeIndex": 1 }, { "unit": "PCT", "dataType": "MPCSM", "description": "Sales - Monthly Percent Change", "dataTypeIndex": 2 } ], "footnotes": [ "For the Advance Monthly Retail Trade Survey, estimates for the most recent month are advance estimates that are based on data from a subsample of firms from the larger Monthly Retail Trade Survey. The advance estimates will be superseded in following months by revised estimates derived from the larger Monthly Retail Trade Survey.", "For information on the reliability and use of the data, including important notes on estimation and sampling variance, seasonal adjustment, measures of sampling variability, and other information pertinent to this economic indicator, go to the (https://www.census.gov/retail/index.html) website.", "Estimated measures of sampling variability for totals are expressed as coefficients of variation (CV). Standard errors (SE) are provided for month-to-month change and ratio estimates.", "Estimated measures of sampling variability are based on data not adjusted for seasonal variation, and should be used when drawing inferences about both adjusted and not adjusted estimates.", "NA = Not available. Z = Estimates round to zero." ], "geoLevels": [ { "geoIndex": 1, "geoLevel": "US", "description": "U.S. Total" } ], "periodEnd": "Dec-2026", "updatedAt": "Friday, 14-Aug-26 07:31:07 EDT", "errorTypes": [ { "unit": "PCT", "errorType": "E_SM", "description": "CV of Sales - Monthly", "errorTypeIndex": 1 }, { "unit": "PCT", "errorType": "E_MPCSM", "description": "SE of Sales - Monthly Percent Change", "errorTypeIndex": 2 } ], "periodStart": "Jan-1992", "observations": 58730 } ``` --- _Generated: 2026-08-21T07:36:04.000Z_