GnistAI GnistAI
Log in

US County Data

US county-level data — population, area, FIPS codes, and county seats for ~200 US counties.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 type: open dataset type type open dataset open dataset lifecycle: maintained lifecycle lifecycle maintained maintained Geography

Data source: Curated dataset (US Census Bureau)

REST Bridge Endpoint https://context.gnist.ai/rest/us-county/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (5)

get_county

Get detailed information about a US county by its 5-digit FIPS code.

Args:
fips: 5-digit FIPS code (e.g. "06037" for Los Angeles County, CA).

Returns:
Dictionary with county details including population, area, and county seat.

ParameterTypeRequiredDescription
fipsstringrequired
Request Body
{
  "fips": "example"
}
search_counties

Search US counties by name (case-insensitive partial match).

Args:
query: Search string to match against county names.
limit: Maximum number of results to return (default 20).

Returns:
Dictionary with count and list of matching counties.

ParameterTypeRequiredDescription
querystringrequired
limitintegeroptional (default: 20)
Request Body
{
  "query": "example"
}
list_counties_by_state

List US counties in a given state, sorted by population descending.

Args:
state_code: Two-letter US state code (e.g. "CA", "TX", "NY").
limit: Maximum number of results to return (default 50).

Returns:
Dictionary with state, count, and list of counties.

ParameterTypeRequiredDescription
state_codestringrequired
limitintegeroptional (default: 50)
Request Body
{
  "state_code": "example"
}
get_states

List all US states in the dataset with their county counts.

Returns:
Dictionary with total state count and list of states with county counts.

Request Body
{
  "query": "example"
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
Request Body
{
  "feedback": "example"
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/rest/us-county/get_county" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"fips": "example"}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/rest/us-county/get_county",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={
  "fips": "example"
},
)
print(resp.json())

Related Toolkits (Geography)

Resources