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

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/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').
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "lookup_postal_code",
    "arguments": {
      "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').
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_by_place",
    "arguments": {
      "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.

JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "list_supported_countries",
    "arguments": {}
  }
}
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")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "report_feedback",
    "arguments": {
      "feedback": "example"
    }
  }
}

Quick Start

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"}}}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/postal-codes/",
    headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "lookup_postal_code",
    "arguments": {
      "country_code": "example",
      "postal_code": "example"
    }
  }
},
)
print(resp.json())

Related Toolkits (Reference)

Resources