curl --request GET \
--url https://server.promptwatch.com/api/v2/analytics/visitors/top-pages \
--header 'X-API-Key: <api-key>'import requests
url = "https://server.promptwatch.com/api/v2/analytics/visitors/top-pages"
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/analytics/visitors/top-pages', 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/analytics/visitors/top-pages",
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/analytics/visitors/top-pages"
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/analytics/visitors/top-pages")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.promptwatch.com/api/v2/analytics/visitors/top-pages")
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{
"data": [
{
"name": "/pricing",
"value": 1840
},
{
"name": "/blog/geo-guide",
"value": 920
}
]
}{
"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."
}{
"error": "Unauthorized",
"message": "Missing or invalid X-API-Key header."
}Top Pages
Get top pages by visitor count. Projects with no recorded visitor analytics return an empty data array.
curl --request GET \
--url https://server.promptwatch.com/api/v2/analytics/visitors/top-pages \
--header 'X-API-Key: <api-key>'import requests
url = "https://server.promptwatch.com/api/v2/analytics/visitors/top-pages"
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/analytics/visitors/top-pages', 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/analytics/visitors/top-pages",
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/analytics/visitors/top-pages"
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/analytics/visitors/top-pages")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.promptwatch.com/api/v2/analytics/visitors/top-pages")
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{
"data": [
{
"name": "/pricing",
"value": 1840
},
{
"name": "/blog/geo-guide",
"value": 920
}
]
}{
"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."
}{
"error": "Unauthorized",
"message": "Missing or invalid X-API-Key header."
}Authorizations
API key for authentication. Get yours from the Promptwatch dashboard under Settings > API Keys.
Query Parameters
Start date for analytics data (YYYY-MM-DD). Max range 60 days.
End date for analytics data (YYYY-MM-DD). Max range 60 days.
Filter by AI referrer domains (repeat param for multiple). Allowed: chatgpt.com, gemini.google.com, perplexity.ai, copilot.microsoft.com, copilot.com, claude.ai, grok.com, chat.mistral.ai
chatgpt.com, gemini.google.com, perplexity.ai, copilot.microsoft.com, copilot.com, claude.ai, grok.com, chat.mistral.ai IANA timezone for date bucketing (e.g., 'America/Los_Angeles')
Filter by specific page path
Path matching mode: 'exact' for exact match, 'partial' for prefix match (default: 'partial')
exact, partial Filter by geographic location (ISO 3166-1 alpha-2 country code, e.g. US, GB, DE)
AD, AE, AF, AG, AI, AL, AM, AO, AR, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BM, BN, BO, BR, BS, BT, BW, BY, BZ, CA, CD, CF, CG, CH, CI, CL, CM, CN, CO, CR, CU, CV, CW, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, ES, ET, FI, FJ, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GT, GU, GW, GY, HK, HN, HR, HT, HU, ID, IE, IL, IM, IN, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KN, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MG, MK, ML, MM, MN, MO, MP, MQ, MR, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NG, NI, NL, NO, NP, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PR, PS, PT, PY, QA, RE, RO, RS, RU, RW, SA, SC, SD, SE, SG, SI, SK, SL, SN, SO, SR, SS, SV, SX, SZ, TC, TD, TG, TH, TJ, TM, TN, TR, TT, TW, TZ, UA, UG, US, UY, UZ, VC, VE, VG, VI, VN, XK, YE, YT, ZA, ZM, ZW Response
Default Response
Show child attributes
Show child attributes