Reference
API documentation
Authenticate with an x-key header. Base URL: https://zip.getziptastic.com
Authentication
Every v3 request takes your API key in the x-key header. The keyless v2 endpoint is rate-limited and free.
curl -H "x-key: YOUR_KEY" https://zip.getziptastic.com/v3/US/48867
Forward geocoding
Turn a postal code into readable locale information.
GET /v3/<country_code>/<postal_code>
Response
[
{
"country": "US",
"postal_code": "48867",
"city": "Owosso",
"county": "Shiawassee",
"state": "Michigan",
"state_short": "MI",
"latitude": 42.9934,
"longitude": -84.1595,
"timezone": "America/Detroit",
"geohash": "dpshsfsytw8k"
}
]
Reverse geocoding
Turn coordinates into the nearest locales, ranked by distance.
GET /v3/reverse/<latitude>/<longitude>/<radius_in_meters>
Batch lookups agent-friendly
Resolve up to 100 codes in a single round-trip, each with its own result or error.
curl -X POST -H "x-key: YOUR_KEY" -H "content-type: application/json" \
-d '{"lookups":[{"country":"US","postal_code":"48867"},
{"country":"GB","postal_code":"SW1A 1AA"}]}' \
https://zip.getziptastic.com/v3/batchForgiving resolve agent-friendly
Pass a loose string and let Ziptastic infer the country and code.
GET /v3/resolve?q=48867
Machine-readable spec
Agents can discover every endpoint and its shape from the OpenAPI document.
GET /openapi.json
MCP server
Use Ziptastic natively from any MCP client (Claude, Cursor, …). Six tools, all authenticated with your key.
{
"mcpServers": {
"ziptastic": {
"command": "python",
"args": ["-m", "ziptastic_mcp.server"],
"env": { "ZIPTASTIC_API_KEY": "YOUR_KEY" }
}
}
}Official & community libraries
Find official libraries on GitHub (jQuery, PHP, Python, and more). See full code examples →
- Node Ziptastic by Ben Drucker
- Angular Ziptastic by Ben Drucker
- Ziptastic Ruby Gem by Ezekiel Templin
- .NET Ziptastic by Justin Porter