> ## 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 Patents Results
- URL: https://serpapi.com/blog/how-to-scrape-google-patents-results/
- Published: 2024-06-28T11:15:49.000Z
- Updated: 2024-07-02T15:49:46.000Z
- Author: Andy L
- Tags: webscraping, google patents

Google Patents Search is a search engine for searching patents powered by Google. You can search from titles, abstracts, descriptions, etc. Besides that, Google allows you to filter and search with multiple options.

![](https://lh7-us.googleusercontent.com/docsz/AD_4nXesq-q-7bHAHs40z7AxoQj41Drt-j5DDJO4rG2GpTK0rV1VUC9netffUItBDjjqc2hUfTpfLFB1grWaGywnsCNmk6OMmbrQ9LQiu6mwB5yY-YHZVovjnin9biMLMHks69Dy4dkUpyV5FO6CyVmbHCbsADwD?key=Dzo5_ZjKQy1n3jLPGhV-iw)

Google Patents search results is valuable resource. You can track innovations with Google patents to identify potential areas of innovation. You can also do competitive analytics, analyze patent portfolios of competitors, or research about legal and licensing research.

Scraping Google Patents requires a lot of time and effort. At [SerpApi](https://serpapi.com/), we already provide a high-quality Google Patents API for you. Let's see how it works.

### **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%5Fpatents). 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/06/Screenshot-2024-06-28-at-17.57.43.png)

### Scrape your first Google Patents results with SerpApi

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

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

Let's find the recent patents related to "electronic device" - which is the world changing device when Apple introduce to the world. The data contains: "patent\_id", "title", "snippet", "grant\_date", "inventor", "assignee", "publication\_number", "pdf" 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_patents',            # SerpApi search engine
    'q': '(Electronic device)'
}

```

To retrieve Google Patents Results for a given search query, you can use the following code:

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

```

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

```python
import csv

header = ["patent_id", "title", "snippet", "grant_date", "inventor", "assignee", "publication_number", "pdf"]

with open("google_patents.csv", "w", encoding="UTF8", newline="") as f:
    writer = csv.writer(f)
    writer.writerow(header)
    for item in results:
        writer.writerow([item.get('patent_id'), item.get('title'), item.get('snippet'), item.get('grant_date'), item.get('inventor'), item.get('assignee'), item.get('publication_number'), item.get('pdf')])
```

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

This example is using 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).