Skip to main content
Base URL: https://analytics.superlines.io/api All endpoints require authentication via Bearer token.

Metrics

GET /analytics/metrics

Retrieve core metrics for a brand. Query parameters:
ParameterTypeRequiredDescription
domainIdstringYesBrand domain ID
startDatestringNoStart date (YYYY-MM-DD)
endDatestringNoEnd date (YYYY-MM-DD)
granularitystringNototal, daily, weekly, monthly
metricsstringNoComma-separated: brand_visibility, citation_rate, mentions, share_of_voice
groupBystringNollm_service, country, topic
Example:
curl -H "Authorization: Bearer $API_KEY" \
  "https://analytics.superlines.io/api/analytics/metrics?domainId=abc123&startDate=2025-01-01&endDate=2025-01-31&granularity=weekly"
Response:
{
  "success": true,
  "data": {
    "metrics": {
      "brand_visibility": {
        "value": 32.5,
        "change": 2.1,
        "trend": "up"
      },
      "citation_rate": {
        "value": 18.7,
        "change": -0.5,
        "trend": "down"
      },
      "share_of_voice": {
        "value": 22.3,
        "change": 1.8,
        "trend": "up"
      }
    }
  }
}

Citations

GET /analytics/citations

Get citation data (domain or URL level).
ParameterTypeRequiredDescription
domainIdstringYesBrand domain ID
aggregateBystringNodomain or url
startDate / endDatestringNoDate range
limitnumberNoMax results

Brand mentions

GET /analytics/brand-mentions

Get brand mention data with sentiment.
ParameterTypeRequiredDescription
domainIdstringYesBrand domain ID
startDate / endDatestringNoDate range
groupBystringNobrand, llm_service, country

Prompts

GET /analytics/prompts

List tracked prompts for a brand.
ParameterTypeRequiredDescription
domainIdstringYesBrand domain ID
statusstringNoactive, paused, all
labelstringNoFilter by label
limit / offsetnumberNoPagination

Weekly performance

GET /analytics/weekly-performance

Get week-over-week trends.
ParameterTypeRequiredDescription
domainIdstringYesBrand domain ID
weeksBacknumberNoNumber of weeks (default: 4)
metricsstringNoComma-separated metrics

Competitors

GET /analytics/competitor-insights

Get competitor ranking data.
ParameterTypeRequiredDescription
domainIdstringYesBrand domain ID
startDate / endDatestringNoDate range
topNnumberNoNumber of competitors (default: 10)

Content opportunities

GET /analytics/content-opportunities

Find topics with high volume but low brand visibility.
ParameterTypeRequiredDescription
domainIdstringYesBrand domain ID
minMentionsnumberNoMin response count (default: 3)

Dashboard insights

GET /analytics/dashboard-insights

High-level summary suitable for dashboard display.
ParameterTypeRequiredDescription
domainIdstringYesBrand domain ID

Rate limits

PlanRequests/minute
Starter60
Growth120
Enterprise300
Exceeding the rate limit returns a 429 status code. Implement exponential backoff in your integration.

Response format

All responses use this structure:
{
  "success": true,
  "data": { ... },
  "meta": {
    "total": 100,
    "limit": 10,
    "offset": 0
  }
}
Error responses:
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or expired token"
  }
}