# Can't retrieve posts with API

**URL:** <https://meta.discourse.org/t/cant-retrieve-posts-with-api/255455>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [February 17, 2023, 8:56am UTC](https://meta.discourse.org/t/cant-retrieve-posts-with-api/255455 "2023-02-17T08:56:52Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [February 17, 2023, 11:28am UTC](https://meta.discourse.org/t/cant-retrieve-posts-with-api/255455/4 "2023-02-17T11:28:31Z")

</div>

> [@smejak](#):
>
> where the ID was taken from the URL of the particular post I was looking at

The number in the URL is not the ID, that’s the post number, which is relative to the topic ID.  
If you want to get the post ID you can retrieve it from the topic json as `post_stream.posts[].id`

So the posts in this topic have

| topic ID | post\_number | ID |
| --- | --- | --- |
| 255455 | 1 | 1241013 |
| 255455 | 2 | 1241026 |
| 255455 | 3 | 1241056 |

and your most recent post in this topic is [https://meta.discourse.org/posts/1241056.json](https://meta.discourse.org/posts/1241056.json)

---

_[View the full topic](https://meta.discourse.org/t/cant-retrieve-posts-with-api/255455)._
