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

HeaderInTypeRequiredDescription
AuthorizationheaderstringYesAPI Key from your console.
Content-TypeheaderstringYesMust be application/json.
zip_codepathstringYesZip 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

FieldTypeDescription
zipstringZip or postal code
citystringCity associated with the code
statestringState abbreviation
countystringCountry code
latfloatLatitude of the location
lngfloatLongitude of the location
state_fullstringFull state name

Code Snippets

Code ready to go! Select one of your API keys to fill in the code  

Login to see your API keys or  Register for a free account and up to 1000 free credits.

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;