Market Sizing with Census Data in Codex
Market sizing usually starts with demographic data — how many people live in a region, what they earn, what their housing situation looks like. With AgentPatch connected, Codex can pull that data directly from the US Census Bureau’s American Community Survey and do the math in the same session.
Why This Matters
If you’re estimating the addressable market for a product, you need numbers. How many households in the target area earn above a certain threshold? What’s the homeownership rate? How many people fall into the right age bracket? These are Census Bureau questions, and the answers are publicly available — but getting them usually means navigating an unfriendly data portal.
The Census Data tool on AgentPatch lets Codex query the ACS by variable name and geography. You ask for total_population, median_household_income, total_housing_units, or any of the 16 supported variables, and get back clean numbers at the state, county, zip, or place level. That’s enough to build a back-of-the-envelope market estimate without leaving the terminal.
Setup
Add AgentPatch to ~/.codex/config.toml:
[mcp_servers.agentpatch]
url = "https://agentpatch.ai/mcp"
bearer_token_env_var = "AGENTPATCH_API_KEY"
Then set your API key:
export AGENTPATCH_API_KEY=your_api_key
Replace your_api_key with your actual key from the AgentPatch dashboard. Codex discovers all AgentPatch tools automatically on next start.
Example
You’re scoping a home services startup and need to estimate your addressable market in a few target metros. You tell Codex:
“I’m sizing the market for a premium home cleaning service targeting households with income above $100K. Pull total population, median household income, total housing units, and median home value for Maricopa County (AZ), Travis County (TX), and Wake County (NC). Then estimate the addressable market.”
Codex pulls the data and runs the analysis:
Fetching Census ACS data for three counties...
Maricopa County, AZ:
- Population: 4,496,588 | Housing units: 1,749,193
- Median household income: $72,358 | Median home value: $384,200
Travis County, TX:
- Population: 1,290,188 | Housing units: 548,721
- Median household income: $85,014 | Median home value: $443,700
Wake County, NC:
- Population: 1,175,021 | Housing units: 462,888
- Median household income: $88,743 | Median home value: $378,500
Market estimate (households earning >$100K, ~35-45% of units in these
high-income counties based on income distributions):
Maricopa: ~612K-787K qualifying households
Travis: ~192K-247K qualifying households
Wake: ~162K-208K qualifying households
Total addressable: ~966K-1.24M households across three counties.
At $200/month average, that's a $2.3B-$3.0B annual market.
Want me to narrow this by zip code to find the densest pockets?
Codex fetched real economic and housing data for three counties, estimated the qualifying household count based on income distributions, and produced a rough market size — all from the terminal. You can drill into specific zip codes or add more counties to refine the estimate.
Wrapping Up
AgentPatch gives Codex access to real Census Bureau data for market sizing, feasibility checks, and regional analysis. The Census Data tool covers 16 variables at 75 credits per call. The same MCP connection also unlocks every other tool on the marketplace. Get started at agentpatch.ai.