import requests url = 'https://randomfox.ca/floof/' r = requests.get(url) print(r.status_code) # 200 (hopefully) print(r.text) # { "image": "image.jpg", "link": "link.com" } print(r.json()['image']) # e.g. https://randomfox.ca/images/78.jpg