GnistAI GnistAI
Log in

Postal Codes

Postal/ZIP code lookup — city, state, coordinates for 70+ countries.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 4 tools tools 4 4 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Reference

Data source: Zippopotam.us

REST Bridge Endpoint https://context.gnist.ai/rest/postal-codes/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (4)

lookup_postal_code

Look up location details for a postal/ZIP code — city, state, country, and coordinates.

Supports 70+ countries including US, UK, Norway, Germany, France, Japan, and more.

ParameterTypeRequiredDescription
country_codestringrequiredISO 3166-1 alpha-2 country code (e.g. 'US', 'NO', 'DE').
postal_codestringrequiredPostal or ZIP code to look up (e.g. '90210', '0150').
Request Body
{
  "country_code": "NO",
  "postal_code": "example"
}
search_by_place

Find postal codes for a city within a country and state.

Useful for reverse lookup — find postal codes when you know the place name.

ParameterTypeRequiredDescription
country_codestringrequiredISO 3166-1 alpha-2 country code (e.g. 'US', 'DE').
statestringrequiredState or province name (e.g. 'California', 'Bayern').
citystringrequiredCity or place name (e.g. 'Los Angeles', 'München').
Request Body
{
  "country_code": "NO",
  "state": "example",
  "city": "example"
}
list_supported_countries

List all countries supported for postal code lookup.

Returns ISO country codes and names for all 70+ supported countries.

Request Body
{
  "query": "example"
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
Request Body
{
  "feedback": "example"
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/rest/postal-codes/lookup_postal_code" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"country_code": "example", "postal_code": "example"}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/rest/postal-codes/lookup_postal_code",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={
  "country_code": "example",
  "postal_code": "example"
},
)
print(resp.json())

Related Toolkits (Reference)

Resources