Skip to content

Commit 0d516c6

Browse files
author
vlad-outscraper
committed
demo
1 parent f8a7161 commit 0d516c6

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

test.ipynb

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"YOUR_API_KEY = 'YXV0aDB8NjAyMDFmODYwOTQ5M2UwMDZhOGM4YjZhfDMxMjRjOTYyMGI'"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"metadata": {
16+
"tags": []
17+
},
18+
"outputs": [],
19+
"source": [
20+
"from outscraper import ApiClient\n",
21+
"\n",
22+
"api_client = ApiClient(api_key=YOUR_API_KEY)"
23+
]
24+
},
25+
{
26+
"cell_type": "code",
27+
"execution_count": null,
28+
"metadata": {},
29+
"outputs": [],
30+
"source": [
31+
"places = api_client.google_maps_search('restaurants, Manhattan, NY, USA', limit=3)"
32+
]
33+
},
34+
{
35+
"cell_type": "code",
36+
"execution_count": null,
37+
"metadata": {},
38+
"outputs": [],
39+
"source": [
40+
"places[0]"
41+
]
42+
},
43+
{
44+
"cell_type": "code",
45+
"execution_count": null,
46+
"metadata": {},
47+
"outputs": [],
48+
"source": [
49+
"reviews = api_client.google_maps_reviews(places[0][0]['place_id'], reviews_limit=3)"
50+
]
51+
},
52+
{
53+
"cell_type": "code",
54+
"execution_count": null,
55+
"metadata": {},
56+
"outputs": [],
57+
"source": [
58+
"reviews[0]['reviews_data'][0]"
59+
]
60+
}
61+
],
62+
"metadata": {
63+
"kernelspec": {
64+
"display_name": "Python 3.8.13 ('sahara-JkI-swsq')",
65+
"language": "python",
66+
"name": "python3"
67+
},
68+
"language_info": {
69+
"codemirror_mode": {
70+
"name": "ipython",
71+
"version": 3
72+
},
73+
"file_extension": ".py",
74+
"mimetype": "text/x-python",
75+
"name": "python",
76+
"nbconvert_exporter": "python",
77+
"pygments_lexer": "ipython3",
78+
"version": "3.8.13"
79+
},
80+
"orig_nbformat": 2,
81+
"vscode": {
82+
"interpreter": {
83+
"hash": "a982a626c5f587dff4bae2d1f820a0880fd741885e94d495bbe334a2f13cbecc"
84+
}
85+
}
86+
},
87+
"nbformat": 4,
88+
"nbformat_minor": 2
89+
}

0 commit comments

Comments
 (0)