Open-source Cloudflare Worker that geocodes Irish addresses and Eircodes via Google Maps.
This is the standalone API behind eircode.dev. The frontend lives in a separate (closed) repo.
GET /health— health checkGET /eircode?q=D02+X285— lookupPOST /eircode— JSON body:{ "query": "D02 X285" }
{
"ok": true,
"query": "D02 X285",
"formattedAddress": "Trinity College Dublin, College Green, Dublin 2, Ireland",
"eircode": "D02 X285",
"businessName": "Trinity College Dublin",
"location": { "lat": 53.3438, "lng": -6.2546 },
"placeId": "ChIJ...",
"embedUrl": "https://www.google.com/maps/...",
"tookMs": 142
}bun install # or npm install
cp .dev.vars.example .dev.vars # add your keys
bun run dev| Name | Purpose |
|---|---|
GOOGLE_MAPS_API_KEY |
Google Geocoding + Places API key (required) |
RAPIDAPI_PROXY_SECRET |
If set, /eircode requires header X-RapidAPI-Proxy-Secret to match. Leave unset to run open. |
wrangler secret put GOOGLE_MAPS_API_KEY
wrangler secret put RAPIDAPI_PROXY_SECRET # optional
bun run deployMIT