
Overview
The GeoZipList family of endpoints lets you retrieve full lists of U.S. ZIP Codes by city, county, or state in a single, efficient call. Whether you choose /api/geoziplistcity
, /api/geoziplistcounty
, or /api/geozipliststate
, the response schema is identical—just swap the input parameters to suit your needs.
Key Business Use Cases
1. Bulk Data Enrichment
Append up‑to‑date ZIP Code lists to your CRM or analytics pipelines to support territory planning and reporting without manual data maintenance.
2. Dynamic Form Population
Auto‑populate ZIP Code dropdowns in your web forms once a user selects their city, county, or state—improving accuracy and UX.
3. Location‑Aware Reporting
Generate sales or service coverage reports segmented by ZIP Code—grouped by city, county, or state—to inform strategic decisions.
Developer Spotlight: C# Code Snippet
// GeoZipListCity / GeoZipListCounty / GeoZipListState C# example
using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
namespace CDXGeoDataSample
{
class Program
{
static async Task Main()
{
var apiKey = Environment.GetEnvironmentVariable("CDX_GEO_KEY");
var format = "json";
// Choose one endpoint and its parameters:
// City endpoint:
var endpoint = $"geoziplistcity?key={apiKey}&state=NJ&county=Morris&city=Morristown&format={format}";
// County endpoint:
// var endpoint = $"geoziplistcounty?key={apiKey}&state=NJ&county=Morris&format={format}";
// State endpoint:
// var endpoint = $"geozipliststate?key={apiKey}&state=NJ&format={format}";
using var client = new HttpClient { BaseAddress = new Uri("https://geodata.cdxtech.com/api/") };
var response = await client.GetAsync(endpoint);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
var results = JsonDocument.Parse(json).RootElement.GetProperty("results");
Console.WriteLine("ZIP Codes returned:");
foreach (var item in results.EnumerateArray())
{
Console.WriteLine($" {item.GetProperty("zipCode").GetString()} " +
$"({item.GetProperty("city").GetString()}, " +
$"{item.GetProperty("county").GetString()}, " +
$"{item.GetProperty("state").GetString()})");
}
}
}
}
Sample Response
{
"service": "GeoZipListCity",
"results": [
{ "zipCode": "07960", "city": "Morristown", "county": "Morris", "state": "NJ" },
{ "zipCode": "07961", "city": "Morristown", "county": "Morris", "state": "NJ" },
{ "zipCode": "07962", "city": "Morristown", "county": "Morris", "state": "NJ" }
],
"tokenCharge": 2
}
Getting Started
- Sign up for a free CDXGeoData account and grab your API key.
- Choose your endpoint and set the required parameters:
/api/geoziplistcity
: state
, county
, city
/api/geoziplistcounty
: state
, county
/api/geozipliststate
: state
- Specify your
format
(json
, xml
, or csv
) and fire off the GET request.
- Process the uniform
results
array to handle ZIP Code data in your application.