Skip to main content

API Overview

Access Surva.ai data programmatically with the REST API. Retrieve AI visibility scores, brand mentions, competitor data, and citations via API endpoints.

Updated API Reference

API Overview

The Surva.ai API gives you programmatic access to your AI visibility data, brand mentions, competitor intelligence, and content tools. Use it to pull Surva.ai data into your own dashboards, BI tools, client reports, or automated workflows.

Getting Your API Key

Generate an API key from Settings > API Keys. Each key is scoped to your account and carries the same permissions as your user role. Store keys securely - treat them like passwords and never expose them in client-side code.

Authentication

Include your API key as a Bearer token in the Authorization header of every request:

Authorization: Bearer YOUR_API_KEY

Requests without a valid key return HTTP 401. Requests that exceed plan limits return HTTP 403.

Base URL

https://app.surva.ai/api/

Core Endpoints

Prompts (Keywords)

MethodEndpointDescription
GET/api/keywordsList all tracked prompts for your brand
POST/api/keywordsAdd a new prompt to tracking
DELETE/api/keywords/{id}Remove a tracked prompt

AI Visibility

MethodEndpointDescription
GET/api/ai-visibility/overviewOverall visibility summary and platform breakdown
GET/api/citationsURLs cited by AI platforms for your brand
GET/api/brand-llm-mentionsBrand mention records from AI scans
GET/api/competitor-llm-mentionsCompetitor mentions detected during your scans

Competitors

MethodEndpointDescription
GET/api/competitorsList tracked competitors with visibility scores
POST/api/competitorsAdd a competitor by domain
DELETE/api/competitors/{id}Remove a competitor
GET/api/competitor-keywordsKeywords where competitors appear in AI responses

AI Referrals and Crawlers

MethodEndpointDescription
GET/api/ai-referralTraffic arriving from AI platform referrer domains
GET/api/crawler-logsAI bot visit records for your domain
POST/api/crawler-logs/importImport web server access logs for AI bot analysis

Prompt Discovery

MethodEndpointDescription
GET/api/prompt-discovery/promptsDiscovered prompt suggestions for your brand
GET/api/prompt-discovery/related-questionsRelated questions found during scans
POST/api/prompt-discovery/aggregate-questionsTrigger aggregation of new related questions

Brands

MethodEndpointDescription
GET/api/brandsList all brands on your account
POST/api/brandsCreate a new brand

Rate Limits

Rate limits are based on your subscription plan:

  • Starter - 100 requests per hour
  • Growth - 500 requests per hour
  • Business - 2,000 requests per hour

Every response includes rate limit headers so you can track usage:

X-RateLimit-Limit: 500
X-RateLimit-Remaining: 498
X-RateLimit-Reset: 1700000000

Exceeding your rate limit returns HTTP 429 with a Retry-After header.

Response Format

All endpoints return JSON. Successful responses use HTTP 200:

{
  "success": true,
  "data": { ... }
}

Error responses include a structured error object:

{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

Pagination

List endpoints support pagination via query parameters:

GET /api/keywords?page=0&size=50

Paginated responses include total count and page metadata alongside the data array.

Brand Scoping

All data endpoints are scoped to a specific brand. If your account has multiple brands, include the brandId as a query parameter:

GET /api/keywords?brandId=YOUR_BRAND_ID

Retrieve your brand IDs from GET /api/brands. If you omit brandId, the API defaults to your primary brand.

Your competitors are already being recommended by AI. Are you?

Join 1,000+ companies tracking their AI visibility. See exactly where you stand in ChatGPT, Perplexity, Claude, and Gemini answers—and what to do about it.

7-day free trial. Starting at $39/month. Cancel anytime.

Get the weekly AI visibility report

Every Friday: top rising brands, AI answer trends, and opportunities you might be missing.

50K+
Prompts tracked
10K+
Brands monitored
5
AI platforms