# Extracting 'last visit' info by using the API

**URL:** https://meta.discourse.org/t/extracting-last-visit-info-by-using-the-api/52618
**Category:** Support
**Created:** [November 7, 2016, 1:36pm UTC](https://meta.discourse.org/t/extracting-last-visit-info-by-using-the-api/52618 "2016-11-07T13:36:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Scharf](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david_scharf/32/121389_2.png) [@David\_Scharf](https://meta.discourse.org/u/David_Scharf)
#### Post date: [November 7, 2016, 1:36pm UTC](https://meta.discourse.org/t/extracting-last-visit-info-by-using-the-api/52618/1 "2016-11-07T13:36:12Z")

</div>

Is there currently a way to extract the ‘last visit’ marker location (as in, which is the newest post after the last visit) via the API? I have had a look at what I get from hitting the ‘latest.json’ endpoint, and was assuming there might be a way to derive the location of the last visit from there, but I don’t think that info is in there. Or is it? Any help is greatly appreciated on this. Thanks!

PS: In case you’re wondering about the use case, we’re just trying to integrate discourse better into our community page, and want to alert users if there is new content available for them.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [November 7, 2016, 1:43pm UTC](https://meta.discourse.org/t/extracting-last-visit-info-by-using-the-api/52618/2 "2016-11-07T13:43:57Z")

</div>

You need both latest.json and user.json:

> **[@Falco](https://meta.discourse.org/users/Falco.json)**

[https://meta.discourse.org/latest.json](https://meta.discourse.org/latest.json)

Every topic where `bumped_at` is more recent that the user `last_seen_at` is above the line.

---

<div class="post-metadata">

### Author: ![David\_Scharf](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david_scharf/32/121389_2.png) [@David\_Scharf](https://meta.discourse.org/u/David_Scharf)
#### Post date: [November 7, 2016, 2:00pm UTC](https://meta.discourse.org/t/extracting-last-visit-info-by-using-the-api/52618/3 "2016-11-07T14:00:41Z")

</div>

Wow, thanks for the fast answer. Sounds good, that’s how I’ll do it then.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 25, 2019, 4:28pm UTC](https://meta.discourse.org/t/extracting-last-visit-info-by-using-the-api/52618/4 "2019-03-25T16:28:46Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 24, 2019, 4:28pm UTC](https://meta.discourse.org/t/extracting-last-visit-info-by-using-the-api/52618/5 "2019-04-24T16:28:49Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
