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.
Endpoint
Section titled “Endpoint”GET /v1/reports/by-urlAuthentication
Section titled “Authentication”| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer sw_api_live_... |
Required scope:
runs:readQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to look up. |
test_type | string | No | Filter to ai_citations or content_intelligence. |
days | integer | No | Lookback window. Clamped between 1 and 365. Defaults to 90. |
limit | integer | No | Matches per URL. Clamped between 1 and 20. Defaults to 5. |
Example Request
Section titled “Example Request”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:
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())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);Response
Section titled “Response”{ "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.
Errors
Section titled “Errors”| Status | Meaning |
|---|---|
400 | Missing URL or unsupported test_type. |
401 | Missing or invalid API key. |
403 | API key is missing runs:read. |