# Get last n new / updated posts using API?

**URL:** https://meta.discourse.org/t/get-last-n-new-updated-posts-using-api/307427
**Category:** Development
**Tags:** rest-api
**Created:** [May 9, 2024, 4:16pm UTC](https://meta.discourse.org/t/get-last-n-new-updated-posts-using-api/307427 "2024-05-09T16:16:06Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Samir\_Sabri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samir_sabri/32/287380_2.png) [@Samir\_Sabri](https://meta.discourse.org/u/Samir_Sabri)
#### Post date: [May 9, 2024, 4:16pm UTC](https://meta.discourse.org/t/get-last-n-new-updated-posts-using-api/307427/1 "2024-05-09T16:16:06Z")

</div>

Hello

I tried to use APIs to get last n posts using

```plaintext
uri = URI('https://mydomain.com/forum/latest.json?ascending=false')

```

however, I noticed the following:

- could not have the URL of each post
- could not strict result to last n posts.
- how to restrict returned fields ? ex: I am getting all details currently.

Any idea ?

---

_[View the full topic](https://meta.discourse.org/t/get-last-n-new-updated-posts-using-api/307427)._
