US Census Bureau Data API Scraper avatar

US Census Bureau Data API Scraper

Pricing

from $1.60 / 1,000 census row returneds

Go to Apify Store
US Census Bureau Data API Scraper

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 $1.60 / 1,000 census row returneds

Rating

0.0

(0)

Developer

Muhammad Afzal

Muhammad Afzal

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

a month ago

Last modified

Share

US Census Bureau Data Scraper

Free plan limit: Free-plan users can receive up to 5 result records per run. Paid-plan and local/unknown runs retain the Actor's existing limits.

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:

FieldDescription
datasetRelative Census API dataset path, such as acs/acs5.
yearCensus vintage year.
valuesRequested variable codes mapped to their returned string or null values.
geographyGeography identifiers returned by the API, such as state, county, place, or tract.
queryUrlThe official Census API URL used for the row.
retrievedAtUTC 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

This Actor uses pay-per-event pricing. These are the current Apify Store event prices:

EventPrice (USD)When it is charged
apify-actor-start$0.00005Actor Start — Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event).
census-row-returned$0.0005Census row returned — Charged once for each structured Census API row returned in the dataset.

Apify platform usage for this Actor run is included alongside the event prices above; no separate per-run platform-usage fee is passed to users.

This covers Apify platform usage for this Actor run. Other Apify products or usage outside this Actor run may still follow your account plan.

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.