Migrating from Google Maps
Switch from Google Maps Platform to Plaza with minimal code changes.
Plaza can replace most Google Maps Platform APIs. Data comes from OpenStreetMap. The main differences: better pricing, no JS SDK lock-in, and query interfaces Google doesn’t offer.
API mapping
Section titled “API mapping”| Google Maps API | Google endpoint | Plaza endpoint |
|---|---|---|
| Places (Nearby Search) | /maps/api/place/nearbysearch | GET /features |
| Places (Text Search) | /maps/api/place/textsearch | GET /features |
| Places (Details) | /maps/api/place/details | GET /features/:type/:id |
| Geocoding | /maps/api/geocode | GET /geocode |
| Reverse Geocoding | /maps/api/geocode (latlng param) | GET /geocode/reverse |
| Directions | /maps/api/directions | POST /route |
| Distance Matrix | /maps/api/distancematrix | POST /matrix |
| Places Autocomplete | /maps/api/place/autocomplete | GET /geocode/autocomplete |
All Plaza endpoints are under https://plaza.fyi/api/v1.
Auth change
Section titled “Auth change”Google uses a query parameter:
https://maps.googleapis.com/maps/api/geocode/json?address=...&key=AIza...Plaza uses a header:
curl -H "x-api-key: pk_live_abc123" \ "https://plaza.fyi/api/v1/geocode?q=..."SDKs handle this for you — just pass the key at initialization.
Response format
Section titled “Response format”Google returns custom JSON. Plaza returns GeoJSON.
{ "results": [{ "formatted_address": "1600 Pennsylvania Avenue NW, Washington, DC 20500", "geometry": { "location": { "lat": 38.8977, "lng": -77.0365 } } }], "status": "OK"}{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-77.0365, 38.8977] }, "properties": { "name": "The White House", "street": "Pennsylvania Avenue NW", "housenumber": "1600", "city": "Washington", "country_code": "us" } }]}Coordinate order: GeoJSON uses [lng, lat], Google uses {"lat": ..., "lng": ...}. Plaza accepts GeoJSON geometry objects for all coordinate inputs.
Side-by-side code examples
Section titled “Side-by-side code examples”Geocoding
Section titled “Geocoding”Google (Python)
import googlemaps
gmaps = googlemaps.Client(key="AIza...")result = gmaps.geocode("1600 Pennsylvania Ave NW, Washington DC")
location = result[0]["geometry"]["location"]print(f"{location['lat']}, {location['lng']}")Plaza (Python)
import plaza
client = plaza.Client(api_key="pk_live_abc123")result = client.geocode(q="1600 Pennsylvania Ave NW, Washington DC")
coords = result.features[0].geometry.coordinatesprint(f"{coords[1]}, {coords[0]}")Nearby search
Section titled “Nearby search”Google (Python)
results = gmaps.places_nearby( location=(48.8566, 2.3522), radius=1000, type="restaurant",)for place in results["results"]: print(place["name"])Plaza (Python)
results = client.features.nearby( location={"type": "Point", "coordinates": [2.3522, 48.8566]}, radius=1000, tags={"amenity": "restaurant"},)for feature in results.features: print(feature.properties["name"])Directions
Section titled “Directions”Google (Python)
directions = gmaps.directions( origin="Paris, France", destination="Lyon, France", mode="driving",)route = directions[0]print(f"Distance: {route['legs'][0]['distance']['text']}")Plaza (Python)
route = client.route( origin={"type": "Point", "coordinates": [2.3522, 48.8566]}, destination={"type": "Point", "coordinates": [4.8357, 45.7640]}, mode="auto",)print(f"Distance: {route.properties['distance_m']}m")Plaza takes GeoJSON Point geometries for coordinates — geocode addresses first if needed.
Travel modes
Section titled “Travel modes”| Plaza | |
|---|---|
driving | auto |
walking | foot |
bicycling | bicycle |
transit | — |
No transit routing — OSM lacks real-time transit schedules.
What Plaza has that Google doesn’t
Section titled “What Plaza has that Google doesn’t”PlazaQL. Plaza’s purpose-built query language for geospatial data. “All drinking water fountains within 200m of a hiking trail” — one query. No Google equivalent.
Isochrones. “Everywhere reachable within 15 minutes by bike.” Google doesn’t offer isochrone polygons.
Full tag access. OSM tags go deep — wheelchair=yes, opening_hours=Mo-Fr 08:00-18:00, cuisine=sushi, building:levels=5. Google exposes a limited set of attributes. Plaza gives you everything.
No client-side restrictions. Google’s ToS requires displaying results on a Google Map. Plaza has no such restriction.
Pricing comparison
Section titled “Pricing comparison”| API | Google price (per 1K) | Plaza price (per 1K) |
|---|---|---|
| Geocoding | $5.00 | $0.50 |
| Directions | $5.00–$10.00 | $1.50 |
| Places | $17.00–$32.00 | $0.50 |
| Distance Matrix | $5.00–$10.00 | $1.50 |
Plaza’s free tier includes 500 standard requests/day and 10 premium requests/day. No credit card required.