demo_requests_response_json.py:
import requests url = 'https://www.w3schools.com/python/demopage.js' x = requests.get(url) print(x.json())
C:\Users\My Name>python demo_requests_response_json.py
{'firstname': 'John', 'lastname': 'Doe'}