Runs
Get run stats
Return aggregate statistics for a specific run.
GET
/
v1
/
runs
/
{runId}
/
stats
Get run stats
curl --request GET \
--url https://api.example.com/v1/runs/{runId}/statsimport requests
url = "https://api.example.com/v1/runs/{runId}/stats"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/runs/{runId}/stats', 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.example.com/v1/runs/{runId}/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/runs/{runId}/stats"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/runs/{runId}/stats")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/runs/{runId}/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"metrics": {}
}Returns the same metrics object available in the runs list, but for a single run by ID. Useful when you already know the
runId and want metrics without fetching the full list.
Path parameters
Request
curl -s \
-H "x-spotlight-api-key: YOUR_API_KEY" \
"https://app.get-spotlight.com/api/v1/runs/RUN_ID/stats"
Response
{
"id": "run-uuid-123",
"brandId": "brand-uuid-123",
"startedAt": "2025-02-01T10:00:00Z",
"metrics": {
"present": 120,
"positive": 80,
"negative": 20,
"neutral": 20,
"responsesWithBrands": 100,
"totalResponses": 150,
"completedResponses": 150,
"averageRank": 1.8,
"mentionedBrandsRun": {
"competitor-x": 45,
"competitor-y": 30
},
"topics": {
"Pricing": { "present": 40, "positive": 30 },
"Support": { "present": 30, "negative": 5 }
},
"calculatedAt": "2025-02-01T10:30:00Z"
}
}
⌘I
Get run stats
curl --request GET \
--url https://api.example.com/v1/runs/{runId}/statsimport requests
url = "https://api.example.com/v1/runs/{runId}/stats"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/runs/{runId}/stats', 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.example.com/v1/runs/{runId}/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/runs/{runId}/stats"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/runs/{runId}/stats")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/runs/{runId}/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"metrics": {}
}
