Back to tutorials
AdvancedInteractive

API Integration Guide

Integrate LLM Metrix data into your existing tools and workflows using our REST API and webhooks.

20 min

API Integration Guide

Integrate LLM Metrix data into your existing tools and workflows.

Getting Started

Authentication

All API requests require an API key:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.llmmetrix.com/v1/visibility

Generate your API key at Settings > API.

Core Endpoints

Get Visibility Score

GET /v1/visibility

Returns current visibility score and breakdown.

Get Mentions

GET /v1/mentions

Parameters:

  • engine: Filter by AI engine
  • sentiment: Filter by sentiment
  • from, to: Date range

Get Competitors

GET /v1/competitors

Returns competitor comparison data.

Webhooks

Configure webhooks to receive real-time updates:

  1. Go to Settings > Webhooks
  2. Add your endpoint URL
  3. Select events to subscribe to
  4. Verify with test event

Event Types

  • visibility.changed
  • mention.new
  • alert.triggered
  • competitor.updated

Rate Limits

Plan Requests/min Requests/day
Starter 60 10,000
Pro 300 100,000
Enterprise Custom Unlimited

SDKs

Official SDKs available:

  • JavaScript/TypeScript
  • Python
  • Ruby
  • Go

Example Integration

import { LLMMetrixClient } from '@llmmetrix/sdk';

const client = new LLMMetrixClient('YOUR_API_KEY');

// Get visibility score
const visibility = await client.getVisibility();

// Get recent mentions
const mentions = await client.getMentions({
  engine: 'chatgpt',
  limit: 10
});

Ready to put this into practice?

Start optimizing your AI visibility with the techniques you've learned.