The response of an item list query contains a field that denotes the total number of applicable items that have been found.

{
  "total": 506531,
  "limit": 20,
  "offset": 0
}

❗️

Limited by default

API requests that contain more than 10,000 applicable items will show the total field as 10,000 by default.

Because of the amount of items in the Content API an accurate calculation of the total field was causing slow responses.

Due to this the calculation has been restricted to only be accurate up to 10,000. After that amount it shows is limited to 10,000.

This means that the total field can be unreliable for finding out if there are any new items.

If you require to get an accurate number for this field you can use the trackTotalHits, as seen in this example -

curl \
  -H "Accept: application/json" \
  -H "apikey: <API KEY>" \
  https://content.api.pressassociation.io/v1/item&trackTotalHits=true

🚧

Accurate total

If you require an accurate value for the total field you must add trackTotalHits=true to your URL request to the Content API.

This will make the request marginally slower while it calculates the total.