I was hoping for something like an ‘offset’ so I could get the first 500 posts and then offset to get the next N posts.
You should be able to achieve such results with the post_id
parameter. You can run multiple queries with a limited number of posts each time.
I hope this helps.
Alright, I was hoping for something that wouldn’t require so many different calls, but at least it’s something. A few more questions then:
1) What is the maximum amount of posts I can list for the post_id parameter?
2) What is your recommended amount of posts I should query at a time?
WordPress.com does not set a maximum value; your server will be the bottleneck. If the list of IDs is too long, you will get a 414 Request-URI Too Large
error.
For example, for nginx the default max buffer is 8192 bytes:
http://wiki.nginx.org/NginxHttpCoreModule#large_client_header_buffers
Hi there.
Some large sites have thousands of posts. We can’t return them all. It’ll end up breaking on your end faster than on ours, as Jeremy suggested. 🙂
Multiple queries to get the total are fine, especially if you limit them to once an hour
(we suggest only 180 seconds caching on the docs).
For more advanced things,you should consider using the many stats-related endpoints offered by our REST API instead:
* https://developer.wordpress.com/docs/api/1/get/sites/%24site/stats/
* https://developer.wordpress.com/docs/api/1/get/sites/%24site/stats/visits/
* and more at https://developer.wordpress.com/docs/api/
Hope this helps.