# 2s.io Gov District Lookup

> 2s.io Gov District Lookup is a paid API for AI agents from 2s.io, paid per call via x402, $0.0018/call, status unknown (last checked 2026-09-13).

Returns the congressional district, county, state, and geocoordinates for a given US street address using US Census Bureau data.

## Facts

- Endpoint: GET https://2s.io/api/gov/district
- Price: $0.0018/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-gov-district-lookup-e6a0ddc9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9dzLuRWgMUlTAymuw01-y

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-io-gov-district-lookup-e6a0ddc9
```

Example prompt: What congressional district is 1600 Pennsylvania Ave NW, Washington, DC 20500 in? I need the district name, state, and county too.

## When to prefer this

Use this endpoint when you need authoritative, Census Bureau-sourced congressional district and geocoding data for a US address — especially when you need the district name, FIPS code, and coordinates together in one call. Prefer this over general geocoding APIs when the political/governmental district classification is the primary requirement.

## Known failure modes

- Address not found or unrecognized: returns empty items array with total 0
- Non-US address provided: likely returns no match
- Malformed address string: Census geocoder may fail to match
- Payment failure (402): USDC payment of $0.0018 required before response is returned
- Rate or network errors from upstream Census Bureau geocoder

## How this service works

Resolve a US street address to its congressional district (119th Congress), state, and county, via the US Census Bureau geocoder. Returns the matched/normalized address, latitude/longitude, state (name + 2-letter abbreviation), county, and the district number within the state (null for at-large or non-voting delegate districts). The point-in-polygon district lookup is something an agent can't do from a sandbox. Pair it with the gov/congress.* endpoints to find the representatives once you have the state + district. Public domain, keyless.

## Output

Returns a JSON object with ok status, a list of matched items each containing the state name and abbreviation, county, congressional district number, district name, FIPS code, geocoordinates (lat/lon), and matched address string — sourced from the US Census Bureau Geocoder under public domain license.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "address": "1600 Pennsylvania Avenue NW, Washington, DC 20500"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "description": "A US street address (one line)."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-gov-district-lookup-e6a0ddc9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
