Google Local Services API

Our Google Local Services API allows you to scrape local ads results from the Google Local Services search page. The API is accessed through the following endpoint: /search?engine=google_local_services. A user may query the following: https://serpapi.com/search?engine=google_local_services utilizing a GET request. Head to the playground for a live and interactive demo.

Search Query

q

Required

Parameter defines the service you want to search for.

Geographic Location

place_id

Required

Parameter defines the Google ID of a place. To aquire the ID you can eather use Google's place ID finder, or SerpApi's Google Maps API. Example ID for "New York, NY, USA": ChIJOwg_06VPwokRYv534QaPC8g.

Localization

hl

Optional

Parameter defines the language to use for the Google Local Services 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 Services Parameters

job_type

Optional

Parameter defines the type of a job, or a subcategory of a service you have searched for. For example, if you search for "Electrician", you can be more specific by adding a job_type (e.g. job_type=Restore power). You can find more options under: local_ads[index].services.

Serpapi Parameters

engine

Required

Set parameter to google_local_services to use the Google Local Services API engine.

no_cache

Optional

Parameter will force SerpApi to fetch the Google Local Services 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.

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 local ads.

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

This API does not have the HTML response, just a text. search_metadata.prettify_html_file contains prettified version of the result. It is displayed in the playground.

Example with q: Electrician, and New York, NY, USA (place_id: ChIJOwg_06VPwokRYv534QaPC8g) as a location

Example with q: Electrician, and New York, NY, USA (place_id: ChIJOwg_06VPwokRYv534QaPC8g) as a location

JSON Example

{
  "search_metadata": {
    "id": "61c5bb20de983400a60fb747",
    "status": "Success",
    "json_endpoint": "https://serpapi.com/searches/a30dd10e08e51aff/61c5bb20de983400a60fb747.json",
    "created_at": "2021-12-24 12:20:48 UTC",
    "processed_at": "2021-12-24 12:20:48 UTC",
    "google_local_services_url": "https://www.google.com/async/ghsdi?hl=en&async=job_type:,country_code:EN,place_id:ChIJOwg_06VPwokRYv534QaPC8g,query:Electrician,_fmt:pc",
    "raw_html_file": "https://serpapi.com/searches/a30dd10e08e51aff/61c5bb20de983400a60fb747.html",
    "prettify_html_file": "https://serpapi.com/searches/a30dd10e08e51aff/61c5bb20de983400a60fb747.prettify",
    "total_time_taken": 3.72
  },
  "search_parameters": {
    "engine": "google_local_services",
    "hl": "en",
    "place_id": "ChIJOwg_06VPwokRYv534QaPC8g",
    "q": "Electrician"
  },
  "local_ads": [
    {
      "title": "Duffy Electric",
      "link": "https://www.google.com/search?q=Electrician&cs=0&gsas=1&sabplaceid=ChIJOwg_06VPwokRYv534QaPC8g&sabpi=ChIIhMqtkgEQyv-prwkYzuf1sAkSLHhjYXQ6c2VydmljZV9hcmVhX2J1c2luZXNzX2VsZWN0cmljaWFuOmVuLVVTGmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQWxHZ0o1YlEmc2lnPUFPRDY0XzBwNmRDLVBaM2JQMlFaMzRDLXpXc05QMXlGbVEmYWR1cmw9ImcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQVZHZ0o1YlEmc2lnPUFPRDY0XzNzQU5sZUY0SFZmUFp0MGVyTzVIZVFmSTg5LVEmYWR1cmw9KmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQWRHZ0o1YlEmc2lnPUFPRDY0XzFaZjFISEtqUjRPWFF2d3VfX3VVbzljM3VFMHcmYWR1cmw9MmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQU9HZ0o1YlEmc2lnPUFPRDY0XzBUY1pkUTB1cWVvM2NxQ0FrVDI4d0F0NXhzc0EmYWR1cmw9OmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQXVHZ0o1YlEmc2lnPUFPRDY0XzFBVW0xemJmRzBXSjVDREdSQ1laaXZEdXlQNEEmYWR1cmw9QhMIxq_6lbb89AIV2cmUCR11DAPvSARQAQ",
      "rating": 4.5,
      "reviews": 241,
      "phone": "+13479542325",
      "badge": "GOOGLE GUARANTEED",
      "service_area": "East Meadow",
      "checks": [
        "This business has passed Google's electrician screening and qualification process.",
        "Passed background check for business and owner. Insured. "
      ],
      "covid_measures": [
        "Protective gear used",
        "Maintaining distance",
        "Video estimates",
        ...
      ],
      "description": [
        "Locally-owned & operated",
        "Family-owned & operated",
        "References available",
        ...
      ],
      "services": [
        "Install light fixtures",
        "Install outlets or switches",
        "Repair outlets or switches",
        ...
      ],
      "hours": {
        "currently": "Open now until 6 PM",
        "week": [
          {
            "monday": "7 AM — 6 PM"
          },
          {
            "tuesday": "7 AM — 6 PM"
          },
          {
            "wednesday": "7 AM — 6 PM"
          },
          ...
        ]
      },
      "thumbnail": "https://lh3.googleusercontent.com/6kw_pzLKHGguNJTbA8IzhAmu8YC9TdFnMCnYvTDk18M-YmJEkjPvSyF-IvIWzkQ=h240"
    },
    {
      "title": "Wis services Inc",
      "link": "https://www.google.com/search?q=Electrician&cs=0&gsas=1&sabplaceid=ChIJOwg_06VPwokRYv534QaPC8g&sabpi=ChIIudKrxAEQzomZtQkY_8evoCUSLHhjYXQ6c2VydmljZV9hcmVhX2J1c2luZXNzX2VsZWN0cmljaWFuOmVuLVVTGmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQWhHZ0o1YlEmc2lnPUFPRDY0XzJNUDgxYXA3TkgydTZFMGxhdnZGdTVvN3JacWcmYWR1cmw9ImcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQVNHZ0o1YlEmc2lnPUFPRDY0XzJTc2czWkRiTVc2Q3ozejM0ZHJDakt2bGoyekEmYWR1cmw9KmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQVpHZ0o1YlEmc2lnPUFPRDY0XzI2UjJ2ZTdsRTNQalpRNE01VXpBbHhxNFpDeVEmYWR1cmw9MmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQUxHZ0o1YlEmc2lnPUFPRDY0XzNid244RlFNUnY3MHNKUUhQb2IzRFF1U0ZLX0EmYWR1cmw9OmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQXFHZ0o1YlEmc2lnPUFPRDY0XzJ4ZVZpcTlxQUFpNEJKZ2dWR1hqaXNkdU1CSXcmYWR1cmw9QhMIxq_6lbb89AIV2cmUCR11DAPvSARQAg",
      "rating": 4.8,
      "reviews": 10,
      "phone": "+16469417139",
      "badge": "GOOGLE GUARANTEED",
      "service_area": "Brooklyn",
      "checks": [
        "This business has passed Google's electrician screening and qualification process.",
        "Passed background check for business and owner. Insured. "
      ],
      "description": [
        "Family-owned & operated",
        "References available"
      ],
      "services": [
        "Install light fixtures",
        "Repair light fixtures",
        "Install outlets or switches",
        ...
      ],
      "hours": {
        "currently": "Open now until 6 PM",
        "week": [
          {
            "monday": "9 AM — 5 PM"
          },
          {
            "tuesday": "6 AM — 6 PM"
          },
          {
            "wednesday": "6 AM — 6 PM"
          },
          ...
        ]
      }
    },
    {
      "title": "Monark Electric",
      "link": "https://www.google.com/search?q=Electrician&cs=0&gsas=1&sabplaceid=ChIJOwg_06VPwokRYv534QaPC8g&sabpi=ChIIsuCRtAEQv9uYswkYjcmptQkSLHhjYXQ6c2VydmljZV9hcmVhX2J1c2luZXNzX2VsZWN0cmljaWFuOmVuLVVTGmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQWZHZ0o1YlEmc2lnPUFPRDY0XzNNUHUwLWJiOXZTUjZweUhQV3Y3MWFjLTJNaHcmYWR1cmw9ImcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQVFHZ0o1YlEmc2lnPUFPRDY0XzJTdF9HLWRKTFE2QnFuc3p5NzFGbkdUcndLS2cmYWR1cmw9KmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQVhHZ0o1YlEmc2lnPUFPRDY0XzNubjNlV0tvZGVLdl80Y3JWTmpNa0RkTHlINlEmYWR1cmw9MmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQUpHZ0o1YlEmc2lnPUFPRDY0XzFNUG1WY2FubmlqSEhLVjhyVWVXWWdRZG9MSncmYWR1cmw9OmcvYWNsaz9zYT1MJmFpPURDaGNTRXdqR3JfcVZ0dnowQWhYWnlaUUpIWFVNQS04WUFCQW1HZ0o1YlEmc2lnPUFPRDY0XzBrOUlROHU2ZDJwZ0pZNnFacnBaenotcXhHdFEmYWR1cmw9QhMIxq_6lbb89AIV2cmUCR11DAPvSARQAw",
      "rating": 5,
      "reviews": 2,
      "phone": "+13479217865",
      "badge": "GOOGLE GUARANTEED",
      "service_area": "Ridgewood",
      "checks": [
        "This business has passed Google's electrician screening and qualification process.",
        "Passed background check for business and owner. Insured. "
      ],
      "covid_measures": [
        "Protective gear used",
        "Maintaining distance",
        "Accepting on-site jobs",
        ...
      ],
      "description": [
        "Locally-owned & operated",
        "24/7 emergency service",
        "Parts & labor guarantee",
        ...
      ],
      "services": [
        "Install light fixtures",
        "Repair light fixtures",
        "Install outlets or switches",
        ...
      ],
      "hours": {
        "currently": "Open 24/7",
        "week": [
          {
            "monday": "Open 24 hours"
          },
          {
            "tuesday": "Open 24 hours"
          },
          {
            "wednesday": "Open 24 hours"
          },
          ...
        ]
      }
    },
    ...
  ]
}