University of Wisconsin–Madison

Delivery formats

You can specify what file format you’d like your results to be returned in.

JSON

JSON data is the default response type. If you don’t specify what format you want, you’ll get JSON. You can also specifically request it by including in the header of your request:

Accept: application/JSON

JSON data is paginated: if your query returns many matches, you may need to iterate over multiple pages to get them all. Links to other pages and metadata regarding pagination will be included in the API response:

"links": {
    "nextPage": "https://api.wisc.edu/locations?page[number]=2&page[size]=100",
    "prevPage": null,
    "firstPage": "https://api.wisc.edu/locations?page[number]=1&page[size]=100",
    "lastPage": "https://api.wisc.edu/locations?page[number]=1868&page[size]=100"
  },
  "meta": {
    "totalCount": 186832,
    "page": {
      "number": 1,
      "size": 100
    }
  }

You can specify the page you want and/or the number of records per page:

GET https://api.wisc.edu/locations?page[number]=3&page[size]=1000

Slow responses?

You may encounter long response times when paging through an especially large set of results. Consider adding filter and/or search parameters to limit the number of results, or using CSV format if you want to get them in one query.

CSV

You can optionally request CSV data using the Accept header in your request:

Accept: text/csv

CSV data is not paginated. All matching records will be returned in a single file. Be careful: depending on your access level and query parameters, this could be a large file.

Use CSV format when you’re integrating with an ETL process or other data loading system and you need to get a large set of records. You’ll get them all in one request, and it’ll be faster than paging through the JSON output.