FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
google-serp-api-python/google_serp_api/example/example.py at main · HasData/google-serp-api-python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
HasData
/
google-serp-api-python
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
14
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
google-serp-api-python
/
google_serp_api
/
example
/
example.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (18 loc) · 515 Bytes
Breadcrumbs
google-serp-api-python
/
google_serp_api
/
example
/
example.py
Copy path
File metadata and controls
22 lines (18 loc) · 515 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import
sys
import
os
sys
.
path
.
append
(
os
.
path
.
abspath
(
'../'
))
from
google_serp_api
import
GoogleSerpApi
# noqa: E402
api_key
=
os
.
getenv
(
'HASDATA_API_KEY'
,
'INSERT_YOUR_API_KEY_HERE'
)
client
=
GoogleSerpApi
(
api_key
)
try
:
query
=
{
"q"
:
"Coffee"
,
"location"
:
"Austin,Texas,United States"
,
"domain"
:
"google.com"
,
"gl"
:
"us"
}
response
=
client
.
getSearchResults
(
query
)
data
=
response
.
json
()
print
(
data
)
except
Exception
as
e
:
print
(
f"Error occurred:
{
e
}
"
)
Back
|
FazBrowse Home
|
New Git URL