Copied to clipboard!

Google Maps Local Results API

The Google Maps Local Results API allows a user to scrape the results of a Google Maps Search. SerpApi is able to make sense of this information and extract ads and local_results blocks. Each of this result blocks can contain title, reviews, rating, price, type, address, phone, description, hours, thumbnail, gps_coordinates, data_id, links and more. At the moment, SerpApi is able to extract only the first 20 local results.



To scrape Google Maps Local results with SerpApi, create a search with these parameters:

type

Required

Parameter must be set to search. (I.e., type=search)

q

Required

You can use anything that you would use in a regular Google Maps search



Maps local results examples

Local results overview

This kind of results represent regular Google Maps search results. You can search for local businesses, stores or retail chains (e.g. "Starbucks", "Target", "Best Buy", etc.), products (e.g. "Beer", "Sushi", "Burgers", etc.) or places that fall under certain categories (e.g. "Hotels", "Cheap eateries", "Chinese", etc.).

GET https://serpapi.com/search?engine=google_maps&q=coffee&ll=%254040.7455096%252C-74.0083012%252C15.1z&type=search Playground
{
  ...
  "local_results": [
    {
      "position": 1,
      "title": "Culture Espresso",
      "data_id": "0x89c259ac51b13c75:0xc0bb81598f8d0c34",
      "gps_coordinates": {
        "latitude": 40.753257999999995,
        "longitude": -73.991267
      },
      "place_id_search": "https://serpapi.com/search.json?data=%214m5%213m4%211s0x89c259ac51b13c75%3A0xc0bb81598f8d0c34%218m2%213d40.753257999999995%214d-73.991267&engine=google_maps&token=e5ef42ff45d54002&type=place",
      "rating": 4.5,
      "reviews": 281,
      "price": "$",
      "type": "Coffee shop",
      "address": "247 W 36th St, New York, NY 10018",
      "hours": "Open until 7:00 PM",
      "phone": "(646) 861-3553",
      "website": "https://www.cultureespresso.com/",
      "description": "Hip locale for espresso & cookies. Bright, vintage-chic coffee shop pairing pastries & house-baked cookies with espresso & iced drinks.",
      "editorial_reviews": {
        "summary": "15 Classy & Instagrammable Coffee Shops in New York City",
        "link": "https://www.flyingcarpetgo.com/classy-coffee-shops-in-new-york-city/"
      },
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipMiHkqjloqeaE7CuErBhbm6_EAAp0Hk-ybDBlM8=w80-h106-k-no"
    },
    {
      "position": 2,
      "title": "Birch Coffee",
      "data_id": "0x89c259bde5571fdb:0x2aa3b26b649b00c6",
      "gps_coordinates": {
        "latitude": 40.7383928,
        "longitude": -74.0000558
      },
      "place_id_search": "https://serpapi.com/search.json?data=%214m5%213m4%211s0x89c259bde5571fdb%3A0x2aa3b26b649b00c6%218m2%213d40.7383928%214d-74.0000558&engine=google_maps&token=ac03b83c66460da6&type=place",
      "rating": 4.4,
      "reviews": 252,
      "price": "$$",
      "type": "Coffee shop",
      "address": "56 7th Ave, New York, NY 10011",
      "hours": "Open until 8:00 PM",
      "phone": "(212) 686-1444",
      "website": "https://www.birchcoffee.com/",
      "description": "Hip spot offering house-roasted brews. Local coffeehouse chain serving thoughtfully-sourced, house-roasted brews in a hip, bustling space.",
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipMAVvt5SXDe9yf8IRmlwr_wikZ0ur1un6twAnbx=w80-h142-k-no"
    },
    {
      "position": 3,
      "title": "Stumptown Coffee Roasters",
      "data_id": "0x89c259a61c75684f:0x79d31adb123348d2",
      "gps_coordinates": {
        "latitude": 40.7457413,
        "longitude": -73.98820049999999
      },
      "place_id_search": "https://serpapi.com/search.json?data=%214m5%213m4%211s0x89c259a61c75684f%3A0x79d31adb123348d2%218m2%213d40.7457413%214d-73.98820049999999&engine=google_maps&token=4b15b3419f3bb75e&type=place",
      "rating": 4.5,
      "reviews": 1071,
      "price": "$$",
      "type": "Coffee shop",
      "address": "18 W 29th St, New York, NY 10001",
      "hours": "Open until 8:00 PM",
      "phone": "(855) 711-3385",
      "website": "https://www.stumptowncoffee.com/locations/newyork/ace-nyc",
      "description": "Coffee bar serving direct-trade java. Coffee bar chain offering house-roasted direct-trade coffee, along with brewing gear & whole beans",
      "editorial_reviews": {
        "summary": "Coffee Shops & Cafes in NYC",
        "link": "https://funfunnewyork.com/coffee-shops/"
      },
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipNmQMKAp5BtR3HzFx6d_carO4s0CGCprgOm8O5k=w92-h92-k-no"
    },
    {
      "position": 4,
      "title": "Think Coffee",
      "data_id": "0x89c259900d24e84b:0xd186a287933b4e4d",
      "gps_coordinates": {
        "latitude": 40.7395095,
        "longitude": -74.0030029
      },
      "place_id_search": "https://serpapi.com/search.json?data=%214m5%213m4%211s0x89c259900d24e84b%3A0xd186a287933b4e4d%218m2%213d40.7395095%214d-74.0030029&engine=google_maps&token=5471691ff763545a&type=place",
      "rating": 4.2,
      "reviews": 677,
      "price": "$",
      "type": "Coffee shop",
      "address": "73 8th Ave, New York, NY 10014",
      "hours": "Open until 10:00 PM",
      "website": "https://www.thinkcoffee.com/",
      "description": "Popular Fair Trade coffeehouse. Fair Trade organic coffee, sandwiches & baked goods served in a laid-back East Village setting.",
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipNTpcxfVOsGIF-KG198KYBE1_ffB-KwBxK2R1qo=w80-h106-k-no"
    },
  ...
}

Ads results

SerpApi is also able to grab and extract ads (advertisement) results.

Example with "Hotel" results

From this type of results, SerpApi is able to grab and extract, among other data, a price and amenities. You can also set custom filters to check hotel availability. You can do this by passing a value to the data parameter in the next format:

Date - !4m6!2m5!5m3!5m1!1s + date (e.g. data=!4m6!2m5!5m3!5m1!1s2019-11-27)
Price - !4m4!2m3!5m1!9i + price + !6e3 (e.g. data=!4m4!2m3!5m1!9i50000!6e3)
Date + Price - !4m6!2m5!5m3!5m1!1s + date + !9i + price + !6e3 (e.g. data=!4m6!2m5!5m3!5m1!1s2019-11-27!9i50000!6e3)

* If you are interested in passing other filters, you can visit the Google Maps website, set filters you want and simply copy data value from their URL to SerpApi URL.

GET https://serpapi.com/search?engine=google_maps&q=hotel&ll=%4040.7455096%2C-74.0083012%2C15z&type=search Playground
{
  ...
  "local_results": [
    {
      "position": 1,
      "title": "Hotel Pennsylvania",
      "data_id": "0x89c259aef28db459:0xc8cb71ead274b3a4",
      "gps_coordinates": {
        "latitude": 40.7499775,
        "longitude": -73.9910082
      },
      "place_id_search": "https://serpapi.com/search.json?data=%214m5%213m4%211s0x89c259aef28db459%3A0xc8cb71ead274b3a4%218m2%213d40.7499775%214d-73.9910082&engine=google_maps&token=881595c88aac275c&type=place",
      "rating": 2.7,
      "reviews": 15786,
      "price": "$94",
      "type": "Hotel",
      "address": "401 7th Ave, New York, NY 10001",
      "phone": "(212) 736-5000",
      "website": "https://www.hotelpenn.com/",
      "description": "Casual lodging with dining & event space. Low-key rooms & suites in a 1919 hotel featuring meeting space, dining & fitness center access.",
      "amenities": [
        "Free Wi-Fi",
        "Free breakfast"
      ],
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipMZjZD5ACp1e2azYFzyWJAL7skgaK5yU42EF52M=w80-h118-k-no"
    },
    {
      "position": 2,
      "title": "The Standard, High Line",
      "data_id": "0x89c259c06677ef37:0x505cfe96ba9da92a",
      "gps_coordinates": {
        "latitude": 40.7409232,
        "longitude": -74.008111
      },
      "place_id_search": "https://serpapi.com/search.json?data=%214m5%213m4%211s0x89c259c06677ef37%3A0x505cfe96ba9da92a%218m2%213d40.7409232%214d-74.008111&engine=google_maps&token=b4ed34648763cfd9&type=place",
      "rating": 4.3,
      "reviews": 3320,
      "price": "$246",
      "type": "Hotel",
      "address": "848 Washington St, New York, NY 10014",
      "phone": "(212) 645-4646",
      "website": "https://www.standardhotels.com/new-york/properties/high-line?utm_source=google&utm_campaign=google_my_business&utm_medium=organic",
      "description": "Hip lodging with dining & 2 rooftop bars. Funky hotel offering sleek quarters with scenic views, plus eclectic dining & 2 rooftop bars.",
      "amenities": [
        "Free Wi-Fi"
      ],
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipP2IQox3PkMPhDX_P3GWFVuenRfbVEt8SJarwnb=w180-h92-k-no"
    },
    {
      "position": 3,
      "title": "The Jane Hotel",
      "data_id": "0x89c259955a4f5839:0x31c1bad4b65ed0c5",
      "gps_coordinates": {
        "latitude": 40.7382967,
        "longitude": -74.00941279999999
      },
      "place_id_search": "https://serpapi.com/search.json?data=%214m5%213m4%211s0x89c259955a4f5839%3A0x31c1bad4b65ed0c5%218m2%213d40.7382967%214d-74.00941279999999&engine=google_maps&token=5595c681cd59f869&type=place",
      "rating": 3.9,
      "reviews": 1446,
      "price": "$99",
      "type": "Hotel",
      "address": "113 Jane St, New York, NY 10014",
      "phone": "(212) 924-6700",
      "website": "https://www.thejanenyc.com/",
      "description": "Chic, historic lodging with dining. Former sailors' residence with dining & an opulent lobby bar, plus cozy ship-inspired rooms.",
      "amenities": [
        "Free Wi-Fi"
      ],
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipM4Ox_dtq_4pJpReDvKzXw_fuiEVru1p4XoGlFW=w91-h92-k-no"
    },
  ...
}