WordPress API returns empty page when page is less than X-WP-TotalPages

I am querying in the WordPress API for all pages of media attachments.
I am going page by page.

I have about 5800 pages and when I hit pages 50-53 they return a blank or more of a [] but it is a 200 HTTP Status.

Can this be normal with anything that’s paginated? Am I possibly going to be missing data between pages 50-53?

my HTTP GET request for each page:

GET /wp-json/wp/v2/media?page=<page>&amp; per_page=100&amp; key=<test>&amp; orderby=id&amp; order=asc HTTP/1.1
Referer: http://<website>.com/wp-json/wp/v2/media?page=53&per_page=100&key=<key>&orderby=id&order=asc
Connection: keep-alive

0

Leave a Comment