Maps

Places from Google Maps for a search in a location: name, category, address, phone, website, rating, review count, opening hours and coordinates.

Try it in the dashboard 10 free credits when you sign up, no card.

GET/v1/google/maps

Costs 1 credit per request. Only requests that return data are charged.

Parameters

NameTypeDescription
qrequired string What to look for, such as coffee, dentist or hotel.
locationrequired string Where to look: a city, area or address, such as Austin, TX, USA.
limitoptional integer How many places to return. Default: 20. From 1 to 20.

Example request

curl "https://pipefetch.com/v1/google/maps?q=coffee&location=Austin%2C+TX%2C+USA" \
  -H "x-api-key: YOUR_API_KEY"

Example response

A real answer to the request above. Long texts and lists are shortened here, and the people who wrote comments, reviews or posts are replaced by a stand-in.

200 OK · application/json
{
  "data": {
    "query": "coffee",
    "location": "Austin, Travis County, Texas, United States",
    "places": [
      {
        "rank": 1,
        "name": "Flora Coffee & Culture",
        "category": "Coffee shop",
        "categories": [
          "Coffee shop"
        ],
        "address": "3300 W Anderson Ln. Ste 300, Austin, TX 78757",
        "street": "3300 W Anderson Ln. Ste 300",
        "city": "Austin",
        "postalCode": "78757",
        "state": "Texas",
        "countryCode": "US",
        "phone": null,
        "website": "http://floracoffee.co/",
        "rating": 4.9,
        "reviews": 422,
        "location": {
          "lat": 30.362347,
          "lng": -97.7421123
        },
        "openingHours": [
          {
            "day": "Monday",
            "hours": "7 AM–3 PM"
          },
          {
            "day": "Tuesday",
            "hours": "7 AM–3 PM"
          }
        ],
        "permanentlyClosed": false,
        "temporarilyClosed": false,
        "imageUrl": "https://lh3.googleusercontent.com/grass-cs/AABkmLcDV93hvD03BGfMiWJ-N9_KnnbCiMJWiPYWr1S-wZojbOt_MxO4AkrGimEqNZ2N34yk8-2qa6WvTZaLzd2iLw_828TOzFB7jP5nGOK…",
        "placeId": "ChIJK_G24QHrRIYRFsqJnuQaKv0",
        "url": "https://www.google.com/maps/search/?api=1&query=Flora%20Coffee%20%26%20Culture&query_place_id=ChIJK_G24QHrRIYRFsqJnuQaKv0"
      },
      {
        "rank": 2,
        "name": "Terrible Love Coffee",
        "category": "Coffee shop",
        "categories": [
          "Coffee shop",
          "Coffee stand"
        ],
        "address": "3908 Avenue B, Austin, TX 78751",
        "street": "3908 Avenue B",
        "city": "Austin",
        "postalCode": "78751",
        "state": "Texas",
        "countryCode": "US",
        "phone": null,
        "website": "http://terriblelovecoffee.com/",
        "rating": 4.9,
        "reviews": 437,
        "location": {
          "lat": 30.3045132,
          "lng": -97.735632
        },
        "openingHours": [
          {
            "day": "Monday",
            "hours": "7:30 AM–2 PM"
          },
          {
            "day": "Tuesday",
            "hours": "7:30 AM–2 PM"
          }
        ],
        "permanentlyClosed": false,
        "temporarilyClosed": false,
        "imageUrl": "https://lh3.googleusercontent.com/grass-cs/AABkmLfMwI1tnhcqUaUZTmOaJ-5ndLyXvmgt-CEdccvABVBSEHXZVMW_ZTO35RzKdV4rhvii9cnLzUpAwC-mANHhMfUn9nMidjxPyaGe9DK…",
        "placeId": "ChIJP8p2kJC1RIYR2qrGoXZtZCk",
        "url": "https://www.google.com/maps/search/?api=1&query=Terrible%20Love%20Coffee&query_place_id=ChIJP8p2kJC1RIYR2qrGoXZtZCk"
      }
    ]
  },
  "credits": {
    "used": 1,
    "remaining": 99
  }
}

Good to know

  • Places come in Google Maps' order for the search, inside the location's area.
  • A location Google Maps does not know answers 404 location_not_found, and a search with no places 404 no_places; neither costs anything.

Errors

Every error has the same shape, and none of them is charged. The full list is in the error reference.

Looking for an overview and use cases? See the Google Maps API page.