1import requests
2
3url = 'http://maps.googleapis.com/maps/api/directions/json'
4
5params = dict(
6 origin='Chicago,IL',
7 destination='Los+Angeles,CA',
8 waypoints='Joplin,MO|Oklahoma+City,OK',
9 sensor='false'
10)
11
12resp = requests.get(url=url, params=params)
13data = resp.json() # Check the JSON Response Content documentation below
14