> ## 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 Pack Results
- URL: https://serpapi.com/blog/how-to-scrape-google-local-pack-results/
- Published: 2024-08-13T08:47:29.000Z
- Updated: 2024-08-15T18:02:11.000Z
- Author: Andy L
- Tags: Google, Scrape, google local pack, Python

Google is the most popular search engine. Any local business are featured in the Local Pack can lead to increased visibility and more customers.  
Local Pack is a powerful result for both users and local businesses. Scraping Google Local Pack results is helpful for any business to understand its competitors and its position in the market.

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

When you do a search, Google Local Pack results will be displayed on top of the search results. They will show the top 3 local businesses relevant to the search query. The Local Pack results will show the business name, address, phone number, hours of operation, and often user reviews.

You can scrape Google Local Pack results to improve local SEO, understand your competitors, manage reputation, do market research or generate leads. This is a great way to get the most relevant local businesses in your area.

  
Scraping Google results is always challenging because Google has many anti-scraping mechanisms, it's even more challenging when scraping Google Local Pack results because the data is generated dynamically and it's not easy to scrape.

  
With [SerpApi](https://serpapi.com/), we carefully handle all the hard work for you. We provide high-quality Google Local Pack APIs(scrapers) that are easy to use. Let's see how it works.

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-13-at-15.37.20.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). 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/08/Screenshot-2024-08-13-at-15.37.59.png)

### Scrape your first Google Local Pack results with SerpApi

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

Let's find the top pizza stores in Austin. The data contains: "position", "title", "rating", "reviews", "description", "thumbnail", "address", "hours" 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',                    # SerpApi search engine
    'q': 'pizza',
    'location': 'Austin, Texas, United States'
}

```

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

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

```

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

```python
import csv

header = ["position", "title", "rating", "reviews", "description", "thumbnail", "address", "hours"]

with open("google_local_pack.csv", "w", encoding="UTF8", newline="") as f:
    writer = csv.writer(f)
    writer.writerow(header)
    for item in results:
        writer.writerow([item.get('position'), item.get('title'), item.get('rating'), item.get('reviews'), item.get('description'), item.get('thumbnail'), item.get('address'), item.get('hours')])
```

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-12-at-17.09.52.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).