Title: Rest API only returns 10 posts
Last modified: October 11, 2019

---

# Rest API only returns 10 posts

 *  Resolved [swani](https://wordpress.org/support/users/swani/)
 * (@swani)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/rest-api-only-returns-10-posts/)
 * Hello,
 * I am trying to pull all posts for a CPT called “Videos” using the REST API. Here
   is the URL I’m using.
 * What I can’t change is the number of posts returned. There are 27 video posts.
   You can see additional posts if you look at page 2 of the results.
 * /wp-json/wp/v2/videos?page=2
 * On the Settings > General tab, I have changed the setting for both “Blog pages
   show at most” and “Syndication feeds show the most recent” to 100. No change.
   I tried setting it to -1 and 0 but it insists on a number greater than 0.
 * I have also tried adding the filters:
    `/wp-json/wp/v2/videos?filter[posts_per_page]
   =100` (switching this to a link messes it up so I’ll just leave it raw)
 * And with the newer syntax (I think):
    /wp-json/wp/v2/videos?posts_per_page=100
 * I’m happy to post my code, but the code seems to be handling the input properly,
   it’s just that the input is limited. My next step is to try to step through the
   pages, but I feel like I’m missing something simple.
 * Thanks for reading. Any help is appreciated even if it’s just a link pointing
   me in the right direction. I’m pretty new to this stuff so maybe I’m not searching
   the right terms.
 * Thanks,
    Swani
    -  This topic was modified 6 years, 8 months ago by [swani](https://wordpress.org/support/users/swani/).
    -  This topic was modified 6 years, 8 months ago by [swani](https://wordpress.org/support/users/swani/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frest-api-only-returns-10-posts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [swani](https://wordpress.org/support/users/swani/)
 * (@swani)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/rest-api-only-returns-10-posts/#post-12021900)
 * I didn’t mean to post this in “Fixing WordPress”. Reposted in the correct forum.
 * [https://wordpress.org/support/topic/rest-api-only-returns-10-posts-2](https://wordpress.org/support/topic/rest-api-only-returns-10-posts-2)

Viewing 1 replies (of 1 total)

The topic ‘Rest API only returns 10 posts’ is closed to new replies.

## Tags

 * [json](https://wordpress.org/support/topic-tag/json/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [swani](https://wordpress.org/support/users/swani/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/rest-api-only-returns-10-posts/#post-12021900)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
