> ## Content Index
> Fetch the complete content index at: https://serpapi.com/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Scrape Google Local Services Results
- URL: https://serpapi.com/blog/how-to-scrape-google-local-services-results/
- Published: 2024-11-15T04:03:48.000Z
- Updated: 2026-03-30T23:44:23.000Z
- Author: Andy L
- Tags: webscraping, google local services

If you search on Google with "Plumber near me" or "electricians in New York", you will receive a list of all local services ads near you. Imagine that we can scrape all local services, including their business details like names, ratings, reviews,... Even years in business and booking nearby.

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/11/Screenshot-2024-11-12-at-22.34.38.png)

You can research competitor offerings, ratings, and pricing to understand the local market. If you are a marketing agency or provider, you can easily obtain thousands of business information and build lead lists of contact details. Google Local Services data is definitely a valuable source for you to grow your business.

Scraping data from Google is not always an easy task, but if you use our Google Local Services API, you will save a lot of time focusing on your business. Our Google Local Services API is well maintained and allows you to scrape all Google Local services within the US.

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/11/Screenshot-2024-11-12-at-22.36.46.png)

### **Setting Up a SerpApi Account**

[SerpApi](https://serpapi.com/) offers a free plan for newly created accounts. Head to the[ sign-up](https://serpapi.com/users/sign%5Fup?plan=free) page to register an account and complete your first search with our[ interactive playground](https://serpapi.com/playground?engine=google%5Flocal%5Fservices). When you want to do more searches with us, please visit the[ pricing page](https://serpapi.com/pricing).

Once you are familiar with all the results, you can utilize SERP APIs using your[ API Key](https://serpapi.com/manage-api-key).

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/11/Screenshot-2024-11-12-at-22.37.56.png)

### Scrape your first Google Local Services result with SerpApi

Head to the Google Local Services API from the [documentation](https://serpapi.com/google-local-services-api) on [SerpApi](https://serpapi.com/) for details.

Let's find all "electrical" local services . The data contains: "title", "rating", "reviews", "badge", "link", "service\_area", "years\_in\_business", "thumbnail", and more. You can also scrape more information with [SerpApi](https://serpapi.com/).

First, you need to install the [SerpApi client library](https://github.com/serpapi/google-search-results-python?ref=serpapi.com).

```python
pip install google-search-results
```

Set up the[ SerpApi](https://serpapi.com/?ref=serpapi.com)[ credentials](https://serpapi.com/manage-api-key?ref=serpapi.com) and search.

```python
from serpapi import GoogleSearch
import os, json, csv

params = {
    'api_key': 'YOUR_API_KEY',             # your serpapi api
    'engine': 'google_local_services',     # SerpApi search engine
    'data_cid': '6745062158417646970',
    'q': 'Electrican'
}

```

To retrieve Google Local Services Results for a query, you can use the following code:

```python
results = GoogleSearch(params).get_dict()['local_ads']

```

You can store Google Local Services Results JSON data in databases or export them to a CSV file.

```python
import csv

header = ["title", "rating", "reviews", "badge", "link", "service_area", "years_in_business", "thumbnail"]

with open("google_local_services_results.csv", "w", encoding="UTF8", newline="") as f:
    writer = csv.writer(f)
    writer.writerow(header)
    for item in results:
        writer.writerow([item.get('title'), item.get('rating'), item.get('reviews'), item.get('badge'), item.get('link'), item.get('service_area'), item.get('years_in_business'), item.get('thumbnail')])

```

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/11/Screenshot-2024-11-12-at-22.50.43.png)

This example uses Python, but you can also use all your favorite programming languages like Ruby, NodeJS, Java, PHP, and more.

If you have any questions, please feel free to [contact me](mailto:andy@serpapi.com).