apyhub
GEOLOCATION · STANDARD DATA

US County Search API

What it does

US County Search lets you search for U.S. counties by name and returns matching county records and get matching results back in a structured response. Send a query string, and optionally set limit to control how many matches you want returned.

Use it when you need county-level reference data in forms, address workflows, jurisdiction checks, or analytics pipelines. The endpoint is designed for simple lookup flows where a user types a place name such as "Los Angeles" and your app needs to resolve it to county matches without maintaining its own county dataset.

County Search keeps the request surface small: query is required, and limit defaults to 50 with a maximum of 200. The response schema is open-ended, so you should treat the payload as a structured county search result rather than rely on undocumented fields.

If you're building location search, county selection, or administrative-region validation into a product, County Search gives you a focused lookup endpoint for that step in the workflow.

GET
Search counties
http://localhost:8080/dosvak/search-counties

QUICKSTART

GUIDE

Quickstart

Search counties by query, optionally limiting the number of results.

curl -X GET "http://localhost:8080/dosvak/search-counties?query=Los+Angeles&limit=10" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object containing the search query, the number of matching counties, the matching county records, and attribution details.

{
  "query": "california",
  "count": 5,
  "results": [
    {
      "county_fips": "06037",
      "county_name": "Los Angeles County",
      "state_name": "California",
      "population": 9757179,
      "median_household_income": "80794",
      "poverty_rate": "13.1",
      "unemployment_rate": "5.4"
    },
    {
      "county_fips": "06073",
      "county_name": "San Diego County",
      "state_name": "California",
      "population": 3298799,
      "median_household_income": null,
      "poverty_rate": null,
      "unemployment_rate": null
    }
  ],
  "attribution": []
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Searches for counties using a query string and optionally limits the number of results returned.

Query Parameter(s)

AttributeTypeMandatoryDescription
limitIntegerNoMaximum number of results to return. Default: 50; minimum: 1; maximum: 200.
queryStringYesSearch term. Minimum length: 2.

Response

The response includes the search query, the number of matching results, a list of matching counties, and attribution details.

Query parameters

Name
Type
Description
limitOPTIONAL
integer
DEFAULT 50
queryREQUIRED
string
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.