Get Zip/Postal Code Details
Cost: 1 credit(s) per call
Endpoint
GET /v1/zip/lookup
The ZIP Lookup API gives you fast, accurate geographic data for U.S. ZIP codes and Canadian postal codes. It's ideal for autofilling forms, tagging user data with location details, or enriching leads and transactions with regional metadata.
Just send a ZIP or postal code, and the API returns city, state/province, full state name, and basic latitude/longitude info. It's a lightweight way to pull regional context without needing full address validation or third-party location databases.
Parameters
| Header | In | Type | Required | Description |
|---|---|---|---|---|
Authorization | header | string | Yes | API Key from your console. |
Content-Type | header | string | Yes | Must be application/json. |
| zip_code | path | string | Yes | Zip or postal code to look up |
JSON Response
{
"zip": "90210",
"city": "Beverly Hills",
"state": "CA",
"county": "Los Angeles",
"lat": 34.0901,
"lng": -118.4065,
"state_full": "California"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| zip | string | Zip or postal code |
| city | string | City associated with the code |
| state | string | State abbreviation |
| county | string | Country code |
| lat | float | Latitude of the location |
| lng | float | Longitude of the location |
| state_full | string | Full state name |
Code Snippets
Code ready to go! Select one of your API keys to fill in the code
Note: You can also try it in our API playground
curl -X GET "https://api.wyldapi.com/v1/zip/lookup/90210" \
-H "Authorization: Bearer <YOUR_TOKEN>"
import requests
url = "https://api.wyldapi.com/v1/zip/lookup/90210"
headers = {
"Authorization": "Bearer <YOUR_TOKEN>"
}
response = requests.get(url, headers=headers)
print(response.json())
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wyldapi.com/v1/zip/lookup/90210");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <YOUR_TOKEN>"
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>
fetch("https://api.wyldapi.com/v1/zip/lookup/90210", {
method: "GET",
headers: {
"Authorization": "Bearer <YOUR_TOKEN>"
}
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
import React, { useEffect } from "react";
import axios from "axios";
const ZipLookup = () => {
useEffect(() => {
axios.get("https://api.wyldapi.com/v1/zip/lookup/90210", {
headers: {
Authorization: "Bearer <YOUR_TOKEN>"
}
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
}, []);
return <div>Check the console for zip code data</div>;
};
export default ZipLookup;
WyldAPI