# Use discourse\_post\_id to get single topic data from API

**URL:** https://meta.discourse.org/t/use-discourse-post-id-to-get-single-topic-data-from-api/48132
**Category:** WordPress
**Created:** [August 2, 2016, 9:43pm UTC](https://meta.discourse.org/t/use-discourse-post-id-to-get-single-topic-data-from-api/48132 "2016-08-02T21:43:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jenkma02](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jenkma02/32/120687_2.png) [@jenkma02](https://meta.discourse.org/u/jenkma02)
#### Post date: [August 2, 2016, 9:43pm UTC](https://meta.discourse.org/t/use-discourse-post-id-to-get-single-topic-data-from-api/48132/1 "2016-08-02T21:43:03Z")

</div>

I thought that the discourse\_post\_id meta data would work in the API to get single post/topic data (using the “Get a single topic” example on the API documentation - [Discourse REST API Documentation](https://meta.discourse.org/t/discourse-api-documentation/22706)). Unfortunately these numbers don’t match. Has anyone figured out a way to do this? I have a loop of three posts that i would like to display certain statistics on, as well on each post page.

---

<div class="post-metadata">

### Author: ![jenkma02](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jenkma02/32/120687_2.png) [@jenkma02](https://meta.discourse.org/u/jenkma02)
#### Post date: [August 2, 2016, 9:48pm UTC](https://meta.discourse.org/t/use-discourse-post-id-to-get-single-topic-data-from-api/48132/2 "2016-08-02T21:48:17Z")

</div>

I might be answering my own question here, but i think it will work to extract the ID off the end of the discourse\_permalink meta entry. I will give it a shot and post back here/close the topic then.
