Nodemill Addins


Install Fields, APIs and pages (coming soon) using the public repository.

Search:
Within:

Nodemill API: googleplaces

Nodemill Version Nodemill Downloads

Install

nodemill install api googleplaces

Details

  • Author: Mike Murray
  • Short desc: Google Places API implementation
  • Keywords: google, places

Node dependencies

  • async

Full Description

Uses the Google Places API Web Service to retrieve place information. Will either return a summary of places (name, location etc.) or return detailed information (includes details like address and opening hours)

Parameters:

  • location (required)
  • radius (if rankby=distance then don't include radius)
  • rankby (optional)
  • keyword (optional)
  • name (optional)
  • type (optional)
  • includedetails (optional, set to yes to include place details)

Further information available at text

Version history

  • 1.0.0 Created

Examples

URL

/api/googleplaces?location=56.116523,-3.936903&rankby=distance&type=cafe&name=cisco&includedetails=yes

Response

{
    headers: {
        code: 200
    },
    data: [
        {
            name: "Cisco's Cafe",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
            place_id: "ChIJGdFr9OpiiEgRy5RGs3GRQlA",
            lat: 56.1160115,
            lon: -3.9373924,
            address: "70 Port St, Stirling FK8 2LJ, UK",
            phone: "01786 445900",
            rating: 4.5,
            open_now: "yes",
            opening_hours: [
              "Monday: 7:00 AM – 4:00 PM",
              "Tuesday: 7:00 AM – 4:00 PM",
              "Wednesday: 7:00 AM – 4:00 PM",
              "Thursday: 7:00 AM – 4:00 PM",
              "Friday: 7:00 AM – 4:00 PM",
              "Saturday: 7:00 AM – 4:00 PM",
              "Sunday: Closed"
            ]
        }
    ],
    md5: "8ca9d7"
}

URL

/api/googleplaces?location=56.116523,-3.936903&rankby=distance&type=cafe&name=urban

Response

{
    headers: {
        code: 200
    },
    data: [
        {
            name: "Urban Bubble",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
            place_id: "ChIJibSVRZViiEgR3UdBMq_s5ns",
            lat: 56.1193829,
            lon: -3.9368961
        },
        {
            name: "Urban Brew",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
            place_id: "ChIJh9p8R9FFiEgRnRKRXldZC7M",
            lat: 55.8676749,
            lon: -4.2914531
        },
        {
            name: "Urban Angel",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
            place_id: "ChIJJ4L6a5HHh0gR8Xol8mLgnVc",
            lat: 55.9547822,
            lon: -3.197680700000001
        }
    ],
    md5: "1b29b2"
}

URL

/api/googleplaces?location=56.116523,-3.936903&radius=10000

Response:

{
    headers: {
        code: 200
    },
    data: [
        {
            name: "Stirling",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
            place_id: "ChIJMXhDPNdXiEgRrXbVAjcf8Ps",
            lat: 56.1165227,
            lon: -3.9369029
        },
        {
            name: "The Golden Lion Hotel",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJi_i8t-piiEgRPJIOIJz8Prs",
            lat: 56.1179752,
            lon: -3.9373196
        },
        {
            name: "Premier Inn Stirling South",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJbTyYnhhjiEgReoBagUl7SZM",
            lat: 56.0815801,
            lon: -3.9252534
        },
        {
            name: "Stirling Court Hotel",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJL5THIxuIiEgRzEUH6-i85wA",
            lat: 56.14331259999999,
            lon: -3.9226619
        },
        {
            name: "Cooks Of Stirling",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJyXrDzsFiiEgR_lUiYww83Fo",
            lat: 56.1151595,
            lon: -3.933815899999999
        },
        {
            name: "Stirling Youth Hostel - SYHA",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJzzMxY5NiiEgRQ96XaGH7BQk",
            lat: 56.11972219999999,
            lon: -3.943498
        },
        {
            name: "King Robert Hotel",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJv4GfER9jiEgRKY36X9TYR_E",
            lat: 56.0932385,
            lon: -3.9346212
        },
        {
            name: "Holiday Inn Express Stirling",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJifXG3cpiiEgRY7NpXdDfGhM",
            lat: 56.1171763,
            lon: -3.907331400000001
        },
        {
            name: "DoubleTree by Hilton Dunblane Hydro",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJA3blVvGIiEgRtvLvLdw5my0",
            lat: 56.19109700000001,
            lon: -3.954542000000001
        },
        {
            name: "Royal Ivy Hotel",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJHy2G3heIiEgRQ5NDxlTksWw",
            lat: 56.1537127,
            lon: -3.9416008
        },
        {
            name: "Broomhall Castle",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJRWNAWniHiEgRFRPfZLGhP7w",
            lat: 56.1535988,
            lon: -3.847728
        },
        {
            name: "Hotel Colessio Stirling",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJW1XHyJRiiEgR6kZ-nWNRPSE",
            lat: 56.1190358,
            lon: -3.9406259
        },
        {
            name: "Royal Hotel",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJHy2G3heIiEgRaHgrxKey5dA",
            lat: 56.1548883,
            lon: -3.946212399999999
        },
        {
            name: "University of Stirling",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/school-71.png",
            place_id: "ChIJ001rYO1iiEgRBT2mfmDCHNA",
            lat: 56.1459171,
            lon: -3.918878999999999
        },
        {
            name: "Powis House Bed and Breakfast",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJVaS5Y1d9iEgRjui_zWHABxk",
            lat: 56.138549,
            lon: -3.894245
        },
        {
            name: "Stirling Whisky Shop Within the Stirling Highland Hotel",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/shopping-71.png",
            place_id: "ChIJQRyw3JRiiEgRBQgDoTv-gVQ",
            lat: 56.119568,
            lon: -3.940280000000001
        },
        {
            name: "Premier Inn Stirling City Centre",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJf3LHmMBiiEgRm0bj0OzRv0s",
            lat: 56.11879930000001,
            lon: -3.930196900000001
        },
        {
            name: "Wellsfield Farm Holiday Lodges, Farm Park, Coffee Shop, Trout Fishery, Health Club,Equestrian Centre",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJlwBn9tlkiEgRpAB-GELdloE",
            lat: 56.04417319999999,
            lon: -3.914838799999999
        },
        {
            name: "Old Churches House",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
            place_id: "ChIJPfQphfmIiEgR2P6s9CsGZlc",
            lat: 56.1893613,
            lon: -3.9636933
        },
        {
            name: "Alloa",
            icon: "https://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
            place_id: "ChIJOUrlZWLVh0gRP0owr5GMo7U",
            lat: 56.11407299999999,
            lon: -3.791895999999999
        }
    ],
    md5: "455816"
}