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)

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/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
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_county",
    "arguments": {
      "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)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_counties",
    "arguments": {
      "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)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "list_counties_by_state",
    "arguments": {
      "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.

JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_states",
    "arguments": {}
  }
}
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")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "report_feedback",
    "arguments": {
      "feedback": "example"
    }
  }
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/mcp/us-county/" \
  -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_county", "arguments": {"fips": "example"}}}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/us-county/",
    headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_county",
    "arguments": {
      "fips": "example"
    }
  }
},
)
print(resp.json())

Related Toolkits (Geography)

Resources