Developer Docs

Sight REST API

Programmatic access to AI visibility data. Analyse brands, retrieve LLM scores, and build integrations — all via our clean REST API.

Base URL: https://onsight.nicobarragan.co.nz/api/v1
Version: v1.2.0
Format: JSON

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

POST/analyze

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

NameTypeRequiredDescription
domainstringrequiredThe domain to analyse (e.g. "example.com"). Do not include protocol.
competitorsarrayoptionalUp to 3 competitor domains to compare against. E.g. ["competitor1.com","competitor2.com"]
llmsarrayoptionalSpecific 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"
}
GET/analyze/{id}

Retrieves a previously run analysis by its ID. Useful for polling async analyses or retrieving historical results.

Parameters

NameTypeRequiredDescription
idstringrequiredThe 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"
}
GET/history

Returns paginated analysis history for the authenticated account. Filter by domain or retrieve all analyses.

Parameters

NameTypeRequiredDescription
domainstringoptionalFilter results to a specific domain
limitintegeroptionalResults per page. Default: 20. Max: 100.
pageintegeroptionalPage 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
  }
}
GET/competitors

Returns a competitor visibility comparison for a given domain. All competitor domains must have been analysed within the last 30 days.

Parameters

NameTypeRequiredDescription
domainstringrequiredYour primary domain
competitorsarrayrequiredArray 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.

PlanMonthly callsPer-minute limit
Free0 (API not available)
Pro500 / month10 / minute
EnterpriseUnlimited60 / 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.

StatusCodeMeaning
200OKRequest succeeded
400Bad RequestInvalid or malformed input (e.g. invalid domain format, missing required parameter)
401UnauthorizedMissing or invalid API key
403ForbiddenValid API key but plan limit reached, or endpoint not available on your plan
404Not FoundResource not found (e.g. analysis ID does not exist)
429Too Many RequestsPer-minute rate limit exceeded. Check the Retry-After header.
500Internal Server ErrorUnexpected 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.

v1.2.0March 2026

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.

v1.1.0February 2026

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.

v1.0.0January 2026

Initial public release. Includes POST /analyze, GET /analyze/{id}, and GET /history endpoints. Bearer token authentication. Available on Pro and Enterprise plans.