# 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:** 3

<div class="post-metadata">

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

</div>

Hi @RGJ, I noticed I’m able to retrieve individual posts if they have been in the list originally retrieved by `posts.json`. I used the code snippet below

```plaintext
url = "https://forum.algovera.ai/posts.json"

username = "algovera"

params = {'Api-Key': api_key, "Api-Username": username}

r = requests.get(url = url, params = params)

data = r.json()

```

Then I tried changing this call to `https://forum.algovera.ai/posts/{id}.json"`, where the ID was taken from the URL of the particular post I was looking at.

---

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