Postal Code Lookup
Look up a postal or ZIP code in 60+ countries: city, region and approximate coordinates.
Pay by wallet (x402)
postal-code-lookup Example
Input
{
"postal_code": "10001",
"country_code": "US"
} Answer
{
"valid": true,
"places": [
{
"name": "New York City",
"state": "New York",
"latitude": 40.7484,
"longitude": -73.9967,
"state_abbreviation": "NY"
}
],
"postal_code": "10001",
"country_code": "US",
"country_name": "United States"
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
postal_code | string | Yes | Postal/ZIP code to look up |
country_code | string | No | ISO 2-letter country code (default US) |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
valid | boolean | Always (present in every successful answer) |
places | array | Always (present in every successful answer) |
postal_code | string | Always (present in every successful answer) |
country_code | string | Always (present in every successful answer) |
country_name | string | Usually (present for most inputs) |
How to call it
The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.
# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
-H "Authorization: Bearer $STRALE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"capability_slug": "postal-code-lookup",
"inputs": {
"postal_code": "10001",
"country_code": "US"
},
"max_price_cents": 2
}' {
"tool": "strale_execute",
"arguments": {
"slug": "postal-code-lookup",
"inputs": {
"postal_code": "10001",
"country_code": "US"
},
"max_price_cents": 2
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "postal-code-lookup",
inputs: {
"postal_code": "10001",
"country_code": "US"
},
max_price_cents: 2,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="postal-code-lookup",
inputs={
"postal_code": "10001",
"country_code": "US",
},
max_price_cents=2,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/postal-code-lookup?postal_code=10001&country_code=US' Limitations
Country coverage
Covers ~60 countries — some smaller nations may not have postal code data available
Reference data freshness
Postal code data is periodically updated — newly created codes may not be available immediately
Related tools
- Address Geocoding €0.02
- Barcode Lookup €0.05
- Container Tracking €0.05
- Country Lookup €0.02
- Country Tax Rates €0.02
- Country Trade Data €0.20