Skip to content

Commit ebcfbbc

Browse files
author
vlad-outscraper
committed
update docs, add Initialization
1 parent aa97438 commit ebcfbbc

File tree

2 files changed

+25
-34
lines changed

2 files changed

+25
-34
lines changed

README.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ pip install google-services-api
2020

2121
[Link to the python package page](https://pypi.org/project/google-services-api/)
2222

23-
## Scrape Google Maps (Places)
24-
23+
## Initialization
2524
```python
2625
from outscraper import ApiClient
2726

2827
api_client = ApiClient(api_key='SECRET_API_KEY')
28+
```
2929

30+
## Scrape Google Maps (Places)
31+
32+
```python
3033
# Search for businesses in specific locations:
3134
result = api_client.google_maps_search('restaurants brooklyn usa', limit=20, language='en')
3235

@@ -44,10 +47,6 @@ result = api_client.google_maps_search([
4447
## Scrape Google Maps Reviews
4548

4649
```python
47-
from outscraper import ApiClient
48-
49-
api_client = ApiClient(api_key='SECRET_API_KEY')
50-
5150
# Get reviews of the specific place by id
5251
result = api_client.google_maps_reviews('ChIJrc9T9fpYwokRdvjYRHT8nI4', reviewsLimit=20, language='en')
5352

@@ -65,29 +64,26 @@ result = api_client.google_maps_reviews(
6564
## Scrape Google Maps Photos
6665

6766
```python
68-
from outscraper import ApiClient
69-
70-
api_client = ApiClient(api_key='SECRET_API_KEY')
7167
result = api_client.google_maps_photos(
7268
'Trump Tower, NY, USA', photosLimit=20, language='en')
7369
```
7470

75-
## Scrape Google Play Reviews
71+
## Scrape Google Maps Directions
7672

7773
```python
78-
from outscraper import ApiClient
74+
result = api_client.google_maps_directions(['29.696596, 76.994928 30.7159662444353, 76.8053887016268', '29.696596, 76.994928 30.723065, 76.770169'])
75+
```
7976

80-
api_client = ApiClient(api_key='SECRET_API_KEY')
77+
## Scrape Google Play Reviews
78+
79+
```python
8180
result = api_client.google_play_reviews(
8281
'com.facebook.katana', reviewsLimit=20, language='en')
8382
```
8483

8584
## Emails & Contacts Scraper
8685

8786
```python
88-
from outscraper import ApiClient
89-
90-
api_client = ApiClient(api_key='SECRET_API_KEY')
9187
result = api_client.emails_and_contacts(['outscraper.com'])
9288
```
9389

README.rst

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,21 @@ Python 3+
3232
`Link to the python package
3333
page <https://pypi.org/project/google-services-api/>`__
3434

35-
Scrape Google Maps (Places)
36-
---------------------------
35+
Initialization
36+
------------
37+
38+
Python 3+
3739

3840
.. code:: python
3941
4042
from outscraper import ApiClient
4143
4244
api_client = ApiClient(api_key='SECRET_API_KEY')
4345
46+
Scrape Google Maps (Places)
47+
---------------------------
48+
49+
.. code:: python
4450
# Search for businesses in specific locations:
4551
result = api_client.google_maps_search('restaurants brooklyn usa', limit=20, language='en')
4652
@@ -57,11 +63,6 @@ Scrape Google Maps Reviews
5763
--------------------------
5864

5965
.. code:: python
60-
61-
from outscraper import ApiClient
62-
63-
api_client = ApiClient(api_key='SECRET_API_KEY')
64-
6566
# Get reviews of the specific place by id
6667
result = api_client.google_maps_reviews('ChIJrc9T9fpYwokRdvjYRHT8nI4', reviewsLimit=20, language='en')
6768
@@ -79,32 +80,26 @@ Scrape Google Maps Photos
7980
-------------------------
8081

8182
.. code:: python
82-
83-
from outscraper import ApiClient
84-
85-
api_client = ApiClient(api_key='SECRET_API_KEY')
8683
result = api_client.google_maps_photos(
8784
'Trump Tower, NY, USA', photosLimit=20, language='en')
8885
89-
Scrape Google Play Reviews
90-
--------------------------
86+
Scrape Google Maps Directions
87+
-------------------------
9188

9289
.. code:: python
90+
result = api_client.google_maps_directions(['29.696596, 76.994928 30.7159662444353, 76.8053887016268', '29.696596, 76.994928 30.723065, 76.770169'])
9391
94-
from outscraper import ApiClient
92+
Scrape Google Play Reviews
93+
--------------------------
9594

96-
api_client = ApiClient(api_key='SECRET_API_KEY')
95+
.. code:: python
9796
result = api_client.google_play_reviews(
9897
'com.facebook.katana', reviewsLimit=20, language='en')
9998
10099
Emails & Contacts Scraper
101100
-------------------------
102101

103102
.. code:: python
104-
105-
from outscraper import ApiClient
106-
107-
api_client = ApiClient(api_key='SECRET_API_KEY')
108103
result = api_client.emails_and_contacts(['outscraper.com'])
109104
110105
Responses examples

0 commit comments

Comments
 (0)