Pagination
List endpoints return results in pages.
Requesting a page
Paginated endpoints accept two query parameters:
| Parameter | Description |
|---|---|
page | Page number (1-indexed, so page=1 is the first page). Omit to return all results. |
count | Number of results per page. Defaults to 20. |
page=0 or a negative page is rejected with 400 - pages start at 1. On a page past the end you get an empty result list, not an error.
- cURL
- Node.js
- Python
- C#
curl -X GET "https://api.walkerstdata.com.au/v1/transactions?page=1&count=50" \
-H "x-api-key: YOUR_API_KEY"
const resp = await fetch(
'https://api.walkerstdata.com.au/v1/transactions?page=1&count=50',
{
headers: { 'x-api-key': process.env.WSD_API_KEY },
}
);
if (!resp.ok) throw new Error(`Request failed: ${resp.status}`);
const { data } = await resp.json();
import os
import requests
resp = requests.get(
"https://api.walkerstdata.com.au/v1/transactions?page=1&count=50",
headers={"x-api-key": os.environ["WSD_API_KEY"]},
)
resp.raise_for_status()
data = resp.json()["data"]
using System.Net.Http.Json;
using System.Text.Json.Nodes;
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("x-api-key", Environment.GetEnvironmentVariable("WSD_API_KEY"));
var resp = await http.GetAsync("https://api.walkerstdata.com.au/v1/transactions?page=1&count=50");
resp.EnsureSuccessStatusCode();
var data = (await resp.Content.ReadFromJsonAsync<JsonNode>())!["data"];
Pagination metadata
Paginated responses include metadata alongside the results so you can iterate through pages:
{
"data": {
"transactions": [/* ... */],
"totalCount": 137,
"currentPage": 1,
"pageSize": 50,
"totalPages": 3
},
"message": null
}
| Field | Description |
|---|---|
totalCount | Total number of results across all pages |
currentPage | The page returned (null when pagination was not applied) |
pageSize | Number of results per page |
totalPages | Total number of pages available |
Keep requesting page values up to totalPages to retrieve the full result set.