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

url = "https://api.beyondwords.io/v1/projects/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/projects/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/projects/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/projects/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/projects/analytics")
.header("X-Api-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.beyondwords.io/v1/projects/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
[
  {
    "id": 1456,
    "title": "Project title",
    "listens": 29103,
    "avg_listen_time": 243,
    "avg_listen_duration": 86.52,
    "created": "2099-12-31 23:59:59 UTC"
  }
]

Authorizations

X-Api-Key
string
header
required

Query Parameters

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
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.

pagination[limit]
integer

'limit' sets the number of results to return in each page.

pagination[offset]
integer

'offset' sets the first position to return from the results of the query. The default is 0, which starts the page at the first result.

order[by]
enum<string>

This is used to order analytics by number of listens or average listen time or average listen duration

Available options:
listens,
avg_listen_time,
avg_listen_duration
order[dir]
enum<string>

This is used to order analytics in the ascending or descending order

Available options:
asc,
desc
access_tiers[]
string[]

The access tiers to fetch data for

filter[title]
string

Response

200 - application/json

OK

id
string

Project identifier

title
string

Project title

listens
integer

Total number of plays (audio or video)

avg_listen_time
integer

Average play time per session in seconds (audio or video). This metric may be understated when play progress is stored as every 10% milestone event per session instead of only a final event.

avg_listen_duration
number

Average percentage of the item consumed (0-100). This metric may be understated when play progress is stored as every 10% milestone event per session instead of only a final event.

created
string<date-time>

Time at which the project was created (ISO 8601)