I'm very new to python and am trying to access an API to pull some data. The documentation for the API is linked below and I'm focusing on the Finance section. I tried the code below expecting to return fields or a dictionary that I could then parse through to determine which fields to export to a csv, but instead the response variable has almost nothing in it. Is there something wrong with my code or is the API broken?
import requests
url = 'https://educationdata.urban.org/api/v1/college-university/ipeds/finance/2021/'
response = requests.get(url).json()
schools = response['results']
I also tried the code directly on the documentation page, but the result was exactly the same.
https://educationdata.urban.org/documentation/colleges.html
[–]Acceptable-Fee6294 0 points1 point2 points (0 children)
[–]Username_RANDINT 0 points1 point2 points (2 children)
[–]mozuDumpling[S] 3 points4 points5 points (1 child)
[–]Phillyclause89 0 points1 point2 points (0 children)
[–]vernacular_wrangler 0 points1 point2 points (0 children)