Skip to main content
GET
/
organization
/
analytics
Organization analytics
curl --request GET \
  --url https://api.beyondwords.io/v1/organization/analytics \
  --header 'X-Api-Key: <api-key>'
import requests

url = "https://api.beyondwords.io/v1/organization/analytics"

headers = {"X-Api-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};

fetch('https://api.beyondwords.io/v1/organization/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beyondwords.io/v1/organization/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.beyondwords.io/v1/organization/analytics"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-Api-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.beyondwords.io/v1/organization/analytics")
.header("X-Api-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.beyondwords.io/v1/organization/analytics")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "start": "2017-02-01T10:05:03Z,",
    "player_impressions": {
      "total": 67875276,
      "desktop": 14265647,
      "tablet": 998538,
      "mobile_web": 52611091,
      "ios": 0,
      "andriod": 0
    },
    "listens": {
      "total": 313957,
      "desktop": 92501,
      "tablet": 6751,
      "mobile_web": 214705,
      "ios": 0,
      "android": 0
    },
    "listen_rate": {
      "total": 0.46,
      "desktop": 0.65,
      "tablet": 0.68,
      "mobile_web": 0.41,
      "ios": 0,
      "android": 0
    },
    "unique_listeners": {
      "total": 86919,
      "desktop": 18255,
      "tablet": 1308,
      "mobile_web": 67953,
      "ios": 0,
      "android": 0
    },
    "avg_listen_time": {
      "total": 199,
      "desktop": 216,
      "tablet": 183,
      "mobile_web": 190,
      "ios": 0,
      "android": 0
    },
    "avg_listen_duration": {
      "total": 52.05,
      "desktop": 52.89,
      "tablet": 50.88,
      "mobile_web": 51.6,
      "ios": 0,
      "android": 0
    },
    "listen_time": {
      "total": 251364691,
      "desktop": 98599149,
      "tablet": 5830722,
      "mobile_web": 146934820,
      "ios": 0,
      "android": 0
    },
    "listener_retention": {
      "total": [
        1257519,
        1085792,
        937625,
        804105,
        679397,
        562031,
        451122,
        345526,
        245664,
        148510
      ],
      "desktop": [
        454770,
        400038,
        348792,
        300627,
        254450,
        210087,
        167446,
        126271,
        86868,
        48272
      ],
      "tablet": [
        31818,
        27498,
        23544,
        20005,
        16728,
        13704,
        10874,
        8223,
        5752,
        3367
      ],
      "mobile_web": [
        770931,
        658256,
        565289,
        483473,
        408219,
        338240,
        272802,
        211032,
        153044,
        96871
      ],
      "ios": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "android": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ]
    }
  }
]

Authorizations

X-Api-Key
string
header
required

Query Parameters

aggregation
enum<string>
The way to aggregate the analytics. Possible values are all (aggregate all data together),
year (aggregate data on a yearly basis), month (aggregate data on a yearly basis),
week (aggregate data on a yearly basis), day (aggregate data on a yearly basis), or hour
(aggregate data on an hourly basis, limited to a time_range 7 days or less).
Available options:
all,
hour,
day,
week,
month,
year
time_range[start]
string

The start date of the aggregation period. The value of this property should be a string in the format yyyy-mm-dd according to ISO 8601.

time_range[end]
string

The end date of the aggregation period. The value of this property should be a string in the format yyyy-mm-dd according to ISO 8601. If this is set to today, the current day is still in progress and therefore only partial analytics data is returned until the day ends.

metrics[]
string[]

The metrics that you want to fetch data for

media_variants[]
enum<string>[]

The media variants to fetch data for

Available options:
article,
summary
media_formats[]
enum<string>[]

The media formats to fetch data for

Available options:
audio,
video
access_tiers[]
string[]

The access tiers to fetch data for

Response

200 - application/json

OK

start
string<date-time>

The start date of the aggregation period (ISO 8601).

player_impressions
object
listens
object
listen_rate
object
unique_listeners
object
avg_listen_time
object
avg_listen_duration
object
listen_time
object
listener_retention
object