You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scrape Google and other search engines from our fast, easy, and complete API using SerpApi.com
3
+
This ruby library is meant to scrape and parse results from all major search engine available world wide including Google, Bing, Baidu, Yandex, Yahoo, Ebay, Apple and more using [SerpApi](https://serpapi.com).
4
+
SerpApi.com provides a [script builder](https://serpapi.com/demo) to get you started quickly.
5
+
6
+
## Installation
7
+
serpapi can be installed with pip.
8
+
9
+
```sh
10
+
$ python -m pip install serpapi
11
+
```
12
+
13
+
## Quick start
14
+
First things first, import the serpapi module:
15
+
16
+
```python
17
+
>>>import serpapi
18
+
```
19
+
You’ll need a Client instance to make search. This object handles all of the details of connection pooling and thread safety so that you don’t have to:
20
+
21
+
```python
22
+
>>> client = serpapi.Client()
23
+
```
24
+
To make a search using SerpApi.com client.
25
+
26
+
```python
27
+
>>> parameter = {
28
+
api_key: "secret_api_key", # from serpapi.com
29
+
engine: "google", # search engine
30
+
q: "coffee", # search topic
31
+
location: "Austin,TX"# location
32
+
}
33
+
results = searpapi.search(parameter)
34
+
```
35
+
Putting everything together.
36
+
```python
37
+
import serpapi
38
+
39
+
parameter = {
40
+
api_key: "secret_api_key", # from serpapi.com
41
+
engine: "google", # search engine
42
+
q: "coffee", # search topic
43
+
location: "Austin,TX"# location
44
+
}
45
+
results = searpapi.search(parameter)
46
+
print(results)
47
+
```
48
+
49
+
### Advanced settings
50
+
SerpApi Client uses urllib3 under the hood.
51
+
The HTTP connection be tuned by setting the following client specific setting.
52
+
- retries : attempt to reconnect if the connection failed by default: False
53
+
- timeout : connection timeout by default 60s
54
+
for more details: https://urllib3.readthedocs.io/en/stable/user-guide.html
Scrape Google and other search engines from our fast, easy, and complete API using SerpApi.com
10
+
This ruby library is meant to scrape and parse results from all major search engine available world wide including Google, Bing, Baidu, Yandex, Yahoo, Ebay, Apple and more using [SerpApi](https://serpapi.com).
11
+
SerpApi.com provides a [script builder](https://serpapi.com/demo) to get you started quickly.
12
+
13
+
## Installation
14
+
serpapi can be installed with pip.
15
+
16
+
```sh
17
+
$ python -m pip install serpapi
18
+
```
19
+
20
+
## Quick start
21
+
First things first, import the serpapi module:
22
+
23
+
```python
24
+
>>> import serpapi
25
+
```
26
+
You’ll need a Client instance to make search. This object handles all of the details of connection pooling and thread safety so that you don’t have to:
27
+
28
+
```python
29
+
>>> client = serpapi.Client()
30
+
```
31
+
To make a search using SerpApi.com client.
32
+
33
+
```python
34
+
>>> parameter = {
35
+
api_key: "secret_api_key", # from serpapi.com
36
+
engine: "google", # search engine
37
+
q: "coffee", # search topic
38
+
location: "Austin,TX" # location
39
+
}
40
+
results = searpapi.search(parameter)
41
+
```
42
+
Putting everything together.
43
+
```python
44
+
import serpapi
45
+
46
+
parameter = {
47
+
api_key: "secret_api_key", # from serpapi.com
48
+
engine: "google", # search engine
49
+
q: "coffee", # search topic
50
+
location: "Austin,TX" # location
51
+
}
52
+
results = searpapi.search(parameter)
53
+
print(results)
54
+
```
55
+
56
+
### Advanced settings
57
+
SerpApi Client uses urllib3 under the hood.
58
+
The HTTP connection be tuned by setting the following client specific setting.
59
+
- retries : attempt to reconnect if the connection failed by default: False
60
+
- timeout : connection timeout by default 60s
61
+
for more details: https://urllib3.readthedocs.io/en/stable/user-guide.html
0 commit comments