Anatomy of the
Google Places API

Data+

Lots of Places

Lots of Places

80+ MILLION

Lots of Places

80+ MILLION

Extended Details

Vision

First Principles

SPECIALISTS

do it better

BASE DATA

is not enough

FINDING

> searching

MERCHANTS

are a key part of the ecosystem

Building our Surf App

Key requirements

  • Find nearby surf spots
  • Surf report and forecast
  • Magic
  • Profit

Listing Nearby Surf Spots

maps.googleapis.com/maps/api/place/nearbysearch

  https://maps.googleapis.com/maps/api/place/nearbysearch/json
    ?location=-33.7546,151.2974
    &radius=2000
    &sensor=true
    &key=ABCDEF

Adding Surf Spots

Surf Breaks Data

  Dee Why Point, -33.75471, 151.29968
  Kid's Corner, -33.75407, 151.29805
  Club House, -33.75262, 151.29833
  The Beach, -33.75116, 151.29893
  The Pole, -33.74977, 151.30056
  No Man's Land, -33.74818, 151.30281
  Long Reef, -33.74643, 151.30541
  Long Reef Bombie, -33.74727, 151.30980

Adding Surf Spots

maps.googleapis.com/maps/api/place/add

  URL = 'https://maps.googleapis.com/maps/api/place/add/json?sensor=false&key=ABCDEF'
  with open("surfspots.csv") as csv_file:
  for (name, lat, lng) in csv.reader(csv_file, delimiter=','):
    data = '''{
      location: { lat: %s, lng: %s },
      name: "%s",
      types: ["other"],
    }''' % (lat, lng, name)
    request = urllib2.Request(URL, data, {'Content-Type': 'application/json'})
    f = urllib2.urlopen(request)
    response = f.read()

Listing Nearby Surf Spots

maps.googleapis.com/maps/api/place/nearbysearch

  https://maps.googleapis.com/maps/api/place/nearbysearch/json
    ?location=-33.7546,151.2974
    &radius=2000
    &types=other
    &sensor=true
    &key=ABCDEF

Conditions

Surf Conditions

maps.googleapis.com/maps/api/place/event/add

  https://maps.googleapis.com/maps/api/place/event/add/json
    ?sensor=true
    &key=ABCDEF
  {
    reference=a3T3vbnflkjsdf89asdfASDF234AS...
    summary: "3.5|3.5|3.6|3.7|3.8|4.0|4.0",
    duration: 21600
  }

Surf Conditions

Events on Search Response

  {
    status: "OK",
    results: [{
       name: "Dee Why Point",
       events: [{
         summary: "3.5|3.5|3.6|3.7|3.8|4.0|4.0",
       ...
       name: "Kid's Corner",       
       events: [{
          summary: "2.5|2.5|2.6|2.6|2.7|2.7|2.7",
       ...

Magic

Incorporate Commerce

Finding the Closest Surf Shop

&keyword= &rankby=

  https://maps.googleapis.com/maps/api/place/nearbysearch
    ?location=-33.7546,151.2974
    &keyword=surf+shop
    &rankby=distance
    &sensor=true
    &key=ABCDEF

Finding the Best Surf School

Reviews on Details Response

  https://maps.googleapis.com/maps/api/place/details/json
    ?reference=CnRvAAAAuHjisXbvgitJ0vdNK3aczyL...
    &sensor=true
    &key=ABCDEF
  {
    "result" : [{
      "name" : "Manly Surf Lessons",
      "reviews" : [{
        "text" : "The best surf school in NSW.",
        "aspects" : [{ "type": "overall", "rating": 3 }],
      },
  ...

<Thank You!>

More information:

goo.gl/bUUn2