API Documentation

ZipCodeFacts API

Complete reference for integrating US ZIP code demographics, housing data, and location information into your applications.

Quick Start

1

Get API Key

Sign up for free to get your API key. No credit card required.

2

Add to Header

Include your API key in the Authorization header.

Authorization: Bearer zcf_xxx
3

Make Requests

Start fetching ZIP code data from our endpoints.

/api/v1/zip/90210

Authentication

All API requests require authentication via an API key. Include your key in the request header:

curl -X GET "https://zipcodefacts.com/api/v1/zip/90210"   -H "Authorization: Bearer zcf_your_api_key_here"

Alternatively, pass the key as a query parameter (not recommended for production):

GET /api/v1/zip/90210?api_key=zcf_your_api_key_here

Endpoints

GET
/api/v1/zip/{zipCode}

Get detailed information for a specific ZIP code.

Parameters

NameTypeDescription
zipCodestring5-digit US ZIP code (e.g., "90210")

Example Response

{
  "zipCode": "90210",
  "city": "Beverly Hills",
  "state": "CA",
  "county": "Los Angeles",
  "location": {
    "latitude": 34.0901,
    "longitude": -118.4065
  },
  "demographics": {
    "population": 21741,
    "medianHouseholdIncome": 153042,
    "medianHomeValue": 2500000,
    "areaClassification": "Urban",
    "landAreaSqMiles": 5.71
  },
  "housing": {
    "zillowHomeValueIndex": 3250000,
    "appreciation1Year": 4.2,
    "appreciation5Year": 45.3,
    "marketTrend": "Stable"
  },
  "metadata": {
    "dataSource": "US Census Bureau ACS 2023",
    "lastUpdated": "2024-01-15T00:00:00Z"
  }
}
GET
/api/v1/city/{cityStateKey}

Get city data with all associated ZIP codes.

Parameters

NameTypeDescription
cityStateKeystringCity and state in format "city-name-st" (e.g., "los-angeles-ca")
GET
/api/v1/search

Search for ZIP codes and cities.

Query Parameters

NameTypeDescription
qstringSearch query (min 2 characters)
limitintegerMax results (1-100, default 20)
statestringFilter by state (2-letter code)
POST
/api/v1/bulk
Pro+

Bulk lookup for multiple ZIP codes (up to 100 per request).

Request Body

{
  "zipCodes": ["90210", "10001", "60601"]
}

Rate Limits

TierDaily LimitMonthly Limit
Free1003,000
Starter1,00010,000
Pro10,000100,000
EnterpriseCustomCustom

Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining

Error Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Tier doesn't have access to endpoint
404Not Found - ZIP code or city not found
429Rate Limit Exceeded

Ready to Start?

Get your free API key and start building.