Assigned Agencys Response
By default, the API returns a maximum of 1,000 records per request. To retrieve more than that, you can use the following techniques:
- Increase the Limit: You can increase the number of records returned by using the $limit parameter. For example, to request 50,000 records, you would use the following query: https://data.cityofnewyork.us/resource/abcd-1234.json?$limit=50000
- Paginate Using $offset: To request additional records, pair $limit with $offset to paginate through the data. This will allow you to pull the data in smaller batches:
- First Page: ?$limit=50000&$offset=0
- Second Page: ?$limit=50000&$offset=50000
- Optimize Your Query: Before making large requests, it's helpful to filter your results using the $select, $where, and $order parameters. This reduces unnecessary records and improves query performance.
For more information on query parameters and how to work with large datasets please consult the following articles:
- The LIMIT Clause
- How to Query More Than 1000 Rows