Skip to content

Instantly share code, notes, and snippets.

Created June 22, 2022 06:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Web Scraping Google Maps Place in Python | SerpApi
# video:
from serpapi import GoogleSearch
import json
params = {
"api_key": "your-serpapi-api-key", # Your SerpApi Api key
"engine": "google_maps", # SerpApi Parsing Engine
"google_domain": "", # Google domain
"ll": "@47.6062572,-122.4086176,12z", # GPS Coordinates
"type": "place", # Type of the search result. `Search` or `Place`
"hl": "en", # Language of the search
"data": "!4m5!3m4!1s0x549041cdf279071f:0xb4634cde435eb7ec!8m2!3d47.5666806!4d-122.3299532" # -> API Parameters Examples
search = GoogleSearch(params)
results = search.get_dict()
print(json.dumps(results["place_results"], indent=2, ensure_ascii=False))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment