US Census Bureau Data API Scraper
Pricing
from $0.50 / 1,000 census row returneds
US Census Bureau Data API Scraper
Query official US Census Bureau API datasets for ACS, Decennial Census, and public data research. Returns structured rows with variables, geography identifiers, source URL, and retrieval time. Charged $0.00005 per valid query plus $0.0005 per row.
Pricing
from $0.50 / 1,000 census row returneds
Rating
0.0
(0)
Developer
Muhammad Afzal
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
3 days ago
Last modified
Categories
Share
US Census Bureau Data Scraper
Query official US Census Bureau Data API datasets and return one structured dataset item per Census API row. It is designed for analysts, researchers, public-sector teams, geospatial workflows, demographic analysis, and AI agents that need current Census variables by geography.
What it returns
Each item contains:
| Field | Description |
|---|---|
dataset | Relative Census API dataset path, such as acs/acs5. |
year | Census vintage year. |
values | Requested variable codes mapped to their returned string or null values. |
geography | Geography identifiers returned by the API, such as state, county, place, or tract. |
queryUrl | The official Census API URL used for the row. |
retrievedAt | UTC retrieval timestamp. |
The actor preserves Census values as strings because the Census API returns tabular data as text and variable codes can represent counts, percentages, annotations, dates, or other dataset-specific values. Use the dataset's variable metadata to interpret units and margins of error.
When to use it
Use it for ACS, Decennial Census, Population Estimates, Economic Census, PUMS, and other public datasets exposed through the Census Data API. The actor passes through standard get, for, in, predicate, and ucgid parameters, and adds the required secret API key at runtime.
Do not use it to scrape the interactive data.census.gov website, download bulk files that are not available through the Data API, or infer a variable's meaning from its code alone. Choose the dataset and variable codes from the official Census dataset documentation first.
Inputs
{"dataset": "acs/acs5","year": 2023,"variables": ["NAME", "B01001_001E"],"for": "county:*","in": ["state:06"],"maxResults": 100}
This returns 2023 ACS 5-year county rows inside California with each county name and total-population estimate. A state-level default query is prefilled so the actor has a small, valid health-test request.
For a mixed-geography query supported by a dataset, use ucgid instead of for/in:
{"dataset": "acs/acs5","year": 2023,"variables": ["NAME", "B01001_001E"],"ucgid": "0400000US24"}
Additional dataset-specific predicates can be supplied as key-value pairs:
{"predicates": { "NAME": "California" }}
The required CENSUS_API_KEY environment variable must be configured as a secret in Apify before a run. The current Census API requires a valid key on data requests. Do not put API keys in public input; the actor never includes the key in dataset provenance URLs or logs.
Output and limits
The run summary is stored in the OUTPUT key-value record. It includes the number of API rows available, rows returned, the query URL, warnings, and whether maxResults or the Apify charge limit stopped output. Census does not expose a generic page cursor; if the result is capped, narrow the geography or predicates for the next query.
Valid queries with no rows complete successfully with an empty dataset and a truthful summary. Invalid input and Census HTTP/API failures are reported in OUTPUT with INVALID_INPUT or WARNING status; error objects are not mixed into the dataset.
Pricing
| Event | Price |
|---|---|
| Actor start | $0.00005 per valid run |
| Census row returned | $0.0005 per dataset item |
Example: a 52-row state query costs approximately $0.02605 in actor events, excluding Apify platform usage. The start event is charged only for valid requests; row events are charged only for rows actually returned.
Data source and compliance
The source is the public US Census Bureau Data API. Review the selected dataset's official documentation for coverage, vintage, variable definitions, margins of error, suppression, and any geographic limitations. This actor does not bypass access controls or collect private information.