# Latest posts API pagination

**URL:** <https://meta.discourse.org/t/latest-posts-api-pagination/88589>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [May 28, 2018, 11:53am UTC](https://meta.discourse.org/t/latest-posts-api-pagination/88589 "2018-05-28T11:53:57Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![vsoch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vsoch/32/124967_2.png) [@vsoch](https://meta.discourse.org/u/vsoch)\
**Post date:** [September 13, 2019, 5:18pm UTC](https://meta.discourse.org/t/latest-posts-api-pagination/88589/7 "2019-09-13T17:18:15Z")

</div>

Question about using the API (which I’m doing through the discourse\_api gem, cool!) - it’s related to pagination (I would also want to use the latest posts endpoint) but for my current example below I’ll provide something from users, since I started working on it first.

I am wanting to get all activity for a user (topics and replies is good) so I’m trying this:

```ruby
vsoch = client.user_topics_and_replies("vsoch")

```

And then I consistently get a list of 30, regardless if the user obviously has more. I tried editing the source code to add a page variable:

```ruby
# frozen_string_literal: true
module DiscourseApi
  module API
    module UserActions
      def user_replies(username, page=1)
        params = { "username": username, "filter": '5', page: page }
        response = get("/user_actions.json", params)
        response.body["user_actions"]
      end

      def user_topics_and_replies(username, page=1)
        params = { "username": username, "filter": "4,5", page: page }
        response = get("/user_actions.json", params)
        response.body["user_actions"]
      end
    end
  end
end

```

but it doesn’t seem to do anything - it’s always the same list of 30 regardless of the page number. Is it possible to get more than 30? Am I trying the wrong thing? Any help would be greatly appreciated - if I can figure out how to do it I’d very happily put in a PR so others can too 🙂

---

_[View the full topic](https://meta.discourse.org/t/latest-posts-api-pagination/88589)._
