getArNSRecords
getArNSRecords
is a method on the ARIO
class that retrieves all ArNS records with optional pagination and filtering support.
getArNSRecords
does not require authentication.
Parameters
← Swipe to see more →
Parameter | Type | Description | Optional | Default |
---|---|---|---|---|
cursor | string | The ArNS name to use as the starting point for the next page of results | true | None |
limit | number | The maximum number of records to return (max: 1000) | true | 100 |
sortBy | string | The property to sort results by | true | startTimestamp |
sortOrder | string | The sort direction ('desc' or 'asc') | true | desc |
← Swipe to see more →
Examples
getArNSRecords
const { ARIO } = require('@ar.io/sdk');
async function main() {
const ario = ARIO.init();
const records = await ario.getArNSRecords({
limit: 50,
sortBy: 'endTimestamp',
sortOrder: 'desc'
});
console.log(records);
}
main();
Output
{
"items": [
{
"name": "ardrive",
"processId": "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM",
"startTimestamp": 1707307200000,
"endTimestamp": 1739307200000,
"type": "lease",
"undernameLimit": 10
},
{
"name": "permaweb",
"processId": "xWQ7UmbP0ZHDY7OLCxJsuPiLWYQo5bhHGnp-kgP8N2A",
"type": "permabuy",
"undernameLimit": 50
}
],
"hasMore": true,
"nextCursor": "permaweb",
"totalItems": 4567,
"sortBy": "endTimestamp",
"sortOrder": "desc"
}