Repository navigation
Google Map APIs
Sean Zhou edited this page Sep 24, 2024
·
2 revisions
https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=<Replace-With-API-Key>&location=-37.79692,144.9615867&radius=1000&type=restaurant
Where output may be either of the following values:
-
json(recommended) indicates output in JavaScript Object Notation (JSON) -
xmlindicates output as XML
Required:
-
location: This must be specified aslatitude,longitude(e.g.-37.3456,123.2356). radius-
key: Google Map API Key
Optional:
keywordmaxpriceminpricetype
https://maps.googleapis.com/maps/api/distancematrix/json?key=<Replace-With-API-Key>&origins=-37.7976,144.9699&destinations=-37.7989,144.9685|-37.8002,144.9667
Required:
destinationsorigins
both destinations and origins could use lantitude and langitude tuple(s), multiple origins and destinations acceptable.
Optional:
arrival_timedeparture_time-
mode:driving(default)|walking|bicycling|transit
https://maps.googleapis.com/maps/api/place/photo?key=<Replace-With-API-Key>&maxwidth=400&photo_reference=<Replace-With-Photo-Reference>
Required:
-
photo_reference: You can get this from Places API -
maxheightormaxwidth: (unit: px)
NOTE: All these APIs must be used with an API Key!