From Open Data Maker HTTP API:
By default, results are returned in pages of 20 records at a time. To retrieve pages after the first, set the _page
option parameter to the number of the page you wish to retrieve. Page numbers start at zero; so, to return records 21 through 40, use _page=1
. Remember that the total
number of records available for a given query is given in the total field of the top-level metadata
object.
You can also change the number of records returned per page using the _per_page
option parameter, up to a maximum of 100 records. Bear in mind, however, that large result pages will increase the amount of JSON returned and reduce the performance of the API.
Thus, your request should be:
https://api.data.gov/ed/collegescorecard/v1/schools?_per_page=100&_page=0&api_key=DEMO_KEY&fields=school.name,school.city,school.state,school.zip,school.carnegie_size_setting
Then change _page
to 1
etc.
You could use e.g. cURL globbing, but note that the DEMO_KEY
API key has harder rate limits.
You could also download CSV dumps: https://catalog.data.gov/dataset/college-scorecard