Japan Region Code Lookup: JIS X 0402 API

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.

Endpoint

GET https://torify.dev/v1/region/lookup

Parameters

NameTypeRequiredDescriptionExample
name string No Prefecture or city name (partial match) 東京都
code string No 5-digit JIS X 0402 code 13101

Response example

{ "ok": true, "data": { "code": "13101", "prefecture": "東京都", "city": "千代田区" } }

Code examples

curl

curl "https://torify.dev/v1/region/lookup"

TypeScript (x402-fetch)

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: { ... } }

Python (requests)

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())

Related endpoints

← All 36 endpoints

Pricing

$0.02 per call via x402 (USDC on Base). Or use a Pro API key ($49/mo, 10,000 calls/month).