How to Scrape Google Patents Results

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.

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, we already provide a high-quality Google Patents API for you. Let's see how it works.

Setting Up a SerpApi Account

SerpApi offers a free plan for newly created accounts. Head to the sign-up page to register an account and complete your first search with our interactive playground. When you want to do more searches with us, please visit the pricing page.

Once you are familiar with all the results, you can utilize SERP APIs using your API Key.

Scrape your first Google Patents results with SerpApi

Head to the Google Patents API from the documentation on SerpApi for details.

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.

First, you need to install the SerpApi client library.

pip install google-search-results

Set up the SerpApi credentials and search.

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:

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

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

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')])

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.