Economics
Data source: US Census Bureau API
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/us-census/
claude_desktop_config.json
{
"mcpServers": {
"gnist-us-census": {
"url": "https://context.gnist.ai/mcp/us-census/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/us-census/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_acs_data", "arguments": {"variables": "...", "geography": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/us-census/
6 endpoints available:
GET /rest/us-census/get_acs_dataGET /rest/us-census/get_acs_profileGET /rest/us-census/search_groupsGET /rest/us-census/get_group_variablesGET /rest/us-census/get_geography_codesGET /rest/us-census/report_feedback
Shell
curl "https://context.gnist.ai/rest/us-census/get_acs_data?variables=...&geography=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/us-census/get_acs_data",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"variables": "...",
"geography": "example"
},
)
print(resp.json())
Command Line
Command
gc us-census
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (6)
get_acs_dataFetch American Community Survey 5-year data by variable codes and geography.
| Parameter | Type | Required | Description |
|---|---|---|---|
variables | list[string] | required | ACS variable codes (e.g. ["B01001_001E", "B19013_001E"]). |
geography | string | required | Geography type: us, state, county, place, tract, block_group, zip_code, metro_area, or congressional_district. |
code | string | optional | FIPS code for the geography, or "*" for all. Use get_geography_codes to look up codes. (default: "*") |
within_state | any | optional | State FIPS code to filter within (required for county, place, tract queries). |
within_county | any | optional | County FIPS code to further filter within (for tract/block group queries). |
year | integer | optional | ACS 5-year vintage year (2009-2022). Default 2022. (default: 2022) |
get_acs_profileGet curated demographic, economic, housing, or social profile data.
| Parameter | Type | Required | Description |
|---|---|---|---|
profile_type | string | required | Profile type: demographic, economic, housing, or social. |
geography | string | required | Geography type: us, state, county, place, etc. |
code | string | optional | FIPS code for the geography, or "*" for all. (default: "*") |
within_state | any | optional | State FIPS code to filter within. |
year | integer | optional | ACS 5-year vintage year (2009-2022). Default 2022. (default: 2022) |
search_groupsSearch available ACS table groups (data tables) by keyword.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search term for ACS table groups (e.g. "income", "education", "housing"). |
year | integer | optional | ACS 5-year vintage year. Default 2022. (default: 2022) |
limit | integer | optional | Max results to return (1-100). Default 20. (default: 20) |
get_group_variablesList all variables in a specific ACS table group.
| Parameter | Type | Required | Description |
|---|---|---|---|
group | string | required | ACS table group code (e.g. "B01001", "B19013", "DP05"). |
year | integer | optional | ACS 5-year vintage year. Default 2022. (default: 2022) |
get_geography_codesLook up FIPS codes for geographies by name.
| Parameter | Type | Required | Description |
|---|---|---|---|
geography_type | string | required | Geography type: state, county, place, etc. |
state_code | any | optional | State FIPS code (for county, place, tract lookups). |
year | integer | optional | ACS 5-year vintage year. Default 2022. (default: 2022) |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |