Trustpilot API - "Pagination limit exceeded" error

285 Views Asked by At

I'm using the Trustpilot API to pull in all reviews for my company starting from 1/1/2021. We do this by calling the API one page at a time, until we hit the end:

page = 1
while True:
    params_reviews = {
        'businessUnitId': BUSINESS_UNIT_ID,
        'perPage': 100,
        'startDateTime': START_DATE,
        'endDateTime': END_DATE,
        'page': page
    }
    reviews = requests.get(
        url = URL,
        params = params_reviews
    )
    # Process these reviews
    ...
    # Check if there are any reviews on this page, and move to next page if there are
    if len(reviews.json()['reviews']) > 0:
        page += 1
    # Once we go through all pages, leave the loop
    else:
        break

It's been working fine until recently, but now after iterating over ~25 pages we hit the error "Pagination limit exceeded." Did something change in the API recently to prevent the above from working?

1

There are 1 best solutions below

1
Max Adcock On

We've been getting the same issue on our end as of the last few days, I've emailed trustpilot support but not sure if they provide api help, there's nothing in their documentation that I can find that suggests there is usage limits.

Edit - Probably not the response you were hoping for, but their support team have responded with a limit of 100 pages capped at 10k reviews for each call and they'll be working to extend this in the future, but no timelines set.