0

I can do https://public-api.wordpress.com/rest/v1/sites/www.website.com/posts/ to view the latest 20 posts on a WP site.

How do I view more than 20? Or view all the posts?

Muz
  • 5,866
  • 3
  • 47
  • 65

1 Answers1

1

As described in the documentation for GET /sites/$site/posts/, just include the appropriate number and page paramenters in a query string.

To view the first 100:

https://public-api.wordpress.com/rest/v1.1/sites/en.blog.wordpress.com/posts/?number=100&page=1

To view the second 100:

https://public-api.wordpress.com/rest/v1.1/sites/en.blog.wordpress.com/posts/?number=100&page=2

etc.

enigma
  • 3,476
  • 2
  • 17
  • 30