Content Gap Stats
curl --request GET \
--url https://server.promptwatch.com/api/v2/content-gap/stats \
--header 'X-API-Key: <api-key>'import requests
url = "https://server.promptwatch.com/api/v2/content-gap/stats"
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://server.promptwatch.com/api/v2/content-gap/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://server.promptwatch.com/api/v2/content-gap/stats",
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://server.promptwatch.com/api/v2/content-gap/stats"
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://server.promptwatch.com/api/v2/content-gap/stats")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.promptwatch.com/api/v2/content-gap/stats")
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{
"totalPromptsWithCoverage": 180,
"totalPromptsWithoutCoverage": 42,
"averageCoverageScore": 0.61,
"distribution": {
"low": 35,
"medium": 52,
"good": 78,
"excellent": 57
},
"byPromptType": [
{
"category": "ORGANIC",
"averageScore": 0.58,
"count": 90,
"totalPrompts": 120
},
{
"category": "BRAND_SPECIFIC",
"averageScore": 0.72,
"count": 40,
"totalPrompts": 55
}
],
"byIntentType": [
{
"category": "INFORMATIONAL",
"averageScore": 0.62,
"count": 100,
"totalPrompts": 140
},
{
"category": "COMMERCIAL",
"averageScore": 0.55,
"count": 35,
"totalPrompts": 50
}
]
}{
"error": "Bad Request",
"code": "DATE_RANGE_TOO_LARGE",
"message": "Date range cannot exceed 90 days"
}{
"error": "Unauthorized",
"message": "Missing or invalid X-API-Key header."
}{
"code": "CONTENT_GAP_PROMPT_NOT_FOUND",
"message": "Prompt not found"
}Content Gap
Content Gap Stats
Get aggregate content coverage statistics for the project
GET
/
content-gap
/
stats
Content Gap Stats
curl --request GET \
--url https://server.promptwatch.com/api/v2/content-gap/stats \
--header 'X-API-Key: <api-key>'import requests
url = "https://server.promptwatch.com/api/v2/content-gap/stats"
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://server.promptwatch.com/api/v2/content-gap/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://server.promptwatch.com/api/v2/content-gap/stats",
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://server.promptwatch.com/api/v2/content-gap/stats"
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://server.promptwatch.com/api/v2/content-gap/stats")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.promptwatch.com/api/v2/content-gap/stats")
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{
"totalPromptsWithCoverage": 180,
"totalPromptsWithoutCoverage": 42,
"averageCoverageScore": 0.61,
"distribution": {
"low": 35,
"medium": 52,
"good": 78,
"excellent": 57
},
"byPromptType": [
{
"category": "ORGANIC",
"averageScore": 0.58,
"count": 90,
"totalPrompts": 120
},
{
"category": "BRAND_SPECIFIC",
"averageScore": 0.72,
"count": 40,
"totalPrompts": 55
}
],
"byIntentType": [
{
"category": "INFORMATIONAL",
"averageScore": 0.62,
"count": 100,
"totalPrompts": 140
},
{
"category": "COMMERCIAL",
"averageScore": 0.55,
"count": 35,
"totalPrompts": 50
}
]
}{
"error": "Bad Request",
"code": "DATE_RANGE_TOO_LARGE",
"message": "Date range cannot exceed 90 days"
}{
"error": "Unauthorized",
"message": "Missing or invalid X-API-Key header."
}{
"code": "CONTENT_GAP_PROMPT_NOT_FOUND",
"message": "Prompt not found"
}Authorizations
API key for authentication. Get yours from the Promptwatch dashboard under Settings > API Keys.
Query Parameters
Prompt type filter; repeat the parameter for multiple values
Available options:
ORGANIC, BRAND_SPECIFIC, COMPETITOR_COMPARISON Only count analyses with createdAt on or after this day (UTC).
Only count analyses with createdAt on or before this day (UTC).
Response
Default Response
Prompts with at least one coverage score
Prompts with no coverage score yet
Mean score across scored prompts
Count of prompts per score band
Show child attributes
Show child attributes
Breakdown by prompt type
Show child attributes
Show child attributes
Breakdown by intent type
Show child attributes
Show child attributes