curl --request GET \
--url https://www.getsurfaced.ai/api/v1/analytics/summary \
--header 'Authorization: Bearer <token>' \
--header 'X-Workspace-Id: <x-workspace-id>'import requests
url = "https://www.getsurfaced.ai/api/v1/analytics/summary"
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Workspace-Id': '<x-workspace-id>', Authorization: 'Bearer <token>'}
};
fetch('https://www.getsurfaced.ai/api/v1/analytics/summary', 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://www.getsurfaced.ai/api/v1/analytics/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$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://www.getsurfaced.ai/api/v1/analytics/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.getsurfaced.ai/api/v1/analytics/summary")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getsurfaced.ai/api/v1/analytics/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": "<string>",
"to": "<string>",
"current": {
"totalResponses": 123,
"brandMentions": 123,
"brandVisibilityMentions": 123,
"textMentions": 123,
"inlineLinkMentions": 123,
"citationMentions": 123,
"responsesWithCitations": 123,
"brandVisibility": 123,
"citationRate": 123,
"avgSentiment": 123,
"avgPosition": 123,
"shareOfVoice": 123,
"sentimentDistribution": {
"positive": 123,
"neutral": 123,
"negative": 123
}
},
"previous": {
"totalResponses": 123,
"brandMentions": 123,
"brandVisibilityMentions": 123,
"textMentions": 123,
"inlineLinkMentions": 123,
"citationMentions": 123,
"responsesWithCitations": 123,
"brandVisibility": 123,
"citationRate": 123,
"avgSentiment": 123,
"avgPosition": 123,
"shareOfVoice": 123,
"sentimentDistribution": {
"positive": 123,
"neutral": 123,
"negative": 123
}
},
"platforms": [
{
"provider": "<string>",
"totalResponses": 123,
"brandMentions": 123,
"brandVisibilityMentions": 123,
"citationMentions": 123,
"responsesWithCitations": 123,
"avgSentiment": 123,
"avgPosition": 123,
"visibility": 123,
"previousVisibility": 123
}
],
"competitors": [
{
"entityId": "<string>",
"name": "<string>",
"domain": "<string>",
"brandColor": "<string>",
"isBrand": true,
"isTracked": true,
"mentionCount": 123,
"totalResponses": 123,
"avgPosition": 123
}
]
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}Get the visibility summary
The headline numbers behind the Analytics page for a window: brand visibility, citation rate, average position, sentiment and share of voice (current), the same over the equally long window before it (previous, to compute change), a per-AI-platform breakdown and the most-mentioned entities (competitors, which includes the brand itself with isBrand: true). Rates are percentages (0 to 100). Everything is measured over the workspace’s tracking runs, so a brand that has not run yet returns zeros and nulls rather than 404. The plan’s history window clamps from: the response from is the window actually measured. Competitor entityIds can be pinned with POST /competitors. Requires the view_content permission.
curl --request GET \
--url https://www.getsurfaced.ai/api/v1/analytics/summary \
--header 'Authorization: Bearer <token>' \
--header 'X-Workspace-Id: <x-workspace-id>'import requests
url = "https://www.getsurfaced.ai/api/v1/analytics/summary"
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Workspace-Id': '<x-workspace-id>', Authorization: 'Bearer <token>'}
};
fetch('https://www.getsurfaced.ai/api/v1/analytics/summary', 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://www.getsurfaced.ai/api/v1/analytics/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$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://www.getsurfaced.ai/api/v1/analytics/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.getsurfaced.ai/api/v1/analytics/summary")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getsurfaced.ai/api/v1/analytics/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": "<string>",
"to": "<string>",
"current": {
"totalResponses": 123,
"brandMentions": 123,
"brandVisibilityMentions": 123,
"textMentions": 123,
"inlineLinkMentions": 123,
"citationMentions": 123,
"responsesWithCitations": 123,
"brandVisibility": 123,
"citationRate": 123,
"avgSentiment": 123,
"avgPosition": 123,
"shareOfVoice": 123,
"sentimentDistribution": {
"positive": 123,
"neutral": 123,
"negative": 123
}
},
"previous": {
"totalResponses": 123,
"brandMentions": 123,
"brandVisibilityMentions": 123,
"textMentions": 123,
"inlineLinkMentions": 123,
"citationMentions": 123,
"responsesWithCitations": 123,
"brandVisibility": 123,
"citationRate": 123,
"avgSentiment": 123,
"avgPosition": 123,
"shareOfVoice": 123,
"sentimentDistribution": {
"positive": 123,
"neutral": 123,
"negative": 123
}
},
"platforms": [
{
"provider": "<string>",
"totalResponses": 123,
"brandMentions": 123,
"brandVisibilityMentions": 123,
"citationMentions": 123,
"responsesWithCitations": 123,
"avgSentiment": 123,
"avgPosition": 123,
"visibility": 123,
"previousVisibility": 123
}
],
"competitors": [
{
"entityId": "<string>",
"name": "<string>",
"domain": "<string>",
"brandColor": "<string>",
"isBrand": true,
"isTracked": true,
"mentionCount": 123,
"totalResponses": 123,
"avgPosition": 123
}
]
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}Authorizations
API key (sk_live_...) created at https://www.getsurfaced.ai/app/settings/account/api-keys
Headers
Query Parameters
unbranded is discovery visibility (prompts that do not name the brand), branded is defensive visibility, all (default) is both plus unclassified prompts. The Analytics page defaults to unbranded, so pass it to reproduce the page's numbers.
all, branded, unbranded