Developer API

A free, documented REST API for forward geocoding, reverse geocoding, timezone lookup, and sun/moon times — the same privacy-respecting proxies this site runs on. Free tier: 1000 requests/day, 60/minute. No credit card; the key is issued instantly and shown once.

Get your free key
JNKDN

Not readable? Reload the page for a fresh code. Verified on our server — no third-party captcha service, nothing about you leaves this site.

We use your email only to contact you about breaking API changes or abuse. No newsletters, no resale.

Endpoints
EndpointWhat it doesExample
GET /api/v1/geocodeAddress / place → coordinates (top 5 matches)?q=Eiffel+Tower
GET /api/v1/reverse-geocodeCoordinates → address?lat=48.858&lng=2.294
GET /api/v1/timezoneCoordinates → IANA timezone + UTC offset?lat=28.61&lng=77.21
GET /api/v1/elevationCoordinates → terrain elevation (Copernicus DEM)?lat=27.99&lng=86.93
GET /api/v1/sun-timesSunrise, sunset, dawn, dusk, day length?lat=51.5&lng=-0.12&date=2026-07-19
GET /api/v1/moonMoon phase, illumination, moonrise/set?lat=51.5&lng=-0.12

Authentication: send the key as an X-Api-Key header (preferred) or ?key= parameter. Every response includes X-RateLimit-Remaining-Today. Errors are JSON with an error code. Geocoding data © OpenStreetMap contributors (ODbL) — cache results rather than re-querying, and show attribution in end-user apps.

Quick start
# 1. Geocode an address
curl -H "X-Api-Key: wiml_YOURKEY" "https://whatismylocation.ai/api/v1/geocode?q=Taj+Mahal"

# 2. Reverse geocode
curl -H "X-Api-Key: wiml_YOURKEY" "https://whatismylocation.ai/api/v1/reverse-geocode?lat=27.1751&lng=78.0421"

# 3. Sun times for today
curl -H "X-Api-Key: wiml_YOURKEY" "https://whatismylocation.ai/api/v1/sun-times?lat=27.1751&lng=78.0421"

Fair use: the free tier exists for prototypes, agents, and small apps. Need more? Talk to us.

For AI agents

This API is the sanctioned machine endpoint for the tools on this site (also advertised in llms.txt and ai.json). Agents are welcome on the same free tier — identify your agent in the signup purpose field.

Power tool: batch geocoding

Have a CSV of addresses (or coordinates)? The batch geocoding tool runs up to 500 rows through this API right in your browser with your key — queued politely at ~1 request/second, results downloadable as CSV or GeoJSON, and your file never touches our server. For jobs beyond a few thousand rows, use a commercial geocoder rather than a free community one.