Pagination
In most cases, the API response may not fit a single page, even with a maximum of 1000 records as the limit
parameter value. These situations require your application to paginate through the results by using cursors.
Cursors
Cursor values are returned on requests against the Records or References API:
API | Resource |
---|---|
Records | /records |
References | /schemes , /concepts |
These cursor values are found in the meta.cursors
object in the response body:
"meta": {
"legalNotices": "https://developers.lseg.com/content/dam/devportal/en_us/product-docs/wcod/legal",
"requestingUser": "XXXXXXXXXXXXXXX",
"requestDate": "2025-08-29T02:56:50.763Z",
"cursors": {
"previous": "0",
"next": "gAAAAABosRbzlx0X4nZ79VRXmnTas01HitkS_S98jkExd_LkJjPxenGYKmmftyxBErIAR6I6lnThBzY9us7iCwfztgM6xd_xA-jEVCzyU5nwKCXQ8wlUQys="
},
"queryHash": "0803c3f725f67be965edcf4b0c223d9328db29a0926593f6c38b96ceea962e70-MjAyNS0wOC0yOVQwMjo1Njo1MC43NjNa"
},
The cursors are also returned in the response headers, having the same values as the ones in the response body:
HTTP/1.1 200 OK
Date: Fri, 29 Aug 2025 02:56:51 GMT
Content-Type: application/json
.
.
.
Wcod-Cursor-Next: gAAAAABosRbzlx0X4nZ79VRXmnTas01HitkS_S98jkExd_LkJjPxenGYKmmftyxBErIAR6I6lnThBzY9us7iCwfztgM6xd_xA-jEVCzyU5nwKCXQ8wlUQys=
Wcod-Cursor-Previous: 0
Wcod-Query-Hash: 0803c3f725f67be965edcf4b0c223d9328db29a0926593f6c38b96ceea962e70-MjAyNS0wOC0yOVQwMjo1Njo1MC43NjNa
Non-zero cursor values indicate more records on either the next or previous page. A value of 0
means there are no records on that page.
Please see the Filters & Parameters for more details on cursors.
Query Hash
To ensure that results are deterministic even across a multi-page response, the query hash value must be sent with every request that includes a cursor.
Query hash values are found in both the meta
object in the response body and the response headers. Please see the examples above.
For more details, please see the Filters & Parameters.
Next or Previous Page
To retrieve the next or previous page in a multi-page response, the following requirements must be met:
- The appropriate cursor value must be provided in the request URL as the value of the
cursor
query parameter. - The query hash taken from page #1 of the multi-page response should be sent in the request header as value for the
queryHash
header parameter. - For Records API, the same initial payload used to generate the page #1 response must be sent in the request as payload.
curl --location 'https://api.risk.lseg.com/data/world-check/v1/records?limit=200&cursor=gAAAAABosT2CSxafYsbVjiUH_FAzSEAp8KQ8LVCxwIzx5VUse_SZeVheZptlGI6FV8Mm8R3kYFyNZul9aZRfZuMvfAQPLq8GSKI-nAKfSxsE2ve3n5g_00A%3D' \
--header 'Content-Type: application/json' \
--header 'queryHash: f52b5ab4f9b51d3230ac2af88b7a0dc4a85cb272657892bf16d15f62413c2e41-MjAyNS0wOC0yOVQwNTo0MToxOC4yNzZa' \
--header 'Authorization: ••••••' \
--data '{
"criteria": {
"field": "keyword",
"operator": "includes",
"value": [
"wcSourceKwd:OFAC"
]
}
}'
Errors
When the payload does not match the queryHash, or the queryHash is missing from the request headers, an HTTP/400 error will be returned:
{
"error": {
"code": "400",
"id": "534e0eaf-5a77-4f1e-8c2c-6769d577ce25",
"message": "Validation error",
"status": "Bad Request",
"errors": [
{
"key": "requestBody",
"reason": "Missing queryHash in request header"
}
]
}
}
{
"error": {
"code": "400",
"id": "c7c37e0c-04f5-4f76-833a-dd632c4ca7b0",
"message": "Validation error",
"status": "Bad Request",
"errors": [
{
"key": "requestBody",
"reason": "Invalid query hash"
}
]
}
}
When an invalid cursor is sent in the request, or the cursor is 0
, an error will also be returned:
{
"error": {
"code": "400",
"id": "e7cc6efe-a2a8-423f-b784-b3808725de7d",
"message": "Validation error",
"status": "Bad Request",
"errors": [
{
"key": "requestBody",
"reason": "Cursor decoding error. Invalid Token"
}
]
}
}
Tokens can expire as your application goes from one page to the next. Ensure that this is handled gracefully, a new token is retrieved, and the data retrieval continues where it left off.