Skip to content

Commit 6ea91db

Browse files
authored
Update README.md
1 parent 7b3ff95 commit 6ea91db

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# How to Scrape Google Search Results: Python Tutorial
22

3-
In this tutorial, we showcase how to scrape public Google data with Python and Oxylabs [SERP Scraper API](https://oxylabs.io/products/scraper-api/serp).
3+
In this tutorial, we showcase how to scrape public Google data with Python and Oxylabs [SERP Scraper API](https://oxylabs.io/products/scraper-api/serp), which requires a subscription or a free trial.
4+
5+
* [What is a Google SERP?](#what-is-a-google-serp)
6+
* [Is it legal to scrape Google results?](#is-it-legal-to-scrape-google-results)
7+
* [Scraping public Google data with Python and Oxylabs Scraper API](#scraping-public-google-data-with-python-and-oxylabs-scraper-api)
8+
* [Set up a payload and send a POST request](#set-up-a-payload-and-send-a-post-request)
9+
+ [Customizing query parameters](#customizing-query-parameters)
10+
+ [Basic parameters](#basic-parameters)
11+
* [Location query parameters](#location-query-parameters)
12+
+ [Controlling the number of results](#controlling-the-number-of-results)
13+
+ [Python code for scraping Google search data](#python-code-for-scraping-google-search-data)
14+
+ [Export scraped data to a CSV](#export-scraped-data-to-a-csv)
15+
+ [Handling errors and exceptions](#handling-errors-and-exceptions)
416

517
## What is a Google SERP?
618

@@ -35,7 +47,7 @@ If you’re using Windows, choose Python instead of Python3. The rest of the com
3547

3648
`d:\amazon>python -m pip install requests`
3749

38-
## 2. Set up a payload and send a POST request
50+
## Set up a payload and send a POST request
3951

4052
Create a new file and enter the following code:
4153

@@ -195,7 +207,7 @@ if response.status_code != 200:
195207
pprint(response.json())
196208
```
197209

198-
### 3. Export scraped data to a CSV
210+
### Export scraped data to a CSV
199211
One of the best Google Scraper API features is the ability to parse an HTML page into JSON. For that, you don't need to use BeautifulSoup or any other library – just send the parse parameter as True.
200212

201213
Here is a sample payload:

0 commit comments

Comments
 (0)