Data source: Zippopotam.us
https://context.gnist.ai/rest/postal-codes/
AuthenticationAll 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_codeLook 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
country_code | string | required | ISO 3166-1 alpha-2 country code (e.g. 'US', 'NO', 'DE'). |
postal_code | string | required | Postal or ZIP code to look up (e.g. '90210', '0150'). |
{
"country_code": "NO",
"postal_code": "example"
}search_by_placeFind postal codes for a city within a country and state.
Useful for reverse lookup — find postal codes when you know the place name.
| Parameter | Type | Required | Description |
|---|---|---|---|
country_code | string | required | ISO 3166-1 alpha-2 country code (e.g. 'US', 'DE'). |
state | string | required | State or province name (e.g. 'California', 'Bayern'). |
city | string | required | City or place name (e.g. 'Los Angeles', 'München'). |
{
"country_code": "NO",
"state": "example",
"city": "example"
}list_supported_countriesList all countries supported for postal code lookup.
Returns ISO country codes and names for all 70+ supported countries.
{
"query": "example"
}report_feedbackReport 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'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
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"}'
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())