canonical: https://jentic.com/apis/zipcodeapi.com/zipcodeapi

# ZipCodeAPI

ZipCodeAPI provides US ZIP code distance calculations, radius searches, ZIP-to-location lookups, city-to-ZIP lookups, and Canadian postal code operations. The API key is embedded in the URL path for all requests. The API exposes 10 endpoints secured with apiKey authentication.

## For AI agents

Programmatically distance between two zip codes, distances from one zip code to multiple others. Covers 10 operations with apiKey authentication.

## Scope

Does not handle payments, communications, or crm - use for maps and geolocation only.

## Capabilities

- Distance between two ZIP codes
- ZIP codes within a radius
- Find close ZIP code pairs
- Multiple ZIP codes to location info
- Monitor ZipCodeAPI operational status and events

## Use cases

### Maps and Geolocation Operations

Use the ZipCodeAPI to perform maps geolocation operations programmatically. The API provides 10 endpoints covering core functionality including distance between two zip codes, distances from one zip code to multiple others, zip codes within a radius.

Example prompt: Call GET /distance.{format}/{zip_code1}/{zip_code2}/{units} to distance between two zip codes

### Automated Distance Management

Automate distance operations by combining multiple ZipCodeAPI endpoints. Agents can distances from one zip code to multiple others and then zip codes within a radius in a single workflow.

Example prompt: Call GET /multi-distance.{format}/{zip_code}/{other_zip_codes}/{units} to distances from one zip code to multiple others, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call ZipCodeAPI endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey tokens manually.

Example prompt: Search Jentic for 'distance between two zip codes', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/distance.{format}/{zip_code1}/{zip_code2}/{units}` | Distance between two ZIP codes |
| GET | `/multi-distance.{format}/{zip_code}/{other_zip_codes}/{units}` | Distances from one ZIP code to multiple others |
| GET | `/radius.{format}/{zip_code}/{distance}/{units}` | ZIP codes within a radius |
| POST | `/multi-radius.{format}/{distance}/{units}` | ZIP codes within radius for multiple centers |
| GET | `/match-close.{format}/{zip_codes}/{distance}/{units}` | Find close ZIP code pairs |
| GET | `/info.{format}/{zip_code}/{units}` | ZIP code to location info |
| GET | `/multi-info.{format}/{zip_codes}/{units}` | Multiple ZIP codes to location info |
| GET | `/city-zips.{format}/{city}/{state}` | City/state to ZIP codes |

## Key resources

- **Distance** — Distance calculations between ZIP codes
- **Radius** — Find ZIP codes within a radius
- **Location** — ZIP code to location information
- **City** — City/state to ZIP code lookups
- **SQL** — SQL WHERE clause generation for radius queries

## Why Jentic

- **Setup:** Wiring ZipCodeAPI by hand means embedding your api_key directly in the URL path and templating format and units segments into every request yourself. Through Jentic you install once, import ZipCodeAPI from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** ZipCodeAPI takes zip codes as lookup inputs rather than resources you own, so scoping is operations-only: limit the agent to the operations it needs, such as distance and radius lookups. You choose the operations it may call, so nothing beyond the lookups you select runs unless you add it.
- **Credential handling:** Your ZipCodeAPI key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'distance between two zip codes' or 'zip codes within a radius', and Jentic returns the matching ZipCodeAPI operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Here** — Alternative maps geolocation API
- **Tomtom** — Alternative maps geolocation API
- **Googleapis** — Complementary maps geolocation API

## FAQ

### What authentication does the ZipCodeAPI use?

The ZipCodeAPI uses an API key passed in the `api_key` path. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I distance between two zip codes with the ZipCodeAPI?

Yes. Use the GET /distance.{format}/{zip_code1}/{zip_code2}/{units} endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the ZipCodeAPI?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I distance between two zip codes through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'distance between two zip codes'. Jentic returns the matching ZipCodeAPI operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the ZipCodeAPI have?

The ZipCodeAPI exposes 10 endpoints covering distance, radius, location operations.

### Can I limit what my agent is allowed to do with the ZipCodeAPI?

Yes. Because Jentic One is self-hosted by you, your own rules decide which ZipCodeAPI operations and credentials the agent may use. ZipCodeAPI takes ZIP codes as lookup inputs rather than resources you own, so scoping is operations-only: you allow just the operations the agent needs, such as distance and radius lookups, and leave out the rest. Nothing beyond the ZIP-to-location or distance lookups you select runs unless you add it.
