# US Census Bureau Scraper (`parseforge/us-census-bureau-scraper`) Actor

Scrapes US Census Bureau data tables by keyword, dataset, year, or geography. Returns each record as a flat row with all fields. Export to CSV, JSON, Excel, or XML.

- **URL**: https://apify.com/parseforge/us-census-bureau-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, Developer tools, News
- **Features:** Limited permissions
- **Stats:** 10 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner-v4.webp)](https://apify.com/parseforge?fpr=vmoqkp)

### US Census Bureau Scraper

**Scrape US Census Bureau data tables by keyword, dataset, year, or geography.** Get population, income, housing, and other official statistics in a flat, ready-to-analyze format. No API key or registration required. Export to CSV, JSON, Excel, or XML.

The Census Bureau's official API requires a key, has rate limits, and returns deeply nested JSON that is hard to flatten. This Actor searches public Census data tables directly, filters by dataset, year, and geography, and returns each record as one clean row. It covers ACS, Decennial Census, Population Estimates, and more.

| Who uses it | What they scrape US Census Bureau for |
|---|---|
| Market researchers | Pull demographic and economic indicators for a specific geography to size a market. |
| Data journalists | Get official population, income, or housing figures for a story without manual downloads. |
| Real estate analysts | Compare census tract or ZIP code statistics to evaluate neighborhood trends. |
| Academic researchers | Collect consistent multi-year Census data for longitudinal studies. |
| Policy analysts | Retrieve small-area income and poverty estimates for program evaluation. |

### What it does

This Actor collects US Census Bureau data tables by keyword, dataset, year, or geography, and returns each record as a flat row.

- 🔎 **Keyword search:** Enter a term like 'population' or 'income' to find matching Census tables.
- 📊 **Dataset filter:** Choose from ACS 1-Year, ACS 5-Year, Decennial Census, Population Estimates, and more.
- 🗓️ **Year filter:** Limit results to a specific vintage, such as 2021 or 2020.
- 📍 **Geography filter:** Select nation, state, county, tract, ZIP code, or other levels.
- 📦 **Flat output:** Each record is returned as a single row with all fields in one schema.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with US Census Bureau data

**📈 Track demographic trends.**

A market researcher runs the Actor with dataset 'ACS 5-Year Estimates' and geography 'county:\*' to compare median income across counties for a site selection report.

**🏘️ Analyze neighborhood data.**

A real estate analyst filters by geography 'zip code tabulation area' and keyword 'housing' to pull housing characteristics for a list of ZIP codes.

**📰 Fact-check with official data.**

A journalist uses the Actor to retrieve the latest population estimates for a state and cites the Census Bureau in an article.

**🎓 Build a research dataset.**

An academic researcher collects Decennial Census data for multiple years and geographies to create a panel dataset for a study.

**🏛️ Evaluate policy impact.**

A policy analyst pulls Small Area Income and Poverty Estimates for specific counties to assess program eligibility.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key** | Start scraping immediately without registering for a Census API key. |
| **Flat schema** | Every record is a simple row, no nested JSON to parse. |
| **Multiple datasets** | Access ACS, Decennial Census, Population Estimates, and more in one Actor. |
| **Flexible filters** | Combine keyword, dataset, year, and geography to narrow results. |
| **Export ready** | Download as CSV, JSON, Excel, or XML for analysis. |

### How it compares

No other Store actor targets US Census Bureau the same way, so the honest comparison is with the alternatives teams actually weigh.

| | US Census Bureau Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When US Census Bureau changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor with a search query, dataset, year, and geography. Filters run as each table is read, so only matching records reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "searchQuery": "population",
  "maxItems": 10
}
```

A larger pull:

```json
{
  "searchQuery": "population",
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.009 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $0.90 |
| 1,000 results | $9.00 |
| 10,000 results | $90.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [US Census Bureau Scraper](https://apify.com/parseforge/us-census-bureau-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to US Census Bureau through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/us-census-bureau-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Your search query or filters may be too restrictive. Try a broader keyword, remove the year filter, or select a different dataset. Also check that the geography is valid for the dataset.

**Why do I get an error about geography?**

Some geographies require a state parameter. For example, use 'county:\*' with a state filter, or specify a state code. Check the input description for details.

**The run is slow or times out.**

Reduce maxItems or narrow your filters. Large geographies like 'us' with many years can return a lot of data.

**The output has missing fields.**

Different datasets have different fields. The Actor returns all available fields for each record, but some may be empty if the dataset does not include them.

**Can I get data for a specific ZIP code?**

Yes, use geography 'zip code tabulation area' and provide the ZIP code. Note that not all datasets include ZIP code level data.

### FAQ

| Question | Answer |
|---|---|
| Do I need a Census API key? | No. This Actor accesses public Census data tables directly and does not require an API key or registration. |
| What datasets can I scrape? | You can filter by dataset, including ACS 1-Year and 5-Year Estimates, Decennial Census, Population Estimates, County Business Patterns, and more. |
| Can I filter by geography? | Yes. Choose from nation, state, county, place, tract, ZIP code tabulation area, and many other levels. Some geographies require a state parameter. |
| How do I search for a specific table? | Use the searchQuery input with a keyword like 'population' or 'income'. The Actor returns all matching tables. |
| Can I limit results by year? | Yes. Use the year input to filter by vintage, such as 2021 or 2020. |
| What format is the output? | Each record is a flat row with all fields in one schema. You can export to CSV, JSON, Excel, or XML. |
| Is there a limit on how many records I can get? | You can set maxItems up to 1,000,000 records per run. |
| Does this Actor handle pagination? | Yes, it automatically paginates through results until maxItems is reached or no more data is available. |
| Can I get data for all states at once? | Yes. Use geography 'state' with a wildcard like 'state:\*' to get data for all states. |
| What if I get no results? | Check your search query and filters. Try a broader keyword or remove the year filter. Some datasets may not have data for certain geographies. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. Census Bureau. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `searchQuery` (type: `string`):

Search term to find Census tables (e.g., 'population', 'income', 'housing').

## `maxItems` (type: `integer`):

How many census records to collect per run.

## `year` (type: `string`):

Filter results by year/vintage (e.g., '2021', '2020'). Optional. Recent years: 2023, 2022, 2021, 2020, 2019, etc.

## `dataset` (type: `string`):

Filter by dataset type. Common options: ACS 1-Year Estimates, ACS 5-Year Estimates, Decennial Census, etc.

## `geography` (type: `string`):

Filter by geography level. Note: Some geographies require state parameter. Use format like 'state:*' for all states, 'county:*' for all counties, or specific codes.

## Actor input object example

```json
{
  "searchQuery": "population",
  "maxItems": 10
}
```

# Actor output Schema

## `results` (type: `string`):

Complete dataset with all scraped Census tables including metadata, variables, geography, and data values

## `overview` (type: `string`):

Overview view of Census tables with key fields displayed in a table format

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQuery": "population",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/us-census-bureau-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQuery": "population",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/us-census-bureau-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQuery": "population",
  "maxItems": 10
}' |
apify call parseforge/us-census-bureau-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/us-census-bureau-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/fXm7wvKE8yB0Uqwke/builds/9bgpq3ABnFRVp6wzj/openapi.json
