Welcome to the zips.dev API documentation. This guide will help you understand how to connect and retrieve data from our zipcode lookup API.
The zips.dev API allows you to retrieve information about U.S. ZIP Codes. Simply pass in a valid ZIP Code and get details related to that region.
To access the API, you need to provide an API key, which can be obtained from your zips.dev account dashboard.
Dashboard
-> Settings
-> API Key
.API Key
.Include this API key in your request headers:
x-api-key: YOUR_API_KEY
Base URL: https://api.zips.dev/
To fetch data for a specific ZIP Code, use the following endpoint:
GET /zip?lookup={ZIPCODE}
lookup
(required): The 5-digit ZIP Code for which you want to retrieve information.Example:
https://api.zips.dev/zip?lookup=90808
The API returns a JSON response with details related to the provided ZIP Code. A typical response might look like:
{
"zip": "90808",
"city": "Long Beach",
"state": "CA",
"population": 40000,
"area_code": "562",
"county": "Los Angeles",
}
and more!
Code | Description |
---|---|
400 | Bad Request (Invalid or missing ZIP Code) |
404 | ZIP Code Not Found |
500 | Internal Server Error |
If you face any issues or have questions regarding the API, feel free to reach out at support@zips.dev.