Prompt
Need a dataset API that can query by ZIP code and state
Latest observation
Oct 8, 2026
OpenAI APIWeb search: off
Here are a few good ways to get a dataset API that can query by ZIP code and state, depending on what data you need:
If you want US demographic / geographic data
-
US Census API
- Can query by state, ZIP Code Tabulation Area (ZCTA), county, tract, etc.
- Good for population, income, housing, age, education.
- Docs: https://www.census.gov/data/developers/data-sets.html
-
OpenDataSoft / Socrata datasets
- Many public datasets support filtering by ZIP and state through a REST API.
- Good if you’re looking for city/state-specific open data.
- Often uses
?select=...&where=...
-
Data.gov / state open data portals
- Many have APIs or downloadable datasets with ZIP/state fields.
- Best if you need a specific government dataset.
If you want business/location data
- Google Places API
- Query by ZIP/state indirectly via geocoding or location bias.
- Yelp Fusion API
- Can search businesses by location, including ZIP and state.
- Foursquare Places API
- Location search with ZIP/state support via geocoding or neighborhood.
If you want postal/geographic lookup
- Zipcodebase API
- Simple ZIP/state lookup.
- Zippopotam.us
- Free API for ZIP code lookup by country/ZIP.
- Example:
https://api.zippopotam.us/us/90210
- US ZIP Code API providers
- Many commercial APIs support ZIP → city/state, plus nearby ZIPs.
If you want your own dataset API
A simple design would be:
GET /records?zip=90210&state=CAGET /records?state=CAGET /records?zip=90210
If you want, I can also help you with one of these:
- recommend the best API for your exact use case
- give you sample code
- show how to build your own API with ZIP/state filtering