# Who's online "API"?

**URL:** https://meta.discourse.org/t/whos-online-api/166411
**Category:** Support
**Created:** [October 6, 2020, 5:36pm UTC](https://meta.discourse.org/t/whos-online-api/166411 "2020-10-06T17:36:14Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [October 6, 2020, 5:50pm UTC](https://meta.discourse.org/t/whos-online-api/166411/2 "2020-10-06T17:50:12Z")

</div>

You can pull the data from the whos-online plugin at `/whosonline/get.json`, but note that the URL and the data format shouldn’t really be considered a public API - it could be removed or changed at any time.

Another option is to make a [data explorer](https://meta.discourse.org/t/32566?silent=true) query and [call it with the API](https://meta.discourse.org/t/how-to-run-data-explorer-queries-with-the-discourse-api/120063). A query like this should do essentially the same thing as the whos-online plugin:

```plaintext
SELECT id AS user_id 
FROM users 
WHERE last_seen_at >= NOW() - INTERVAL '5 minutes'

```

---

_[View the full topic](https://meta.discourse.org/t/whos-online-api/166411)._
