Jurisdictions

Use this resource to find specific jurisdictions and their IDs so that you can filter in other parts of the API.

The jurisdiction model

The jurisdiction model represents a taxing entity in the OpenZac database. It can be a city, county, special district, or some other kind of local taxing authority.

Properties

  • Name
    id
    Type
    integer
    Description

    The unique ID for this jurisdiction in the OpenZac database

  • Name
    slug
    Type
    string
    Description

    A sluggified version of the name. Not currently used but reserved for possible future use

  • Name
    state
    Type
    string
    Description

    The two-digit state code in which this jurisdiction resides (tx, ca)

  • Name
    type
    Type
    string
    Description

    The type of jurisdiction. Options: city, county, transit, special_district, cdp, military, state

  • Name
    sales_tax_rate
    Type
    decimal
    Description

    The rate at which sales are taxed for this jurisdiction (this is not necessarily an overlapping rate)

  • Name
    sales_tax_id
    Type
    string
    Description

    This represents the unique tax authority ID for this jurisdiction, often set at the state level

  • Name
    fips
    Type
    string
    Description

    The Census FIPS code: 5 digits for a county, 7 digits for a city. `null` for special districts and other types without a FIPS code

  • Name
    latitude
    Type
    decimal
    Description

    The latitude of the jurisdiction's location, if available

  • Name
    longitude
    Type
    decimal
    Description

    The longitude of the jurisdiction's location, if available


GET /api/jurisdictions

List all jurisdictions

This endpoint allows you to retrieve a paginated list of all jurisdictions in the database. By default, a maximum of 25 allocations are shown per page.

Optional parameters

  • Name
    q
    Type
    string
    Description

    A search query for filtering jurisdictions by name (prefix matching)

  • Name
    state
    Type
    string
    Description

    A two-digit state code for filtering jurisdictions (tx, ca)

  • Name
    type
    Type
    string
    Description

    A jurisdiction type for filtering. Options: city, county, transit, special_district, cdp, military, state

  • Name
    sales_tax_id
    Type
    string
    Description

    Filter by the state-assigned sales tax identifier

  • Name
    near
    Type
    string
    Description

    A comma-separated latitude,longitude pair (e.g. `32.7767,-96.7970`). Results are ordered by proximity when this parameter is used

  • Name
    radius
    Type
    number
    Description

    Maximum distance in miles from the `near` point. Requires the `near` parameter

  • Name
    limit
    Type
    integer
    Description

    Limit the number of results returned. Default: 25

Request

GET
/api/jurisdictions
curl -G https://open.zactax.com/api/jurisdictions \
    -H "Authorization: Bearer {token}" \
    -d q=Hudson \
    -d state=tx \
    -d limit=5
GET
/api/jurisdictions
const response = await fetch('https://open.zactax.com/api/jurisdictions?q=Hudson&state=tx&limit=5', {
    headers: {
        'Authorization': 'Bearer {token}'
    }
});
const data = await response.json();

Response

{
    "data": [
        {
            "id": 624,
            "name": "Hudson Oaks, Texas",
            "slug": "hudson-oaks-texas",
            "state": "tx",
            "type": "city",
            "sales_tax_rate": 0.02,
            "sales_tax_id": "2184071",
            "fips": "4835254",
            "latitude": 32.7181,
            "longitude": -97.6956
        },
        {
            "id": 623,
            "name": "Hudson, Texas",
            "slug": "hudson-texas",
            "state": "tx",
            "type": "city",
            "sales_tax_rate": 0.015,
            "sales_tax_id": "2003052",
            "fips": "4835228",
            "latitude": 31.3224,
            "longitude": -94.7802
        }
    ],
    "links": {
        "first": "...",
        "last": "...",
        "prev": null,
        "next": "..."
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "per_page": 25,
        "to": 2,
        "total": 2
    }
}

GET

Get a jurisdiction

This endpoint allows you to retrieve a single jurisdiction by its ID.

Request

GET
/api/jurisdictions/624
curl https://open.zactax.com/api/jurisdictions/624 \
    -H "Authorization: Bearer {token}"
GET
/api/jurisdictions/624
const response = await fetch('https://open.zactax.com/api/jurisdictions/624', {
    headers: {
        'Authorization': 'Bearer {token}'
    }
});
const data = await response.json();

Response

{
    "data": {
        "id": 624,
        "name": "Hudson Oaks, Texas",
        "slug": "hudson-oaks-texas",
        "state": "tx",
        "type": "city",
        "sales_tax_rate": 0.02,
        "sales_tax_id": "2184071",
        "fips": "4835254",
        "latitude": 32.7181,
        "longitude": -97.6956
    }
}

GET

List population estimates for a jurisdiction

This endpoint returns all Census population estimates for a jurisdiction, one for each year, in ascending order by year. The data comes from the Census Bureau Population Estimates Program and starts in 2000. The response is not paginated.

For each year, we keep only the estimate from the newest vintage that covers that year. This endpoint does not carry estimates forward, so the list stops at the year of the newest estimate. Special districts, transit authorities, and military bases have no estimates, so data is empty. Refer to Population for more about years and vintages.

  • Name
    year
    Type
    integer
    Description

    The year of the estimate. The estimate is for July 1 of this year

  • Name
    value
    Type
    integer
    Description

    The estimated population

  • Name
    source
    Type
    string
    Description

    `pep_postcensal` (the 2010 and later estimates) or `pep_intercensal` (the 2000 to 2009 estimates)

  • Name
    vintage
    Type
    integer
    Description

    The Census vintage of the estimate, for example `2025`

Request

GET
/api/jurisdictions/624/population
curl https://open.zactax.com/api/jurisdictions/624/population \
    -H "Authorization: Bearer {token}"
GET
/api/jurisdictions/624/population
const response = await fetch('https://open.zactax.com/api/jurisdictions/624/population', {
    headers: {
        'Authorization': 'Bearer {token}'
    }
});
const data = await response.json();

Response

{
    "data": [
        {
            "year": 2000,
            "value": 1581,
            "source": "pep_intercensal",
            "vintage": 2010
        },
        {
            "year": 2010,
            "value": 1703,
            "source": "pep_postcensal",
            "vintage": 2020
        },
        {
            "year": 2025,
            "value": 2800,
            "source": "pep_postcensal",
            "vintage": 2025
        }
    ]
}