Places & Geocoding API
Search places, geocode addresses, and convert coordinates
The Places API allows you to search for places, businesses, and points of interest worldwide. It returns rich metadata including ratings, categories, contact information, and location details.
Global Coverage
Search places worldwide with consistent data quality.
Rich Metadata
Get detailed information including ratings, categories, and contact details.
https://api.geog.dev/v1/placesSearch for places by text query
/searchSearch for places using a text query. Supports business names, addresses, categories, and more.
Query Parameters
q requiredSearch query text (e.g., "pizza near me", "Starbucks", "123 Main St")
lat optionalLatitude for location bias (-90 to 90)
lng optionalLongitude for location bias (-180 to 180)
limit optionalMaximum number of results (1-50, default: 10)
category optionalFilter by category (restaurant, hotel, gas_station, etc.)
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.geog.dev/v1/places/search?q=coffee&lat=37.7749&lng=-122.4194&limit=5"Example Response
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Blue Bottle Coffee",
"category": "cafe",
"address": "66 Mint St, San Francisco, CA 94103",
"phone": "+1 (415) 495-3394",
"website": "https://bluebottlecoffee.com",
"rating": 4.2,
"price_level": 2,
"opening_hours": {
"open_now": true,
"periods": [
{
"open": { "day": 1, "time": "0600" },
"close": { "day": 1, "time": "1900" }
}
]
}
},
"geometry": {
"type": "Point",
"coordinates": [-122.4088, 37.7849]
}
}
],
"attribution": "Data © geog"
}Get detailed information about a specific place
/{place_id}Retrieve comprehensive details about a specific place using its unique identifier.
Path Parameters
place_id requiredUnique identifier for the place (returned in search results)
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.geog.dev/v1/places/place_12345"All responses return GeoJSON Feature Collections
Place Properties
name string Place namecategory string Place categoryaddress string Formatted addressphone string Phone numberwebsite string Website URLrating number Rating (1-5)price_level number Price level (1-4)400 Bad Request Invalid parameters401 Unauthorized Invalid or missing API key404 Not Found Place not found429 Too Many Requests Rate limit exceeded500 Server Error Internal server errorConvert addresses to coordinates and coordinates to addresses
The Places API includes geocoding capabilities for both forward geocoding (address to coordinates) and reverse geocoding (coordinates to address).
Convert addresses to coordinates
/geocode/forwardConvert a text address or place name into geographic coordinates (latitude and longitude).
Query Parameters
q requiredAddress or place name to geocode
limit optionalMaximum number of results (1-10, default: 5)
country optionalBias results to specific country (ISO 3166-1 alpha-2 code)
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.geog.dev/v1/places/geocode/forward?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA"Example Response
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "1600 Amphitheatre Parkway, Mountain View, CA 94043, USA",
"country": "United States",
"region": "California",
"locality": "Mountain View",
"postal_code": "94043",
"confidence": 0.95,
"match_type": "exact"
},
"geometry": {
"type": "Point",
"coordinates": [-122.0844, 37.4220]
}
}
],
"attribution": "Data © geog"
}Convert coordinates to addresses
/geocode/reverseConvert geographic coordinates (latitude and longitude) into human-readable addresses.
Query Parameters
lat requiredLatitude (-90 to 90)
lng requiredLongitude (-180 to 180)
zoom optionalZoom level for granularity (1-18, default: 18)
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.geog.dev/v1/places/geocode/reverse?lat=37.4220&lng=-122.0844"Example Response
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "1600 Amphitheatre Parkway, Mountain View, CA 94043, USA",
"house_number": "1600",
"street": "Amphitheatre Parkway",
"locality": "Mountain View",
"region": "California",
"country": "United States",
"postal_code": "94043",
"confidence": 0.98
},
"geometry": {
"type": "Point",
"coordinates": [-122.0844, 37.4220]
}
}
],
"attribution": "Data © geog"
}