Japanese Name Romanization API: Passport-Style Hepburn

Passport-style Hepburn romanization requires specific handling for っ (double consonants), ん (n→m before b/p), and long vowels. Torify gets all the edge cases right.

Endpoint

GET https://torify.dev/v1/name/romanize

Parameters

NameTypeRequiredDescriptionExample
name string Yes Japanese name in kana やまだ たろう
order string No family-first or given-first family-first

Response example

{ "ok": true, "data": { "input": "やまだ たろう", "romaji": "YAMADA Taro", "order": "family-first" } }

Code examples

curl

curl "https://torify.dev/v1/name/romanize?name=%E3%82%84%E3%81%BE%E3%81%A0%20%E3%81%9F%E3%82%8D%E3%81%86"

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/name/romanize?name=%E3%82%84%E3%81%BE%E3%81%A0%20%E3%81%9F%E3%82%8D%E3%81%86'
);
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/name/romanize?name=%E3%82%84%E3%81%BE%E3%81%A0%20%E3%81%9F%E3%82%8D%E3%81%86",
    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).