# Getting Post ID with Topic ID - API Help Needed

**URL:** <https://meta.discourse.org/t/getting-post-id-with-topic-id-api-help-needed/44239>\
**Category:** Development\
**Created:** [14 במאי,‏ 2016,‏ 1:20pm UTC](https://meta.discourse.org/t/getting-post-id-with-topic-id-api-help-needed/44239 "2016-05-14T13:20:31Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)\
**Post date:** [28 ביולי,‏ 2021,‏ 6:30pm UTC](https://meta.discourse.org/t/getting-post-id-with-topic-id-api-help-needed/44239/8 "2021-07-28T18:30:22Z")

</div>

> [@fefrei](#):
>
> A `GET` to `https://meta.discourse.org/t/44239.json` returns an object where `post_stream.posts[0].id = 194190` .

This is helpful. One thing I wanted to note, don’t forget the term “data” when parsing the response. The form of the response is: `{"data":{"post_stream":{"posts":[{"id":...`

So if you are looking to get the id of the topic post (ie, the first post in the topic), the syntax would be `response.data.post_stream.posts[0].id`

---

_[View the full topic](https://meta.discourse.org/t/getting-post-id-with-topic-id-api-help-needed/44239)._
