Dev.to WebDev ๐Ÿ›  Dev ๐Ÿ‘ 0 ๐Ÿ“– 1 min read

How I Built a Flat-Rate Reverse Geocoding API for Japan to Escape Google Maps Bill Shock

If you've ever built a global app or travel tool operating in Japan, you know the struggle: Google Maps Geocoding API pricing: At $5.00 per 1,000 requests, unexpected traffic spikes can lead to terrifying monthly bill

If you've ever built a global app or travel tool operating in Japan, you know the struggle:

  1. Google Maps Geocoding API pricing: At $5.00 per 1,000 requests, unexpected traffic spikes can lead to terrifying monthly bills.
  2. Messy Japanese address data: Official Japanese government (MLIT) CSVs and Japan Post files are difficult to normalize and query without self-hosting a spatial database like PostGIS.

To solve this for indie hackers and global dev teams, I built ReverseGeoJP โ€” a fast, flat-rate reverse geocoding API for Japan address data.

What it does

Send a standard HTTP GET request with latitude and longitude:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.reversegeojp.com/reverse?lat=35.6595&lon=139.6987"

Receive Japanese prefecture, city, town, postal code, and distance to town centroid in clean JSON:

{
  "prefecture": "ๆฑไบฌ้ƒฝ",           // Prefecture (e.g. Tokyo)
  "city": "ๆธ‹่ฐทๅŒบ",               // City / Ward (e.g. Shibuya-ku)
  "town": "้“็Ž„ๅ‚ไบŒไธ็›ฎ",          // Town / District (e.g. Dogenzaka 2-chome)
  "zipcode": "1500043",            // 7-digit postal code
  "zipcode_candidates": ["1500043"],
  "distance_m": 36                  // Distance to town centroid (m)
}

How it's built

  • Cloudflare Workers & D1: Powered by SQLite at the edge, offering fast response times globally without server maintenance overhead.
  • Official Data: Sourced from official Ministry of Land, Infrastructure, Transport and Tourism (MLIT) location data and Japan Post records.
  • Flat-Rate Plans: Free tier (1,000 req/mo), then flat monthly subscriptions ($15/mo for 30k req, $39/mo for 200k req) with zero per-request surge charges.

Try it out

You can test the API and sign up for a free API key at https://api.reversegeojp.com/en (no credit card required).

I'd love to hear your feedback on the schema, performance, or features you'd like to see!

๐Ÿ“ฐ Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.