Complete US ZIP code database with city, state, county, and precise coordinates. Lookup, radius search, full-text search, and state/city exploration — all from a single REST API.
curl https://apibarn.com/v1/zipcode/api/zip/90210 \
-H "x-api-key: YOUR_API_KEY"
Instant lookup for any US ZIP code. Returns city, state, county, FIPS code, and precise latitude/longitude coordinates.
Find all ZIP codes within a given radius (in miles) of a starting ZIP. Powered by haversine distance for accurate geodesic calculations.
Search across city name, county, and state simultaneously. Supports pagination so large result sets stay fast.
List all 50 US states with ZIP code counts, or pull every ZIP for a specific state — perfect for populating dropdowns and maps.
Retrieve all ZIP codes for a given city name, optionally restricted to a single state to handle common city names unambiguously.
Sourced from the authoritative GeoNames US ZIP code dataset. Bootstrapped automatically on service start; no manual data imports needed.
Pass your API key as a header and make your first request.
# Look up ZIP code 90210
curl https://apibarn.com/v1/zipcode/api/zip/90210 \
-H "x-api-key: YOUR_API_KEY"
# Find ZIP codes within 10 miles of 10001 (NYC)
curl "https://apibarn.com/v1/zipcode/api/zip/10001/nearby?radiusMiles=10&limit=20" \
-H "x-api-key: YOUR_API_KEY"