Turn addresses into coordinates and IPs into locations with standardized response formats.
A geocoding and IP geolocation API service with intelligent caching and consistent response formats. Built for Hack Club projects that need reliable location data.
Quick start with an API key from a Hack Club HQ staff member:
curl "https://geocoder.hackclub.com/v1/geocode?address=1600+Amphitheatre+Parkway&key=your_api_key"
# Returns:
{
"lat": 37.4223,
"lng": -122.0844,
"formatted_address": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
"state_name": "California",
"state_code": "CA",
"country_name": "United States",
"country_code": "US",
"backend": "google_maps_platform_geocoding",
"raw_backend_response": { ... }
}
GET /v1/geocode
Convert addresses to coordinates.
address — The address to geocodekey — Your API keyGET /v1/geocode?address=1600+Amphitheatre+Parkway&key=your_api_key
Response format:
{
"lat": 37.4223,
"lng": -122.0844,
"formatted_address": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
"state_name": "California",
"state_code": "CA",
"country_name": "United States",
"country_code": "US",
"backend": "google_maps_platform_geocoding",
"raw_backend_response": { ... }
}
Note: The raw_backend_response contains the complete response from Google Maps Platform Geocoding API. For detailed field documentation, see Google's official documentation.
GET /v1/geocode_structured
Convert structured addresses to coordinates using separate address components.
key — Your API keyaddress_line_1 — Primary street address (optional)address_line_2 — Secondary address (optional)city — City name (optional)state — State or province (optional)postal_code — ZIP or postal code (optional)country — Country name (optional)GET /v1/geocode_structured?address_line_1=1600+Amphitheatre+Parkway&city=Mountain+View&state=CA&postal_code=94043&country=USA&key=your_api_key
Note: All address fields are optional, but at least one must be provided.
Response format: Same as /v1/geocode endpoint
Benefits: Better geocoding accuracy with structured input, easier integration for form-based address collection.
GET /v1/geoip
Get location from IP addresses.
ip — IPv4 or IPv6 addresskey — Your API keyGET /v1/geoip?ip=8.8.8.8&key=your_api_key
Response format:
{
"lat": 37.4056,
"lng": -122.0775,
"ip": "8.8.8.8",
"city": "Mountain View",
"region": "California",
"country_name": "United States",
"country_code": "US",
"postal_code": "94043",
"timezone": "America/Los_Angeles",
"org": "AS15169 Google LLC",
"backend": "ipinfo_api",
"raw_backend_response": { ... }
}
Note: The raw_backend_response contains the complete response from IPinfo API. For detailed field documentation, see IPinfo's developer documentation.
GET /v1/reverse_geocode
Convert coordinates (latitude and longitude) to an address using Google's reverse geocoding service.
lat (required): Latitude coordinate (between -90 and 90)lng (required): Longitude coordinate (between -180 and 180)key (required): Your API keyGET /v1/reverse_geocode?lat=37.422476&lng=-122.084250&key=your_api_key
{
"lat": 37.422476,
"lng": -122.084250,
"formatted_address": "1600 Amphitheatre Parkway, Mountain View, CA 94043, USA",
"address_line_1": "1600 Amphitheatre Parkway",
"city": "Mountain View",
"state": "CA",
"state_full": "California",
"postal_code": "94043",
"country_name": "United States",
"country_code": "US",
"backend": "google_maps_platform_geocoding",
"raw_backend_response": { ... }
}
Note: The raw_backend_response contains the complete response from Google's Geocoding API. For detailed field documentation, see Google's geocoding documentation.
GET /health
Check service status. No authentication required.
Errors return JSON with standard HTTP status codes:
{
"error": {
"code": "INVALID_API_KEY",
"message": "The provided API key is invalid",
"timestamp": "2024-01-15T10:30:00Z"
}
}
Common error codes:
INVALID_API_KEY (401)RATE_LIMIT_EXCEEDED (429)INVALID_ADDRESS (400)INVALID_IP (400)EXTERNAL_API_ERROR (502) — Failed to geocode or no results found