Python GET request doesn't return anything

I'm trying to use an API that is for flight information. On the documentation, it says that this is a rest API and the method is GET. the URL on the Document is:

when I run the API using chrome I get back the JSON file but using python I don't receive anything! What should I do?

import requests

rs = requests.get("")


2 answers

  • answered 2020-07-04 21:27 salparadise

    rs would be the Response requests object, you want to call json() if there is a json response in the body.


  • answered 2020-07-04 21:31 gellerm

    When you get data using the requests module, you can view the response by printing rs.text

    EDIT: the first answerer used the .json() function which is likely better if you want it as a JSON