Japan My Number Validation API

My Number (個人番号) is Japan's social security ID. Torify validates the 12-digit format including the Verhoeff check digit without collecting or storing the input.

Endpoint

GET https://torify.dev/v1/mynumber/validate

Parameters

NameTypeRequiredDescriptionExample
number string Yes 12-digit My Number 123456789018

Response example

{ "ok": true, "data": { "valid": true } }

Code examples

curl

curl "https://torify.dev/v1/mynumber/validate?number=123456789018"

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/mynumber/validate?number=123456789018'
);
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/mynumber/validate?number=123456789018",
    headers={"X-API-Key": "your_torify_pro_key"}
)
print(res.json())

Edge cases & gotchas

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