# API can pull only 20 posts

**URL:** https://meta.discourse.org/t/api-can-pull-only-20-posts/163406
**Category:** Development
**Tags:** rest-api
**Created:** [September 8, 2020, 7:07pm UTC](https://meta.discourse.org/t/api-can-pull-only-20-posts/163406 "2020-09-08T19:07:53Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [September 9, 2020, 5:06pm UTC](https://meta.discourse.org/t/api-can-pull-only-20-posts/163406/5 "2020-09-09T17:06:59Z")

</div>

See

> [@API: Getting all posts in a topic](https://meta.discourse.org/t/api-getting-all-posts-in-a-topic/41018/8):
>
> The best way to download all the posts to a topic via the api is to mimic what Discourse is doing in the web browser so please checkout [Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576) for details. Basically go the the topic in the browser open up your dev tools and look at the xhr requests as you scroll through the topic. Here are the steps to download all the posts in the topic via the api: Hit /t/-/{id}.json. This will contain a ‘posts\_stream’ hash that contains a ‘posts’ array and a ‘stream’ array. Th…

And also the `print=true` flag is another option to get more than 20 posts.

---

_[View the full topic](https://meta.discourse.org/t/api-can-pull-only-20-posts/163406)._
