Pagination
All list API methods are paginated, with pagination capped at 1MB of data per page.
The response from a list API method includes a result attribute if there are any results. Additionally, if there are more results within the 1MB data cap, the response will include a cursor
attribute. This cursor
can be used to request the next page of results, ensuring that each page does not exceed the 1MB limit.
Query string parameters
- Name
cursor
- Type
- string
- Description
The cursor used for pagination.
- Name
limit
- Type
- number
- Description
The limit on the number of items returned per request, defaulting to 100, with a 1MB data cap.
Properties
In this example, when we request the NFT Contracts API method using the cursor 48d9f854-bd9e-470b-bb23-79df
, we receive a list of nft contracts and a new cursor ca82bddc-745e-4ba3-ae6b-1b8b7620f456
that can be used to request the next page of results.
Each page adheres to the maximum 1MB data limit. If there are no further results to display or the results are within the data limit but do not fill another page, the response will not include a cursor
attribute.
- Name
cursor
- Type
- string
- Description
The next cursor used to request the next page of results.
- Name
result
- Type
- array
- Description
The list of items returned in the response.
Manual pagination using cURL
curl -G https://api.arkproject.dev/v1/contracts?cursor=48d9f854-bd9e-470b-bb23-79df&limit=10 \
-H "x-api-key: <INSERT_API_KEY_HERE>"
Paginated response
{
"cursor": "ca82bddc-745e-4ba3-ae6b-1b8b7620f456",
"result": [
{
"contract_address": "0x076503062d78f4481be03c9145022d6a4a71ec0719aa07756f79a2384dc7ef16",
"contract_type": "ERC721",
"name": "Starknet Quest",
"symbol": "SKQ",
"image": "https://starknet.quest/starkfighter/level1.webp"
},
{...},
{...}
]
}