Retrieve Prompt Visibility Report
curl --request GET \
--url https://api.lightsage.com/v1/visibility/prompts \
--header 'X-Lightsage-Api-Key: <api-key>'import requests
url = "https://api.lightsage.com/v1/visibility/prompts"
headers = {"X-Lightsage-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Lightsage-Api-Key': '<api-key>'}};
fetch('https://api.lightsage.com/v1/visibility/prompts', 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.lightsage.com/v1/visibility/prompts",
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-Lightsage-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.lightsage.com/v1/visibility/prompts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Lightsage-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.lightsage.com/v1/visibility/prompts")
.header("X-Lightsage-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v1/visibility/prompts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Lightsage-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"company": {
"name": "<string>",
"domain": "<string>",
"logo_url": "<string>",
"relationship": "<string>"
},
"date_range": {
"start_date": "<string>",
"end_date": "<string>",
"latest_run_date": "<string>",
"active_prompts_only": true
},
"has_data": true,
"summary": {
"prompt_count": 123,
"topic_count": 123,
"metrics": {
"visibility_score": 123,
"visibility_score_rank": 123,
"share_of_voice": 123,
"average_position": 123,
"citation_count": 0,
"run_count": 0
}
},
"topics": [
{
"id": "<string>",
"name": "<string>",
"prompt_count": 123,
"metrics": {
"visibility_score": 123,
"visibility_score_rank": 123,
"share_of_voice": 123,
"average_position": 123,
"citation_count": 0,
"run_count": 0
},
"prompts": [
{
"id": "<string>",
"text": "<string>",
"metrics": {
"visibility_score": 123,
"visibility_score_rank": 123,
"share_of_voice": 123,
"average_position": 123,
"citation_count": 0,
"run_count": 0
}
}
]
}
]
}{
"detail": "start_date must be on or before end_date"
}{
"detail": "Configured API Performance scope not found for this organization"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Visibility
Retrieve Prompt Visibility Report
Retrieve the prompt visibility report for the organization.
Mirrors the dashboard Prompts tab with an overall summary, topic rows, and
nested active prompt rows. Each row includes visibility score, visibility
rank, share of voice, average position, owned-domain citations, and prompt
runs for the selected date range. Active prompts without runs remain in the
response with null visibility metrics and zero counts.
GET
/
v1
/
visibility
/
prompts
Retrieve Prompt Visibility Report
curl --request GET \
--url https://api.lightsage.com/v1/visibility/prompts \
--header 'X-Lightsage-Api-Key: <api-key>'import requests
url = "https://api.lightsage.com/v1/visibility/prompts"
headers = {"X-Lightsage-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Lightsage-Api-Key': '<api-key>'}};
fetch('https://api.lightsage.com/v1/visibility/prompts', 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.lightsage.com/v1/visibility/prompts",
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-Lightsage-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.lightsage.com/v1/visibility/prompts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Lightsage-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.lightsage.com/v1/visibility/prompts")
.header("X-Lightsage-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v1/visibility/prompts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Lightsage-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"company": {
"name": "<string>",
"domain": "<string>",
"logo_url": "<string>",
"relationship": "<string>"
},
"date_range": {
"start_date": "<string>",
"end_date": "<string>",
"latest_run_date": "<string>",
"active_prompts_only": true
},
"has_data": true,
"summary": {
"prompt_count": 123,
"topic_count": 123,
"metrics": {
"visibility_score": 123,
"visibility_score_rank": 123,
"share_of_voice": 123,
"average_position": 123,
"citation_count": 0,
"run_count": 0
}
},
"topics": [
{
"id": "<string>",
"name": "<string>",
"prompt_count": 123,
"metrics": {
"visibility_score": 123,
"visibility_score_rank": 123,
"share_of_voice": 123,
"average_position": 123,
"citation_count": 0,
"run_count": 0
},
"prompts": [
{
"id": "<string>",
"text": "<string>",
"metrics": {
"visibility_score": 123,
"visibility_score_rank": 123,
"share_of_voice": 123,
"average_position": 123,
"citation_count": 0,
"run_count": 0
}
}
]
}
]
}{
"detail": "start_date must be on or before end_date"
}{
"detail": "Configured API Performance scope not found for this organization"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Query Parameters
Optional start date. Defaults to 30 days before the end date.
Optional end date. Defaults to today.
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Whether the selected date range contains prompt-run data.
Show child attributes
Show child attributes
Topic and prompt rows shown in the prompt visibility report.
Show child attributes
Show child attributes
⌘I