# How to get concurrent live viewers via REST API?

**URL:** https://community.wowza.com/t/how-to-get-concurrent-live-viewers-via-rest-api/52903
**Category:** Wowza Developer Dojo
**Created:** [February 25, 2019, 3:19pm UTC](https://community.wowza.com/t/how-to-get-concurrent-live-viewers-via-rest-api/52903 "2019-02-25T15:19:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Mikael\_LA\_nnroth](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@Mikael\_LA\_nnroth](https://community.wowza.com/u/Mikael_LA_nnroth)
#### Post date: [February 25, 2019, 3:19pm UTC](https://community.wowza.com/t/how-to-get-concurrent-live-viewers-via-rest-api/52903/1 "2019-02-25T15:19:57Z")

</div>

I’m a bit lost here. In the Java SDK there is the connectioncounts call but in the cloud API I can only find live\_streams/xxx/stats which gives something called “unique\_views” wich “begins to update approximately 2 hours after the stream starts and then updates approximately hourly”.

So, basically, if I want to show a small overlay with the current concurrent live viewers on a video. How do I get that information from the cloud? 🙂

---

<div class="post-metadata">

### Author: ![Andrew\_Kennedy1](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew\_Kennedy1](https://community.wowza.com/u/Andrew_Kennedy1)
#### Post date: [March 11, 2019, 12:25pm UTC](https://community.wowza.com/t/how-to-get-concurrent-live-viewers-via-rest-api/52903/2 "2019-03-11T12:25:09Z")

</div>

Hi,

For the Cloud REST API you should be able to use

[https://sandbox.cloud.wowza.com/api/current/docs#operation/showViewerDataStreamTarget](https://sandbox.cloud.wowza.com/api/current/docs#operation/showViewerDataStreamTarget)

I am not sure how ‘live’ the data is.

Andrew.

---

<div class="post-metadata">

### Author: ![Stephan\_Grallert](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@Stephan\_Grallert](https://community.wowza.com/u/Stephan_Grallert)
#### Post date: [March 27, 2020, 8:04pm UTC](https://community.wowza.com/t/how-to-get-concurrent-live-viewers-via-rest-api/52903/3 "2020-03-27T20:04:42Z")

</div>

We have the same issue of getting actual live listener data via the API. Is there such a thing at all?

We found two resources, but they appear to be equally disfunctional:

1. /usage/stream\_targets/y7tm2dfl/live leads to

```auto
{
    "meta": {
        "status": 403,
        "code": "ERR-403-RecordUnaccessible",
        "title": "Record Unaccessible Error",
        "message": "The requested resource isn't accessible.",
        "description": ""
    },
    "request_id": "def6744dc2d7a609c61f488560b80019",
    "request_timestamp": "2020-03-27T19:54:14.443Z"
}

```

1. /usage/viewer\_data/stream\_targets/y7tm2dfl leads to

```auto
{
    "meta": {
        "status": 404,
        "code": "ERR-404-RouteNotFound",
        "title": "Route Not Found Error",
        "message": "The requested endpoint couldn't be found.",
        "description": ""
    },
    "request_id": "11dce4349e0b97011820a39032d9664a",
    "request_timestamp": "2020-03-27T19:56:01.637Z"
}

```

**y7tm2dfl** is one of the two stream target ids, we get from calling /live\_streams/nfpvspdh/stats

Did anybody manage to get actual live viewer data from the cloud api?

Thx a lot!

---

<div class="post-metadata">

### Author: ![video\_streaming](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@video\_streaming](https://community.wowza.com/u/video_streaming)
#### Post date: [March 30, 2020, 4:12pm UTC](https://community.wowza.com/t/how-to-get-concurrent-live-viewers-via-rest-api/52903/4 "2020-03-30T16:12:35Z")

</div>

Sorry for the delay, checking for you…

---

<div class="post-metadata">

### Author: ![Cassidy\_Reilly](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Cassidy\_Reilly](https://community.wowza.com/u/Cassidy_Reilly)
#### Post date: [March 30, 2020, 7:49pm UTC](https://community.wowza.com/t/how-to-get-concurrent-live-viewers-via-rest-api/52903/5 "2020-03-30T19:49:19Z")

</div>

Hello, to get the “Current Unique Viewers”, which is defined as _“the number of unique viewers for the stream in the last 90 seconds”,_ That is only available with Fastly Stream Targets in api 1.4 (not akamai 1.3).

```auto
/api/v1.4/usage/stream_targets/<id>/live

```

```auto
{
  "stream_target": {
    "id": "hhphnpjb",
    "unique_viewers": 0
  }
}

```

I want to emphasize this is only available with [Fastly Stream Targets.](https://www.wowza.com/docs/add-and-manage-stream-targets-in-wowza-streaming-cloud)
