List Site Diagnostics
curl --request GET \
--url https://api.scrunchai.com/v1/{brand_id}/site-diagnostics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scrunchai.com/v1/{brand_id}/site-diagnostics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.scrunchai.com/v1/{brand_id}/site-diagnostics', 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.scrunchai.com/v1/{brand_id}/site-diagnostics",
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>"
],
]);
$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.scrunchai.com/v1/{brand_id}/site-diagnostics"
req, _ := http.NewRequest("GET", url, nil)
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://api.scrunchai.com/v1/{brand_id}/site-diagnostics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrunchai.com/v1/{brand_id}/site-diagnostics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"total": 123,
"items": [
{
"path": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"model_version": "<string>",
"scores": {
"retrievability": 123,
"citeability": 123
},
"content_sha1": "<string>",
"opportunities": [],
"strengths": [],
"optimization_status": "pending",
"acknowledged_at": "2023-11-07T05:31:56Z"
}
],
"offset": 0,
"limit": 123,
"metadata": {
"aggregation_granularity": "daily",
"period_count": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"top_domains": {
"domains": [
{
"domain": "<string>",
"domain_owner": "<string>",
"observation_count": 123
}
],
"grand_total": 123,
"owner_totals": {},
"owner_time_series": [
{
"time_bucket": "<string>",
"brand": 123,
"competitor": 123,
"other": 123
}
],
"segment_totals": [
{
"name": "<string>",
"observation_count": 123
}
]
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Site Diagnostics API
List Site Diagnostics
List the latest diagnostics per page for a brand — its AI-visibility scores, the opportunities to improve it (opportunities), and what it already does well (strengths).
Pass one or more path params (e.g. ?path=/about&path=/pricing) to scope to specific pages; omit them to page through every audited path. Paths are matched normalized (case-insensitive, trailing slash ignored). Each path returns only its most recent audit.
GET
/
{brand_id}
/
site-diagnostics
List Site Diagnostics
curl --request GET \
--url https://api.scrunchai.com/v1/{brand_id}/site-diagnostics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scrunchai.com/v1/{brand_id}/site-diagnostics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.scrunchai.com/v1/{brand_id}/site-diagnostics', 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.scrunchai.com/v1/{brand_id}/site-diagnostics",
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>"
],
]);
$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.scrunchai.com/v1/{brand_id}/site-diagnostics"
req, _ := http.NewRequest("GET", url, nil)
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://api.scrunchai.com/v1/{brand_id}/site-diagnostics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrunchai.com/v1/{brand_id}/site-diagnostics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"total": 123,
"items": [
{
"path": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"model_version": "<string>",
"scores": {
"retrievability": 123,
"citeability": 123
},
"content_sha1": "<string>",
"opportunities": [],
"strengths": [],
"optimization_status": "pending",
"acknowledged_at": "2023-11-07T05:31:56Z"
}
],
"offset": 0,
"limit": 123,
"metadata": {
"aggregation_granularity": "daily",
"period_count": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"top_domains": {
"domains": [
{
"domain": "<string>",
"domain_owner": "<string>",
"observation_count": 123
}
],
"grand_total": 123,
"owner_totals": {},
"owner_time_series": [
{
"time_bucket": "<string>",
"brand": 123,
"competitor": 123,
"other": 123
}
],
"segment_totals": [
{
"name": "<string>",
"observation_count": 123
}
]
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Restrict to these page paths. Repeat for multiple.
Maximum number of pages to return.
Required range:
1 <= x <= 200Number of pages to skip (pagination).
Required range:
x >= 0