get requests from python

import requests

response = requests.get('')
response.raise_for_status()

data = response.json()
print(data)

Here is what the above code is Doing:
1. We’re making a GET request to the API endpoint.
2. We’re raising an exception if the request fails.
3. We’re parsing the JSON response into a Python dictionary.
4. We’re printing the data.