Japan's JIS X 0402 standard assigns 5-digit codes to every prefecture and municipality. Torify lets you resolve names ↔ codes via a single REST call.
https://torify.dev/v1/region/lookup
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
name |
string | No | Prefecture or city name (partial match) | 東京都 |
code |
string | No | 5-digit JIS X 0402 code | 13101 |
{ "ok": true, "data": { "code": "13101", "prefecture": "東京都", "city": "千代田区" } }
curl "https://torify.dev/v1/region/lookup"
import { wrapFetchWithPayment } from 'x402-fetch';
import { privateKeyToAccount } from 'viem/accounts';
const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const fetchWithPayment = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPayment(
'https://torify.dev/v1/region/lookup'
);
const data = await res.json();
console.log(data); // { ok: true, data: { ... } }
import requests
# Free MCP tier (no auth) or API key (X-API-Key header)
res = requests.get(
"https://torify.dev/v1/region/lookup",
headers={"X-API-Key": "your_torify_pro_key"}
)
print(res.json())
/v1/postal/lookup — Japan Postal Code Lookup: Zipcode → Address API
/v1/address/normalize — Japanese Address Normalization API
/v1/coordinate/convert — Japan Coordinate Conversion API: WGS84 ↔ JGD2011