GnistAI GnistAI
Log in

Postal Codes

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

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 4 tools tools 4 4 Reference

Data source: Zippopotam.us

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/postal-codes/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-postal-codes": {
      "url": "https://context.gnist.ai/mcp/postal-codes/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/postal-codes/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "lookup_postal_code", "arguments": {"country_code": "example", "postal_code": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/postal-codes/

4 endpoints available:

Shell
curl "https://context.gnist.ai/rest/postal-codes/lookup_postal_code?country_code=example&postal_code=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

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

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc postal-codes

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (4)

lookup_postal_code
Look up location details for a postal/ZIP code — city, state, country, and coordinates.
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').
search_by_place
Find postal codes for a city within a country and state.
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').
list_supported_countries
List all countries supported for postal code lookup.
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related