ZipAtlas Developer Docs

Everything you need to integrate our REST API

🚀 Quick start

Public endpoints are rate-limited per IP (30 req/hr). For higher limits, create a free account and generate an API key from your dashboard.

curl -H "X-API-Key: YOUR_KEY" \
  "https://zipcodes.luxylushdeals.store/api/?endpoint=search&q=lahore"

🔑 Authentication

Pass your API key via:

  • Header: X-API-Key: YOUR_KEY
  • Header: Authorization: Bearer YOUR_KEY
  • Query: ?api_key=YOUR_KEY

📚 Endpoints

GET /api/?endpoint=health
Basic health check.
curl "https://zipcodes.luxylushdeals.store/api/?endpoint=health"
GET /api/?endpoint=search&q=QUERY
Search across postal codes, cities, areas.
curl "https://zipcodes.luxylushdeals.store/api/?endpoint=search&q=karachi"
GET /api/?endpoint=postal&code=CODE&country=CC
Lookup by exact postal code. If not found, hybrid-fetches from external and queues for approval.
curl "https://zipcodes.luxylushdeals.store/api/?endpoint=postal&code=44000&country=PK"
GET /api/?endpoint=countries
List all countries with counts.
curl "https://zipcodes.luxylushdeals.store/api/?endpoint=countries"
GET /api/?endpoint=cities&country=CC&limit=200&offset=0
Paginated list of cities for a country.
curl "https://zipcodes.luxylushdeals.store/api/?endpoint=cities&country=IN"
GET /api/?endpoint=stats
Aggregate statistics.
curl "https://zipcodes.luxylushdeals.store/api/?endpoint=stats"

⏱️ Rate limits

TierLimit
Public (no key)30 requests / hour / IP
Free key500 requests / hour
Premium keyCustom — contact us

Response headers include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

📦 Response format

{
  "query": "lahore",
  "total": 8,
  "results": [
    {
      "postal_code": "54000",
      "area_name": "Lahore GPO",
      "city": "Lahore",
      "state": "Punjab",
      "country_code": "PK"
    }
  ],
  "_meta": {
    "status": 200,
    "timestamp": "2025-11-15T10:30:00+00:00",
    "api_version": "v1",
    "elapsed_ms": 12
  }
}

📥 CSV Import (Admin)

Admins can bulk-import postal codes via CSV. Required columns: country_code,state,city,postal_code,area (area optional).

🛠 SDKs & Examples

JavaScript

fetch('https://zipcodes.luxylushdeals.store/api/?endpoint=search&q=mumbai',{
  headers:{'X-API-Key':'YOUR_KEY'}
}).then(r=>r.json()).then(console.log);

PHP

$ctx = stream_context_create([
 'http'=>['header'=>"X-API-Key: YOUR_KEY"]
]);
$r = file_get_contents(
 'https://zipcodes.luxylushdeals.store/api/?endpoint=postal&code=400001',
 false, $ctx);
print_r(json_decode($r, true));

Python

import requests
r = requests.get('https://zipcodes.luxylushdeals.store/api/',
  params={'endpoint':'search','q':'noida'},
  headers={'X-API-Key':'YOUR_KEY'})
print(r.json())