Answers for "api params python"

0

api params python

# Adding API key to request with parameters
# NASA API Key Example
>>> endpoint = "https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/photos"
>>> # Replace DEMO_KEY below with your own key if you generated one.
>>> api_key = "DEMO_KEY"
>>> query_params = {"api_key": api_key, "earth_date": "2020-07-01"}
>>> response = requests.get(endpoint, params=query_params)
>>> response
<Response [200]>
Posted by: Guest on June-14-2021

Browse Popular Code Answers by Language