Google Local API

Our Google Local API allows you to scrape results from the Google Local page. The API is accessed through the following endpoint: /search?engine=google_local.

A user may query the following: https://serpapi.com/search?engine=google_local utilizing a GET request. Head to the playground for a live and interactive demo.

API Parameters

Search Query

q

Required

Parameter defines the query you want to search. You can use anything that you would use in a regular Google Local search.

Geographic Location

location

Optional

Parameter defines from where you want the search to originate. If several locations match the location requested, we'll pick the most popular one. Head to the /locations.json API if you need more precise control. The location and uule parameters can't be used together. It is recommended to specify location at the city level in order to simulate a real user’s search. If location is omitted, the search may take on the location of the proxy.

uule

Optional

Parameter is the Google encoded location you want to use for the search.

uule and location parameters can't be used together.

Localization

google_domain

Optional

Parameter defines the Google domain to use. It defaults to google.com. Head to the Google domains for a full list of supported Google domains.

gl

Optional

Parameter defines the country to use for the Google Local search. It's a two-letter country code. (e.g., us for the United States, uk for United Kingdom, or fr for France) Head to the Google countries for a full list of supported Google countries.

hl

Optional

Parameter defines the language to use for the Google Local search. It's a two-letter language code. (e.g., en for English, es for Spanish, or fr for French) Head to the Google languages for a full list of supported Google languages.

Advanced Google Local Parameters

ludocid

Optional

Parameter defines the id (CID) of the Google My Business listing you want to scrape. Also known as Google Place ID. To aquire the ludocid you can either use Google's CID converter, or data_cid from SerpApi's Google Maps API. Example CID for "New York, NY, USA": 14414772292044717666.

Advanced Filters

tbs

Optional

(to be searched) parameter defines advanced search parameters that aren't possible in the regular query field.

Pagination

start

Optional

Parameter defines the result offset. It skips the given number of results. It's used for pagination. On desktop, parameter only accepts multiples of 20 (e.g. 20 for the second page results, 40 for the third page results, etc.). On mobile, parameter only accepts multiples of 10 (e.g. 10 for the second page results, 20 for the third page results, etc.).

Serpapi Parameters

engine

Required

Set parameter to google_local to use the Google Local API engine.

device

Optional

Parameter defines the device to use to get the results. It can be set to desktop (default) to use a regular browser, tablet to use a tablet browser (currently using iPads), or mobile to use a mobile browser.

no_cache

Optional

Parameter will force SerpApi to fetch the Google Local results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

async

Optional

Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.

zero_trace

Optional

Enterprise only. Parameter enables ZeroTrace mode. It can be set to false (default) or true. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.

api_key

Required

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved.

API Results

JSON Results

JSON output includes structured data for "Ads Results", "Local Results", and "Discover More Places".

A search status is accessible through search_metadata.status. It flows this way: Processing -> Success || Error. If a search has failed, error will contain an error message. search_metadata.id is the search ID inside SerpApi.

HTML Results

HTML output is useful to debug JSON results or support features not supported yet by SerpApi. HTML output gives you the raw HTML results from Google.

API Examples

JSON structure overview

{
  "ads_results": [
    {
      "position": "Integer - Place position",
      "ad_title": "String - Ad title",
      "displayed_link": "String - Displayed link of the ad",
      "title": "String - Place title",
      "rating": "Float - Place rating",
      "reviews_original": "String - Place review count",
      "reviews": "Integer - Place review count",
      "price": "String - Place price point",
      "type": "String - Place type",
      "address": "String - Place address",
      "hours": "String - Place working hours",
      "description": "String - Description or short review of a place",
      "place_id": "String - Google CID (customer identifier) of a place",
      "place_id_search": "String - URL to the SerpApi search",
      "lsig": "String - Aditional ID of a place",
      "thumbnail": "String - URL to the image thumbnail",
      "gps_coordinates": {
        "latitude": "Numeric - Place latitude",
        "longitude": "Numeric - Place longitude"
      }
    },
    ...
  ],
  "local_map": {
    "image": "String - URL to the image"
  },
  "local_results": [
    {
      "position": "Integer - Place position",
      "title": "String - Place title",
      "rating": "Float - Place rating",
      "reviews_original": "String - Place review count",
      "reviews": "Integer - Place review count",
      "price": "String - Place price point",
      "type": "String - Place type",
      "address": "String - Place address",
      "hours": "String - Place working hours",
      "description": "String - Description or short review of a place",
      "place_id": "String - Google CID (customer identifier) of a place",
      "place_id_search": "String - URL to the SerpApi search",
      "provider_id": "String - Provider ID of the place",
      "lsig": "String - Aditional ID of a place",
      "thumbnail": "String - URL to the image thumbnail",
      "extensions": "Array - Additional information to the place",
      "gps_coordinates": {
        "latitude": "Numeric - Place latitude",
        "longitude": "Numeric - Place longitude"
      },
      "links": "Hash - Action URL, e.g. directions, website, order, phone, schedule",
      "service_options": {
        "dine_in": "Boolean - Determine whether the place allow dine-in",
        "takeout": "Boolean - Determine whether the place allow takeout"
      }
    },
    ...
  ],
  "discover_more_places": [
    {
      "title": "String - Search query",
      "link": "String - URL to the Google Local search",
      "serpapi_link": "String - URL to the SerpApi search",
      "places": "String - List of places",
      "thumbnail": "String - URL to the image thumbnail",
      "images": [
        "String - URL to the image",
        ...
      ]
    },
    ...
  ]
}

Results for: Coffee

Results for: Coffee

JSON Example

{
  "search_metadata": {
    "id": "64258265de9834046d8db0c9",
    "status": "Success",
    "json_endpoint": "https://serpapi.com/searches/0ef12fb919bdd3a2/64258265de9834046d8db0c9.json",
    "created_at": "2023-03-30 12:36:53 UTC",
    "processed_at": "2023-03-30 12:36:53 UTC",
    "google_local_url": "https://www.google.com/search?q=Coffee&uule=w+CAIQICIfTmV3IFlvcmssTmV3IFlvcmssVW5pdGVkIFN0YXRlcw&hl=en&gl=us&tbm=lcl",
    "raw_html_file": "https://serpapi.com/searches/0ef12fb919bdd3a2/64258265de9834046d8db0c9.html",
    "total_time_taken": 2.05
  },
  "search_parameters": {
    "engine": "google_local",
    "q": "Coffee",
    "location_requested": "New York, New York, United States",
    "location_used": "New York,New York,United States",
    "google_domain": "google.com",
    "hl": "en",
    "gl": "us",
    "device": "desktop"
  },
  "ads_results": [
    {
      "position": 1,
      "ad_title": "Freshly brewed, day and night",
      "displayed_link": "wawa.com",
      "title": "Wawa",
      "type": "Convenience store",
      "reviews_original": "70 reviews",
      "reviews": 70,
      "address": "7408 Tonnelle Ave",
      "hours": "Open 24 hours",
      "place_id": "14482539134301609407",
      "place_id_search": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&location=New+York%2C+New+York%2C+United+States&ludocid=14482539134301609407&q=Coffee",
      "lsig": "AB86z5V4kwQMc-lmfzU5p6Ziwp9r",
      "thumbnail": "<URL to image>",
      "gps_coordinates": {
        "latitude": 40.803405,
        "longitude": -74.01922499999999
      },
      "service_options": {
        "in_store_shopping": true,
        "curbside_pickup": true,
        "no_contact_delivery": true
      }
    }
  ],
  "local_results": [
    {
      "position": 1,
      "title": "Variety Coffee Roasters",
      "rating": 4.3,
      "reviews_original": "(34)",
      "reviews": 34,
      "type": "Coffee shop",
      "address": "140 Nassau St",
      "place_id": "15667002398697190332",
      "place_id_search": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&location=New+York%2C+New+York%2C+United+States&ludocid=15667002398697190332&q=Coffee",
      "lsig": "AB86z5V4kwQMc-lmfzU5p6Ziwp9r",
      "thumbnail": "<URL to image>",
      "gps_coordinates": {
        "latitude": 40.803405,
        "longitude": -74.01922499999999
      },
      "service_options": {
        "dine_in": true,
        "takeout": true,
        "no_delivery": true
      }
    },
    {
      "position": 2,
      "title": "Blue Spoon Coffee Company",
      "rating": 4.2,
      "reviews_original": "(148)",
      "reviews": 148,
      "price": "$",
      "type": "Coffee shop",
      "address": "76 Chambers St · In the Tower 270",
      "description": "Independent coffee house & lunch spot",
      "place_id": "8277114589593241915",
      "place_id_search": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&location=New+York%2C+New+York%2C+United+States&ludocid=8277114589593241915&q=Coffee",
      "lsig": "AB86z5UfRvx7hmr9IFuaKflC4ocp",
      "thumbnail": "<URL to image>",
      "gps_coordinates": {
        "latitude": 40.711192499999996,
        "longitude": -74.00621629999999
      }
    },
    {
      "position": 3,
      "title": "Starbucks",
      "rating": 3.8,
      "reviews_original": "(1K)",
      "reviews": 1000,
      "price": "$$",
      "type": "Coffee shop",
      "address": "38 Park Row #4",
      "description": "Iconic Seattle-based coffeehouse chain",
      "place_id": "10988205551705517188",
      "place_id_search": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&location=New+York%2C+New+York%2C+United+States&ludocid=10988205551705517188&q=Coffee",
      "lsig": "AB86z5U-iKsA7791MmGe231M2hjr",
      "thumbnail": "<URL to image>",
      "gps_coordinates": {
        "latitude": 40.714297699999996,
        "longitude": -74.0069062
      }
    },
    ...
  ],
  "discover_more_places": [
    {
      "title": "Best coffee",
      "link": "https://www.google.com/search?hl=en&gl=us&tbm=lcl&q=best+coffee&rflfq=1&num=10&uule=w+CAQQCFISCTsIP9OlT8KJEWL-d-EGjwvI&lsspp=CVvVuHXCMjAn&rlt=Best+coffee&owsq=Coffee&sa=X&ved=2ahUKEwjXkYPJ1YP-AhUUFVkFHW3lA4kQ9s8CegQIGRAE",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&q=Best%20coffee&uule=w%20CAQQCFISCTsIP9OlT8KJEWL-d-EGjwvI",
      "thumbnail": "<URL to image>"
    },
    {
      "title": "Coffee shops",
      "link": "https://www.google.com/search?hl=en&gl=us&tbm=lcl&q=Coffee+shops&rflfq=1&num=10&uule=w+CAQQCFISCTsIP9OlT8KJEWL-d-EGjwvI&lsspp=CctiRTWXHPG2&rlt=Coffee+shops&owsq=Coffee&sa=X&ved=2ahUKEwjXkYPJ1YP-AhUUFVkFHW3lA4kQ9s8CegQIGRAG",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&q=Coffee%20shops&uule=w%20CAQQCFISCTsIP9OlT8KJEWL-d-EGjwvI",
      "thumbnail": "<URL to image>"
    }
  ],
  "pagination": {
    "current": 1,
    "next": "https://www.google.com/search?q=Coffee&hl=en&gl=us&start=20&tbm=lcl",
    "other_pages": {
      "2": "https://www.google.com/search?q=Coffee&hl=en&gl=us&start=20&tbm=lcl",
      "3": "https://www.google.com/search?q=Coffee&hl=en&gl=us&start=40&tbm=lcl",
      "4": "https://www.google.com/search?q=Coffee&hl=en&gl=us&start=60&tbm=lcl",
      "5": "https://www.google.com/search?q=Coffee&hl=en&gl=us&start=80&tbm=lcl"
    }
  },
  "serpapi_pagination": {
    "current": 1,
    "next_link": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&location=New+York%2C+New+York%2C+United+States&q=Coffee&start=20",
    "next": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&location=New+York%2C+New+York%2C+United+States&q=Coffee&start=20",
    "other_pages": {
      "2": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&location=New+York%2C+New+York%2C+United+States&q=Coffee&start=20",
      "3": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&location=New+York%2C+New+York%2C+United+States&q=Coffee&start=40",
      "4": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&location=New+York%2C+New+York%2C+United+States&q=Coffee&start=60",
      "5": "https://serpapi.com/search.json?device=desktop&engine=google_local&gl=us&google_domain=google.com&hl=en&location=New+York%2C+New+York%2C+United+States&q=Coffee&start=80"
    }
  }
}