Getting Started
The Sight API provides programmatic access to AI visibility analysis. You can run brand scans, retrieve historical results, and compare competitor visibility — all via standard HTTP requests.
- Base URL:
https://onsight.nicobarragan.co.nz/api/v1 - Available on: Pro and Enterprise plans (not available on Free tier)
- Authentication: Bearer token in the Authorization header
- Response format: JSON — all responses return
Content-Type: application/json - HTTPS only: All API calls must be made over HTTPS. HTTP requests will be rejected.
To get started, generate an API key from your dashboard (Dashboard → My Profile → Authorized Apps), then include it in the Authorization header of every request as shown in the Authentication section below.
Authentication
All API requests must be authenticated using a Bearer token. Your API key follows the format sk-sight-xxxxxxxxxxxxxxxx — a 32-character alphanumeric string prefixed with sk-sight-.
Generating an API Key
Navigate to Dashboard → My Profile → Authorized Apps → Generate API Key. Your key is shown once — store it securely. You can revoke and regenerate keys at any time.
Using the API Key
Include the key in every request header:
Authorization: Bearer sk-sight-xxxxxxxxxxxxxxxx
Content-Type: application/json
Example cURL request
curl -X GET https://onsight.nicobarragan.co.nz/api/v1/analyze \
-H "Authorization: Bearer sk-sight-xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json"
Never share your API key or include it in client-side code. If your key is compromised, revoke it immediately from the dashboard.
Endpoints
Runs a full AI visibility analysis for a given domain across all tracked LLMs. Returns a job ID that can be polled or retrieved once complete. Analyses typically complete within 30–90 seconds depending on LLM response times.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | required | The domain to analyse (e.g. "example.com"). Do not include protocol. |
| competitors | array | optional | Up to 3 competitor domains to compare against. E.g. ["competitor1.com","competitor2.com"] |
| llms | array | optional | Specific LLMs to query. Defaults to all. Options: "chatgpt", "perplexity", "gemini", "claude", "grok" |
Example Response
{
"id": "an_01hx8kq2b4p9r7m3n6",
"domain": "example.com",
"status": "complete",
"score": 72,
"llm_scores": {
"chatgpt": 78,
"perplexity": 81,
"gemini": 65,
"claude": 70,
"grok": 66
},
"mentions": 1247,
"sentiment": 8.2,
"accuracy": 91,
"created_at": "2026-04-03T09:14:22Z",
"completed_at": "2026-04-03T09:15:05Z"
}
Retrieves a previously run analysis by its ID. Useful for polling async analyses or retrieving historical results.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | required | The analysis ID returned by POST /analyze |
Example Response
{
"id": "an_01hx8kq2b4p9r7m3n6",
"domain": "example.com",
"status": "complete",
"score": 72,
"llm_scores": { ... },
"created_at": "2026-04-03T09:14:22Z"
}
Returns paginated analysis history for the authenticated account. Filter by domain or retrieve all analyses.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | optional | Filter results to a specific domain |
| limit | integer | optional | Results per page. Default: 20. Max: 100. |
| page | integer | optional | Page number for pagination. Default: 1. |
Example Response
{
"data": [
{ "id": "an_01hx8kq2b4p9r7m3n6", "domain": "example.com", "score": 72, "created_at": "..." },
{ "id": "an_01hx7bp1a3n8q6l2m5", "domain": "example.com", "score": 68, "created_at": "..." }
],
"meta": {
"total": 47,
"page": 1,
"limit": 20,
"pages": 3
}
}
Returns a competitor visibility comparison for a given domain. All competitor domains must have been analysed within the last 30 days.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | required | Your primary domain |
| competitors | array | required | Array of competitor domains to compare (max 3) |
Example Response
{
"domain": "example.com",
"score": 72,
"competitors": [
{ "domain": "competitor1.com", "score": 85, "delta": -13 },
{ "domain": "competitor2.com", "score": 61, "delta": +11 }
],
"leader": "competitor1.com",
"generated_at": "2026-04-03T09:15:00Z"
}
Rate Limits
Rate limits are applied per API key. Exceeding a rate limit returns a 429 Too Many Requests response with a Retry-After header indicating when you can retry.
| Plan | Monthly calls | Per-minute limit |
|---|---|---|
| Free | 0 (API not available) | — |
| Pro | 500 / month | 10 / minute |
| Enterprise | Unlimited | 60 / minute |
Monthly limits reset on the first of each calendar month. Overage on Pro plan returns a 403 Forbidden response until the next reset. Enterprise customers can request higher burst limits.
Error Codes
The Sight API uses standard HTTP status codes. All error responses include a JSON body with a code and message field.
| Status | Code | Meaning |
|---|---|---|
| 200 | OK | Request succeeded |
| 400 | Bad Request | Invalid or malformed input (e.g. invalid domain format, missing required parameter) |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Valid API key but plan limit reached, or endpoint not available on your plan |
| 404 | Not Found | Resource not found (e.g. analysis ID does not exist) |
| 429 | Too Many Requests | Per-minute rate limit exceeded. Check the Retry-After header. |
| 500 | Internal Server Error | Unexpected server-side error. If this persists, contact support. |
Error Response Format
{
"error": {
"code": "INVALID_DOMAIN",
"message": "The domain 'not-a-domain' is not a valid hostname.",
"status": 400
}
}
SDKs & Libraries
Official SDKs for Python and JavaScript are coming soon. In the meantime, the API is standard REST over HTTPS with JSON — any HTTP client works out of the box.
Python (requests)
import requests
API_KEY = "sk-sight-xxxxxxxxxxxxxxxx"
BASE_URL = "https://onsight.nicobarragan.co.nz/api/v1"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
# Run an analysis
response = requests.post(f"{BASE_URL}/analyze",
headers=headers,
json={"domain": "example.com", "competitors": ["competitor.com"]}
)
data = response.json()
print(f"Score: {data['score']}")
JavaScript (fetch)
const API_KEY = 'sk-sight-xxxxxxxxxxxxxxxx';
const BASE_URL = 'https://onsight.nicobarragan.co.nz/api/v1';
async function analyzeDomain(domain) {
const res = await fetch(`${BASE_URL}/analyze`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ domain, competitors: [] })
});
const data = await res.json();
console.log('AI Visibility Score:', data.score);
return data;
}
analyzeDOM('example.com');
Changelog
All notable changes to the Sight API are documented here. We use semantic versioning.
Rate limiting improvements — more granular per-minute controls, new Retry-After header on 429 responses. Improved error response format with structured code field. Performance improvements to LLM query pipeline — average analysis time reduced from 90s to 45s.
Added GET /competitors endpoint for direct competitor visibility comparison. Added optional llms parameter to POST /analyze allowing targeted queries to specific AI models. Added GET /history pagination support.
Initial public release. Includes POST /analyze, GET /analyze/{id}, and GET /history endpoints. Bearer token authentication. Available on Pro and Enterprise plans.