{
  "openapi": "3.1.0",
  "info": {
    "title": "LLM Visibility Tracker API",
    "version": "1.0.0",
    "description": "Real-time AI Search Visibility, LLM Brand Citation, Competitor Share-of-Voice & Google AI Overview API. Track ChatGPT, Perplexity, Claude, Gemini & Google AI Mode mentions at 1/10th the cost of $499/mo GEO suites."
  },
  "servers": [
    {
      "url": "https://api.llmvisibilitytracker.com",
      "description": "Production AI Visibility Gateway"
    }
  ],
  "tags": [
    {
      "name": "Prompt Visibility",
      "description": "Live ChatGPT, Perplexity, Claude & Gemini brand prompt rank and citation checks"
    },
    {
      "name": "Competitor SOV",
      "description": "Head-to-head Share-of-Voice matrices across 2–8 competing brands"
    },
    {
      "name": "AI Overviews",
      "description": "Google AI Mode & AI Overview generative answers and source citation positions"
    },
    {
      "name": "Domain Mentions",
      "description": "Aggregated domain-level LLM mentions, AI search volume, and top cited URLs"
    }
  ],
  "components": {
    "schemas": {
      "CitedSource": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Source page title"
          },
          "url": {
            "type": "string",
            "description": "Cited source URL"
          },
          "domain": {
            "type": "string",
            "description": "Normalized root domain"
          },
          "position": {
            "type": "integer",
            "description": "1-based citation position"
          }
        }
      },
      "PromptCheckData": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "description": "Evaluated prompt string"
          },
          "brand": {
            "type": "string",
            "description": "Tracked brand name or domain"
          },
          "model": {
            "type": "string",
            "enum": [
              "chatgpt",
              "perplexity",
              "claude",
              "gemini"
            ]
          },
          "model_version": {
            "type": "string",
            "description": "Exact upstream model version identifier"
          },
          "brand_mentioned": {
            "type": "boolean",
            "description": "Whether brand appeared in response"
          },
          "brand_cited": {
            "type": "boolean",
            "description": "Whether brand domain appeared in citations"
          },
          "mention_count": {
            "type": "integer",
            "description": "Total mentions in response"
          },
          "mention_rank": {
            "type": "integer",
            "description": "1-based recommendation position"
          },
          "sentiment": {
            "type": "string",
            "enum": [
              "positive",
              "neutral",
              "negative",
              "not_mentioned"
            ]
          },
          "visibility_score": {
            "type": "integer",
            "description": "Composite visibility score (0–100)"
          },
          "cited_urls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CitedSource"
            }
          },
          "excerpt": {
            "type": "string",
            "description": "Contextual mention excerpt"
          },
          "answer_markdown": {
            "type": "string",
            "description": "Full LLM response markdown"
          },
          "checked_at": {
            "type": "string",
            "description": "UTC timestamp"
          }
        }
      },
      "CompetitorSovData": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "winner": {
            "type": "string",
            "description": "Top-ranked brand in the prompt response"
          },
          "total_brand_mentions": {
            "type": "integer"
          },
          "competitors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "brand": {
                  "type": "string"
                },
                "mentioned": {
                  "type": "boolean"
                },
                "mention_count": {
                  "type": "integer"
                },
                "first_position_rank": {
                  "type": "integer"
                },
                "share_of_voice_pct": {
                  "type": "number"
                },
                "sentiment": {
                  "type": "string"
                }
              }
            }
          },
          "cited_urls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CitedSource"
            }
          },
          "checked_at": {
            "type": "string"
          }
        }
      },
      "AiOverviewData": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "location_code": {
            "type": "integer"
          },
          "has_ai_overview": {
            "type": "boolean"
          },
          "brand_mentioned": {
            "type": "boolean"
          },
          "brand_cited": {
            "type": "boolean"
          },
          "brand_citation_positions": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "total_citations": {
            "type": "integer"
          },
          "summary_excerpt": {
            "type": "string"
          },
          "markdown": {
            "type": "string"
          },
          "references": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CitedSource"
            }
          },
          "checked_at": {
            "type": "string"
          }
        }
      },
      "DomainMentionsData": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "platform": {
            "type": "string",
            "enum": [
              "google",
              "chat_gpt"
            ]
          },
          "location_code": {
            "type": "integer"
          },
          "visibility_score": {
            "type": "integer"
          },
          "total_mentions": {
            "type": "integer"
          },
          "ai_search_volume": {
            "type": "integer"
          },
          "impressions": {
            "type": "integer"
          },
          "citation_share_pct": {
            "type": "number"
          },
          "platform_breakdown": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "top_cited_pages": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "data_source": {
            "type": "string"
          },
          "checked_at": {
            "type": "string"
          }
        }
      }
    }
  },
  "paths": {
    "/v1/visibility/prompt-check": {
      "get": {
        "operationId": "v1_visibility_prompt_check",
        "tags": [
          "Prompt Visibility"
        ],
        "summary": "Live LLM Prompt Brand Rank & Citations",
        "description": "Execute a buying-intent prompt across ChatGPT, Perplexity, Claude, or Gemini and extract brand mention boolean, 1-based recommendation rank, sentiment, visibility score, excerpt, and cited URLs. Cached 24h in PG16 + Redis.",
        "x-credits-per-request": "50 Credits ($0.005)",
        "x-price-per-request": "$2.00–$5.00 / 1K prompts",
        "parameters": [
          {
            "name": "prompt",
            "in": "query",
            "required": true,
            "description": "Buying-intent prompt (4–500 chars)",
            "example": "What are the top 3 developer payment APIs in 2026?",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand",
            "in": "query",
            "required": false,
            "description": "Target brand name or root domain",
            "example": "stripe.com",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "description": "LLM engine: chatgpt, perplexity, claude, gemini",
            "example": "chatgpt",
            "schema": {
              "type": "string",
              "enum": [
                "chatgpt",
                "perplexity",
                "claude",
                "gemini"
              ],
              "default": "chatgpt"
            }
          },
          {
            "name": "web_search",
            "in": "query",
            "required": false,
            "description": "Enable live web grounding citations (400 Credits = $0.04)",
            "example": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Normalized LLM prompt visibility payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PromptCheckData"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "provider": "https://llmvisibilitytracker.com",
                  "status": "ok",
                  "msg": "success",
                  "meta": {
                    "cached": false,
                    "took_ms": 2840
                  },
                  "data": {
                    "prompt": "What are the top 3 developer payment APIs in 2026?",
                    "brand": "stripe.com",
                    "model": "chatgpt",
                    "model_version": "gpt-4o-mini-2024-07-18",
                    "web_search": false,
                    "brand_mentioned": true,
                    "brand_cited": true,
                    "mention_count": 3,
                    "mention_rank": 1,
                    "sentiment": "positive",
                    "visibility_score": 92,
                    "cited_urls": [
                      {
                        "title": "Stripe API Reference",
                        "url": "https://stripe.com/docs/api",
                        "domain": "stripe.com",
                        "position": 1
                      }
                    ],
                    "excerpt": "1. Stripe: Renowned for developer experience, clean REST APIs, typed SDKs, and built-in fraud prevention."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/visibility/competitor-sov": {
      "get": {
        "operationId": "v1_visibility_competitor_sov",
        "tags": [
          "Competitor SOV"
        ],
        "summary": "Competitor AI Share-of-Voice Matrix",
        "description": "Compare 2 to 8 competing brands head-to-head on a single LLM prompt across ChatGPT, Perplexity, Claude, or Gemini and compute Share-of-Voice %, 1-based rank, and winner. Reuses 24h prompt cache.",
        "x-credits-per-request": "50 Credits ($0.005)",
        "x-price-per-request": "$2.00–$5.00 / 1K matrices",
        "parameters": [
          {
            "name": "prompt",
            "in": "query",
            "required": true,
            "description": "Category comparison prompt",
            "example": "What are the best developer payment APIs in 2026?",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brands",
            "in": "query",
            "required": true,
            "description": "Comma-separated list of 2 to 8 brands",
            "example": "stripe,adyen,paddle",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "description": "Target LLM engine",
            "example": "chatgpt",
            "schema": {
              "type": "string",
              "enum": [
                "chatgpt",
                "perplexity",
                "claude",
                "gemini"
              ],
              "default": "chatgpt"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Competitor Share-of-Voice matrix",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompetitorSovData"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "provider": "https://llmvisibilitytracker.com",
                  "status": "ok",
                  "msg": "success",
                  "meta": {
                    "cached": true,
                    "took_ms": 6
                  },
                  "data": {
                    "prompt": "What are the best developer payment APIs in 2026?",
                    "model": "chatgpt",
                    "winner": "stripe",
                    "total_brand_mentions": 6,
                    "competitors": [
                      {
                        "brand": "stripe",
                        "mentioned": true,
                        "mention_count": 3,
                        "first_position_rank": 1,
                        "share_of_voice_pct": 50,
                        "sentiment": "positive"
                      },
                      {
                        "brand": "adyen",
                        "mentioned": true,
                        "mention_count": 2,
                        "first_position_rank": 2,
                        "share_of_voice_pct": 33.3,
                        "sentiment": "positive"
                      },
                      {
                        "brand": "paddle",
                        "mentioned": true,
                        "mention_count": 1,
                        "first_position_rank": 3,
                        "share_of_voice_pct": 16.7,
                        "sentiment": "neutral"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/visibility/ai-overview": {
      "get": {
        "operationId": "v1_visibility_ai_overview",
        "tags": [
          "AI Overviews"
        ],
        "summary": "Google AI Mode & AI Overview Citations",
        "description": "Extract live Google AI Mode generative answers, markdown, cited reference URLs, and exact brand citation positions for any keyword and location_code. Cached 24h.",
        "x-credits-per-request": "80 Credits ($0.008)",
        "x-price-per-request": "$3.20–$8.00 / 1K keywords",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Google search keyword",
            "example": "best payment api for developers",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand",
            "in": "query",
            "required": false,
            "description": "Optional brand or domain to match citation positions",
            "example": "stripe.com",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_code",
            "in": "query",
            "required": false,
            "description": "Location code (default 2840 = US)",
            "example": 2840,
            "schema": {
              "type": "integer",
              "default": 2840
            }
          },
          {
            "name": "language_code",
            "in": "query",
            "required": false,
            "description": "2-letter ISO language code",
            "example": "en",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Google AI Overview citations payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AiOverviewData"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "provider": "https://llmvisibilitytracker.com",
                  "status": "ok",
                  "msg": "success",
                  "meta": {
                    "cached": true,
                    "took_ms": 22
                  },
                  "data": {
                    "keyword": "best payment api for developers",
                    "brand": "stripe.com",
                    "location_code": 2840,
                    "has_ai_overview": true,
                    "brand_mentioned": true,
                    "brand_cited": true,
                    "brand_citation_positions": [
                      1,
                      4
                    ],
                    "total_citations": 6,
                    "references": [
                      {
                        "title": "Stripe API Reference",
                        "url": "https://stripe.com/docs/api",
                        "domain": "stripe.com",
                        "position": 1
                      },
                      {
                        "title": "Best Payment APIs for Developers in 2026",
                        "url": "https://blog.postman.com/best-payment-apis-for-developers/",
                        "domain": "blog.postman.com",
                        "position": 2
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/visibility/domain-mentions": {
      "get": {
        "operationId": "v1_visibility_domain_mentions",
        "tags": [
          "Domain Mentions"
        ],
        "summary": "Aggregated Domain LLM Mentions Audit",
        "description": "Retrieve domain-wide LLM mentions, AI search volume, impressions, citation share %, platform breakdown, and top cited URLs. Top 50 benchmark tech domains cost 50 Credits on any tier; uncached live custom domains require a funded account (3,500 Credits = $0.35, 72h cached).",
        "x-credits-per-request": "50 Cr cached · 3,500 Cr live",
        "x-price-per-request": "$0.005 cached / $0.35 live",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "description": "Root domain without protocol (e.g. stripe.com, vercel.com)",
            "example": "stripe.com",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "description": "AI citation index: google or chat_gpt",
            "example": "google",
            "schema": {
              "type": "string",
              "enum": [
                "google",
                "chat_gpt"
              ],
              "default": "google"
            }
          },
          {
            "name": "location_code",
            "in": "query",
            "required": false,
            "description": "Location code (default 2840 = US)",
            "example": 2840,
            "schema": {
              "type": "integer",
              "default": 2840
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Domain-wide LLM mentions scorecard",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/DomainMentionsData"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "provider": "https://llmvisibilitytracker.com",
                  "status": "ok",
                  "msg": "success",
                  "meta": {
                    "cached": true,
                    "took_ms": 18
                  },
                  "data": {
                    "domain": "stripe.com",
                    "platform": "google",
                    "location_code": 2840,
                    "visibility_score": 94,
                    "total_mentions": 48210,
                    "ai_search_volume": 1842000,
                    "impressions": 6120400,
                    "citation_share_pct": 38.4,
                    "sentiment": {
                      "positive_pct": 86,
                      "neutral_pct": 12,
                      "negative_pct": 2
                    },
                    "data_source": "benchmark_snapshot"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}