Skip to content

Reports by URL

Finds saved tests matching a URL and returns compact recent run summaries.

Use this endpoint when an integration knows a page URL but does not know whether the account already has saved Sleepwalker results for it.

GET /v1/reports/by-url
HeaderRequiredValue
AuthorizationYesBearer sw_api_live_...

Required scope:

runs:read
ParameterTypeRequiredDescription
urlstringYesURL to look up.
test_typestringNoFilter to ai_citations or content_intelligence.
daysintegerNoLookback window. Clamped between 1 and 365. Defaults to 90.
limitintegerNoMatches per URL. Clamped between 1 and 20. Defaults to 5.
Terminal window
curl -s "https://api.sleepwalker.ai/v1/reports/by-url?url=https%3A%2F%2Fwww.sleepwalker.ai&limit=3" \
-H "Authorization: Bearer sw_api_live_..."

The same request in Python and JavaScript:

Python
import requests
resp = requests.get(
"https://api.sleepwalker.ai/v1/reports/by-url",
headers={"Authorization": "Bearer sw_api_live_..."},
params={"url": "https://www.sleepwalker.ai", "limit": 3},
)
resp.raise_for_status()
print(resp.json())
JavaScript
const params = new URLSearchParams({ url: "https://www.sleepwalker.ai", limit: "3" });
const resp = await fetch(`https://api.sleepwalker.ai/v1/reports/by-url?${params}`, {
headers: { Authorization: "Bearer sw_api_live_..." },
});
const data = await resp.json();
console.log(data);
{
"url": "https://www.sleepwalker.ai",
"test_type": null,
"days": 90,
"limit": 3,
"match_count": 1,
"matches": [
{
"test": {
"id": "47d0f0e2-...",
"name": "Homepage",
"brand_name": "Sleepwalker",
"test_type": "ai_citations",
"url": "https://www.sleepwalker.ai"
},
"runs": [
{
"id": "6a75b22b-...",
"status": "completed",
"created_at": "2026-06-04T09:00:00Z",
"overall_score": 75,
"overall_band": "Good"
}
]
}
],
"excluded_test_types": ["technical_monitoring"]
}
  • The response is compact. Use returned run IDs with result endpoints when you need full structured results.
  • URL matching uses Sleepwalker’s normalized URL lookup.
  • This endpoint reads saved-test reports. For direct infrastructure runs, use the run-specific list/status endpoints.
StatusMeaning
400Missing URL or unsupported test_type.
401Missing or invalid API key.
403API key is missing runs:read.