FAQ: I want to retrieve data exceeding 200 records via API
## Answer
Please specify "Offset" in the POST parameters
---
## Overview
When retrieving multiple records, the number of records included in the response from the API is up to the PageSize (default 200) in "[Api.json](/ja/manual/api-json)".
By specifying Offset, you can retrieve subsequent records.
## Notes
1. Basically, consider limiting the number of records retrieved using the View parameter so as not to overload the entire system.
1. Increasing the PageSize in "[Api.json](/ja/manual/api-json)" will result in a large amount of data being responded to at once, which may increase the processing load on the server and client.
## Operation Procedure
1. If the TotalCount in the response exceeds the PageSize in the response, there are records that have not been retrieved.
2. Retrieve subsequent records by making a request with an Offset added.
### Check the number of records
You can retrieve information on the number of records by requesting the one below.
In this case, you can check whether `(start position + number of records that can be retrieved at once) > all records` to determine whether there are any records that have not been retrieved.
```javascript
const siteId = 123456; // Site ID of the site to retrieve records
$p.apiGet({
id: siteId,
done: (e) => console.log({'all records':e.Response.TotalCount, 'number of records that can be retrieved at once':e.Response.PageSize, 'start position':e.Response.Offset})
});
```
### Retrieve a record with an offset
You can move the result retrieval position forward by specifying Offset as data as follows.
```javascript
const siteId = 123456; // Site ID of the site to get records
$p.apiGet({
id: siteId,
data: {Offset:200},
done: (e) => console.log(e.Response.Data);
});
```
As mentioned above, if the sum of the response Offset and PageSize and TotalCount is equal to or greater than the total, it is determined that the end of the data has been retrieved. By repeating this process until this condition is met, paging processing can be performed.
In actual business, please note that it may not be possible to scan all records simply by performing paging due to changes in the order of data, new creations, and deletions caused by data updates during paging processing.
## Related Information
<div id="ManualList"><ul><li><a href="/en/manual/api-json">Set Parameter: Api.json</a><span>08.13.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />