If you've searched for how to find all ZIP codes within a radius via the Google Maps API, you've probably ended up on Stack Overflow instead of official documentation. That's not bad luck, and it's not because you're missing an obscure parameter. Google Maps Platform can search for restaurants, gas stations, and pharmacies within a radius without any trouble, so it's a reasonable assumption that ZIP codes would work the same way. They don't. Neither the Geocoding API nor Places Nearby Search has an endpoint that returns a list of ZIP codes within a radius, and that gap is exactly why every search for an official answer keeps leading back to developer forums instead.
This post covers exactly what Google's APIs do instead and why that falls short, why ZIP codes are a harder data problem than most people assume, and the specific API request that returns a complete, sorted list of ZIP codes in a radius in a single call, with working code.
TL;DR
- Google Maps Platform has no endpoint for ZIP-radius lookups. Component filtering in the Geocoding API narrows results to a known postal code; it doesn't discover new ones. Places Nearby Search filters by place type, and postal codes aren't a supported type.
- ZIP codes aren't shapes. The U.S. Postal Service assigns them to mail delivery routes, not geographic areas. The U.S. Census Bureau therefore maintains a separate, approximate polygon layer called ZCTAs for mapping purposes. The "ZIP code boundary" maps you've seen are actually ZCTA maps.
- Two documented DIY workarounds, computing distance against a ZIP-to-coordinate database and working from Census ZCTA shapefiles, both work but come with real costs: centroid-based imprecision in the first case, and a data gap plus ongoing maintenance in the second.
- One GET request to a dedicated ZIP radius API returns every matching ZIP code, sorted by distance, with pagination handled for you.
What Google Maps Actually Gives You
Two APIs in Google Maps Platform sound like they might do this. Neither one does, and the reason why is specific to what each was actually built for.
The Geocoding API converts an address into coordinates, and supports component filtering, which restricts a request to a specific postal code and country you already know, rather than discovering codes inside an area. Google's own FAQ states plainly that in the geocoder, component filtering enforces only postal_code and country restrictions.
Places Nearby Search takes a center point, a radius, and one or more place types, then returns matching places, restaurants, gas stations, retail locations. Postal codes sit in the response-only type table rather than the filterable one, appearing as an address component on a result rather than something you can search for. It will find every pharmacy in a ten-mile radius. It won't do the same for ZIP codes.
Between the two, there's a genuine capability gap, not a documentation gap. Nothing in Google Maps Platform enumerates ZIP codes by area. As of this writing, no such endpoint has shipped.
What Google's APIs can do is reverse-geocode a single coordinate to find out which ZIP code it falls inside, one point at a time. That's a fundamentally different capability from returning every ZIP code in an area, which is why the workarounds developers actually use, covered next, don't rely on Google's API at all.
Why ZIP Codes Aren't Shapes to Begin With
Part of why this is harder than it looks: a ZIP code was never designed to be an area you can draw on a map. According to the U.S. Census Bureau, ZIP codes are assigned to USPS delivery routes, not geographic areas, and a ZIP code is stored as one component of a discrete delivery point, not a boundary, which the Bureau's own documentation describes as producing "a point-based dataset unsuitable for mapping and many analysis applications."
The maps you've likely seen with ZIP code boundaries are showing something else entirely: ZIP Code Tabulation Areas, or ZCTAs, a separate approximation the Census Bureau builds specifically because raw ZIP code data can't be mapped. The Census Bureau is explicit that it is not the same thing as a ZIP code: its own guidance states plainly that "not all valid ZIP Codes are represented by a 2020 ZCTA," and that a ZCTA may represent nothing more than "a single institutional or corporate delivery point address."
That gap has real consequences if you're building spatial tools. The U.S. Postal Service's own published figures put the current ZIP code count at 41,554, while the 2020 Census ZCTA dataset contains 33,791 records, because ZIP codes used only for PO boxes, or assigned to a single large facility, frequently have no corresponding ZCTA at all. Build a "ZIP codes in this radius" tool from ZCTA shapefiles alone, and you will silently drop several thousand valid ZIP codes, particularly PO-box-only and single-address codes, from every result set.
None of this is a flaw in any particular tool. It's the reason a ZIP-radius query is a fundamentally different, harder problem than a "coffee shops near me" query, and it's exactly why the two DIY workarounds below both carry real tradeoffs rather than being simple substitutes for a dedicated endpoint.

What Developers Try Instead
Before reaching for a dedicated API, developers have worked around this in two main ways.
Computing distance against a ZIP-to-coordinate database. Keep a table mapping each ZIP code to a center coordinate, then calculate the distance from your search point to every row using a Haversine-style formula, filtering to the radius you need. It works, and it measures distance to a single point rather than a ZIP code's actual shape, the same centroid-based approach a dedicated API typically uses too, so this isn't a precision downgrade. What you take on instead is sourcing and maintaining that ZIP-to-coordinate dataset yourself.
Working from Census ZCTA shapefiles. Download the Census Bureau's published ZCTA boundary polygons and determine which ZIP codes intersect a given area directly from the shapes, rather than a single point. This is more geographically precise, but it inherits the ZCTA-versus-ZIP-code gap covered above, and the underlying shapefiles only get refreshed once per decade.
How to Find All ZIP Codes Within a Radius Using an API
Both workarounds above mean sourcing and maintaining ZIP-related data yourself. The more direct path is a dedicated API built specifically to answer this question, no infrastructure to run, no dataset to refresh.
The ZIP Code Radius Search API runs the entire lookup as a single authenticated GET request. Pass it a center point, either a ZIP code plus a country, or a raw latitude and longitude, along with a radius and a unit, and it returns every matching ZIP code, sorted nearest first, with the exact straight-line distance to each one already calculated.
Like the DIY database approach above, this measures distance to each ZIP code's geographic center, not its actual boundary. What you're gaining over the DIY approach isn't more precision at the edges, it's not having to source, host, or maintain that dataset yourself.
If you just need a one-off list rather than building this into an application, the ZIP Code Radius Search CSV utility runs the same lookup in a browser and exports a CSV that opens directly in Excel, no code required. Otherwise, here's what that request looks like:
curl --location 'https://api.apifreaks.com/v1.0/zipcode/search/radius?code=98001&country=US&radius=25&unit=mi' \
--header 'X-apiKey: API-KEY'
And here's the response:
{
"total_results": 176,
"total_pages": 1,
"current_page": 1,
"current_page_size": 176,
"results": [
{
"code": "98003",
"region": "Washington",
"region_code": "WA",
"city": "King County",
"district": "Federal Way",
"distance": 1.891
},
{
"code": "98071",
"region": "Washington",
"region_code": "WA",
"city": "King County",
"district": "Auburn",
"distance": 1.969
},
{
"code": "98093",
"region": "Washington",
"region_code": "WA",
"city": "King",
"district": "Federal Way (Auburn)",
"distance": 2.117
},
{
"code": "98063",
"region": "Washington",
"region_code": "WA",
"city": "King County",
"district": "Federal Way",
"distance": 2.317
},
{
"code": "98002",
"region": "Washington",
"region_code": "WA",
"city": "King County",
"district": "Auburn",
"distance": 2.68
},
{
"...": "169 more results, ascending by distance"
},
{
"code": "98107",
"region": "Washington",
"region_code": "WA",
"city": "King",
"district": "Seattle (Ballard)",
"distance": 24.859
},
{
"code": "98103",
"region": "Washington",
"region_code": "WA",
"city": "King",
"district": "Seattle (Seattle)",
"distance": 24.939
}
]
}
That's the shape of it, truncated in the middle for readability. This is a real, tested response, all 176 entries are unique, correctly sorted, and stay within the requested 25-mile radius up to the farthest match at 24.939 mi.
No geocoding step first, no distance formula to write, no shapefiles to import or refresh. Coverage spans major global postal systems, USPS ZIP codes, Royal Mail postcodes, Canada Post, Australia Post, and India Post PIN codes, through the same endpoint and authentication key, so the same integration keeps working if your product expands into another country later.
Using GPS coordinates instead of a ZIP code
If your application already has a latitude and longitude, from a device GPS reading, a map click, or an earlier geocoding call, pass those directly instead of a ZIP code:
curl --location 'https://api.apifreaks.com/v1.0/zipcode/search/radius?lat=40.7580&long=-73.9855&radius=10&unit=mi' \
--header 'X-apiKey: API-KEY'
This skips a redundant geocoding round trip if you already have the coordinates on hand. If you're starting from a plain street address instead, geocode it first to get a latitude and longitude, then feed those into the request above. That's the correct way to search ZIP codes within a radius of an address, since the radius endpoint itself accepts a ZIP code or coordinates, not a raw address string.
In Python
import requests
url = "https://api.apifreaks.com/v1.0/zipcode/search/radius"
params = {
"code": "10001",
"country": "US",
"radius": 10,
"unit": "mi"
}
headers = {"X-apiKey": "API-KEY"}
response = requests.get(url, headers=headers, params=params)
data = response.json()
for result in data["results"]:
print(result["code"], result["distance"])
Building a Multi-Location Coverage Map
A single radius search covers one center point. If you're building delivery zones or service areas around multiple stores, warehouses, or field agents, loop over each location and merge the results, since a ZIP code within range of more than one location will come back in more than one response.
Plain deduplication throws away useful information, though. If you keep the shortest distance per code as you go, the same pass that builds your coverage set also tells you which location should serve each ZIP code:
import requests
APIFREAKS_KEY = "YOUR_API_KEY"
RADIUS_ENDPOINT = "https://api.apifreaks.com/v1.0/zipcode/search/radius"
def fetch_radius_results(zip_code, country, radius, unit="mi"):
matches = []
page = 1
while True:
response = requests.get(RADIUS_ENDPOINT, headers={"X-apiKey": APIFREAKS_KEY}, params={
"code": zip_code, "country": country,
"radius": radius, "unit": unit, "page": page
})
payload = response.json()
matches.extend(payload["results"])
if page >= payload["total_pages"]:
break
page += 1
return matches
def nearest_location_map(locations, radius, unit="mi"):
assignments = {}
for zip_code, country in locations:
for match in fetch_radius_results(zip_code, country, radius, unit):
current = assignments.get(match["code"])
if current is None or match["distance"] < current["distance"]:
assignments[match["code"]] = {**match, "nearest_location": zip_code}
return assignments
warehouses = [("75201", "US"), ("30303", "US"), ("80202", "US")]
service_map = nearest_location_map(warehouses, radius=25)

Units, Pagination, and the 100 km Ceiling
A few practical details worth knowing before you build against this:
- Distance units. Choose from
km,mi,yd,m,ft, orin. The default iskmif you don't specify one. - Maximum radius. 100 km or 100 mi, the two independent caps. The other four units cap at the kilometer equivalent rather than at 100 of their own unit: 109,361 yd, 100,000 m, 328,084 ft, or 3,937,007.75 in. So a 100-mile search is valid, but a 200 km search is not. Plan multi-hop coverage, like the multi-depot example above, for anything wider.
- Pagination. Dense metro areas can return thousands of ZIP codes for a single radius, so results are paginated at up to 500 per page. Every response includes
total_resultsandtotal_pages, so you always know exactly how many ZIP codes exist in that radius and whether you need another page, with no silent truncation. - Straight-line distance. Every distance returned is as-the-crow-flies, not driving distance, which is the standard convention for a programmatic service area since it isn't affected by road networks, traffic, or routing changes. It's measured to each ZIP code's geographic center, the same centroid basis covered above, not to a driving route.
When You Need a Different Query
Radius search answers "what's around this point." A few related questions come up often enough to mention here, so you don't reach for radius search when a more direct endpoint already does the job:
- Distance between two specific ZIP codes. If you already have both ZIP codes and just need the distance between them, the ZIP Code Distance API answers that directly without a radius search.
- Every ZIP code in a named city. If you need every ZIP code for a city rather than a radius around a point, the ZIP Codes Search by City API is the more direct fit.
- ZIP code lookup or validation. If you're validating a single ZIP code or pulling its city and region, the ZIP Code API handles that.
- Turning an address into coordinates. If you're starting from a street address rather than a ZIP code or coordinates, the Forward Geocoding API gets you a lat/long first.
Conclusion
Google Maps was never built to answer "which ZIP codes are inside this circle," and the workarounds that get close, computing distance against a ZIP-to-coordinate database or maintaining a ZCTA-based spatial database, trade off accuracy or ongoing maintenance for something a single API call now handles directly. A store locator, a delivery zone calculation, a service-area check, any of these can pull the complete, sorted list from the ZIP Code Radius Search API in one request. If you just need a one-off list instead of an integration, the ZIP Code Radius Search CSV utility does the same lookup with no code.
Start finding ZIP codes within a radius with 10,000 free credits. The APIFreaks ZIP Code Radius Search API requires no credit card to get started. Create a free account and make your first call in minutes.
FAQs
Can Google Maps show ZIP code boundaries?
Not directly. What most people mean by a "ZIP code boundary" is a ZCTA, a separate approximation the U.S. Census Bureau maintains for mapping and statistical purposes, not an official USPS boundary. Google Maps doesn't expose either one as a queryable shape through its API.
What is the radius of a ZIP code?
ZIP codes don't have a radius. They're mail delivery routes, not circles or shapes. A radius search instead measures the distance from your chosen center point to each ZIP code's geographic center and returns everything within the limit you set.
How do I get a list of ZIP codes within a radius?
Send a GET request to the ZIP Code Radius Search API with a center point, either a ZIP code and country or a latitude and longitude, plus a radius and a distance unit. The response returns every matching ZIP code sorted by distance. If the result count spans more than one page, paginate through with a page parameter until you've retrieved all of them.
Is Google's Geocoding API free?
It includes a free tier, up to 10,000 requests per month at the time of writing, after which usage is billed per request according to Google's published pricing. That free tier still requires an enabled billing account with a card on file. Regardless of cost, it only geocodes single addresses or restricts results to a ZIP code you already specify, so free usage doesn't change the fact that it can't enumerate ZIP codes across an area.
Does Google Maps have a radius tool?
Yes, but only for places, not ZIP codes. Places Nearby Search does radius-based search across businesses and points of interest, and the Geocoding API can restrict results to a ZIP code you already know, which isn't the same as searching by radius. Neither returns a list of ZIP codes for an arbitrary radius.
Can you find ZIP codes within a radius using the Google Maps API?
No. The Geocoding API and Places Nearby Search both fall short here: one restricts results to a postal code you already know, the other filters by business type, not postal code. Until Google adds this capability, a dedicated ZIP radius API or a self-built workaround are the two working options, with different accuracy and maintenance tradeoffs between them.
How far are ZIP codes from each other?
That depends entirely on which two ZIP codes you're comparing, since it isn't a fixed value. If you already know both ZIP codes and just need the distance between them rather than a full radius search, the ZIP Code Distance API calculates it directly.
