# Do we have any API or way to get latest post details for a particular Topic in discourse?

**URL:** https://meta.discourse.org/t/do-we-have-any-api-or-way-to-get-latest-post-details-for-a-particular-topic-in-discourse/63723
**Category:** Feature
**Created:** [1 juni 2017 om 10:56 UTC](https://meta.discourse.org/t/do-we-have-any-api-or-way-to-get-latest-post-details-for-a-particular-topic-in-discourse/63723 "2017-06-01T10:56:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Aaditya\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Aaditya\_Agrawal](https://meta.discourse.org/u/Aaditya_Agrawal)
#### Post date: [1 juni 2017 om 10:56 UTC](https://meta.discourse.org/t/do-we-have-any-api-or-way-to-get-latest-post-details-for-a-particular-topic-in-discourse/63723/1 "2017-06-01T10:56:07Z")

</div>

Hi,  
As mentioned, do we have any API or way to get latest post details for a particular Topic in discourse ?  
Also is there any way to get All/Latest/Top posts for a particular Topic in discourse ?

Thanks in adv.

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [1 juni 2017 om 10:58 UTC](https://meta.discourse.org/t/do-we-have-any-api-or-way-to-get-latest-post-details-for-a-particular-topic-in-discourse/63723/2 "2017-06-01T10:58:06Z")

</div>

> [@Discourse REST API Documentation](https://meta.discourse.org/t/discourse-api-documentation/22706):
>
> Discourse API Please view the Discourse API Documentation site for detailed info: [https://docs.discourse.org](https://docs.discourse.org)information_source Authentication API requests must use HTTP header based authentication. Pass your Api-Key and Api-Username as HTTP headers. Authentication via query parameters or request body is not supported (this was removed in April 2020). Please see the example cURL request below. The only API endpoints that continue to support credentials in query parameters are requests to…

---

<div class="post-metadata">

### Author: ![Aaditya\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Aaditya\_Agrawal](https://meta.discourse.org/u/Aaditya_Agrawal)
#### Post date: [1 juni 2017 om 11:02 UTC](https://meta.discourse.org/t/do-we-have-any-api-or-way-to-get-latest-post-details-for-a-particular-topic-in-discourse/63723/3 "2017-06-01T11:02:40Z")

</div>

I have already checked into docs. Please let me know url if I missed it .

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [1 juni 2017 om 11:06 UTC](https://meta.discourse.org/t/do-we-have-any-api-or-way-to-get-latest-post-details-for-a-particular-topic-in-discourse/63723/4 "2017-06-01T11:06:28Z")

</div>

> **[Discourse API Docs](https://docs.discourse.org/#tag/Topics%2Fpaths%2F~1t~1%7Bid%7D.json%2Fget)**

---

<div class="post-metadata">

### Author: ![Aaditya\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Aaditya\_Agrawal](https://meta.discourse.org/u/Aaditya_Agrawal)
#### Post date: [1 juni 2017 om 11:29 UTC](https://meta.discourse.org/t/do-we-have-any-api-or-way-to-get-latest-post-details-for-a-particular-topic-in-discourse/63723/5 "2017-06-01T11:29:28Z")

</div>

Thanks. This will get me list of all posts for a particular topic.  
**My goal** : Get a latest post for each topic from a certain category.  
**Pros** : I can get required solution to satisfy my solution.  
**Cons** : Due to multiple API calls for each topic, user experience will get deteriorated by a measurable factor.

_Do you have any suggestion or approach to satisfy my above goal ?_

---

<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: [1 juni 2017 om 11:32 UTC](https://meta.discourse.org/t/do-we-have-any-api-or-way-to-get-latest-post-details-for-a-particular-topic-in-discourse/63723/6 "2017-06-01T11:32:11Z")

</div>

You probably want to setup a webhook if your goal is to find out when someone posts to a topic. A webhook can trigger on a new topic creation, new post, or when a new user was created. A webhook will send you a POST request to a specified endpoint that you setup so it will be significantly less api calls.
