# Using the Content API to get the next post by published date

**URL:** <https://forum.ghost.org/t/using-the-content-api-to-get-the-next-post-by-published-date/8016>\
**Category:** Developer help\
**Created:** [June 28, 2019, 7:29pm UTC](https://forum.ghost.org/t/using-the-content-api-to-get-the-next-post-by-published-date/8016 "2019-06-28T19:29:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mithrilhall](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mithrilhall/32/3883_2.png) [@Mithrilhall](https://forum.ghost.org/u/Mithrilhall)\
**Post date:** [June 28, 2019, 7:29pm UTC](https://forum.ghost.org/t/using-the-content-api-to-get-the-next-post-by-published-date/8016/1 "2019-06-28T19:29:23Z")

</div>

I’m having issues getting the next post by ‘published\_at’ date using the following API call. It always give me back the first post rather than the next one.

```
https://<host>.ghost.io/ghost/api/v2/content/posts/?key=<key>&include=author,authors,tags&filter=published_at:%3E2019-06-18T21%3A17%3A47.000%2Bslug:-nulla-semper-euismod&limit=1
```

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [July 1, 2019, 10:46am UTC](https://forum.ghost.org/t/using-the-content-api-to-get-the-next-post-by-published-date/8016/2 "2019-07-01T10:46:20Z")

</div>

@Mithrilhall have you tried using the `order` parameter? `order=published_at asc` should be what you’re looking for.

> **[Ghost Content API Documentation](https://ghost.org/docs/content-api/)**
>
> Ghost's RESTful Content API delivers published content to the world and can be accessed by any client to render a website. Read more on Ghost Docs.

---

<div class="post-metadata">

**Author:** ![Mithrilhall](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mithrilhall/32/3883_2.png) [@Mithrilhall](https://forum.ghost.org/u/Mithrilhall)\
**Post date:** [July 1, 2019, 1:38pm UTC](https://forum.ghost.org/t/using-the-content-api-to-get-the-next-post-by-published-date/8016/3 "2019-07-01T13:38:35Z")

</div>

Thank you. That worked perfectly.
