-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.html
More file actions
262 lines (255 loc) · 11.3 KB
/
Copy pathapi.html
File metadata and controls
262 lines (255 loc) · 11.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LLM Pulse API Reference</title>
<meta name="description" content="Quick reference for the LLM Pulse REST API, MCP endpoint, authentication, endpoint groups, examples, and OpenAPI files.">
<link rel="canonical" href="https://llm-pulse.github.io/api.html">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a class="skip-link" href="#main">Skip to content</a>
<header class="site-header">
<nav class="nav" aria-label="Primary navigation">
<a class="brand" href="index.html" aria-label="LLM Pulse Docs home">
<img class="brand-logo" src="assets/logo.svg" alt="LLM Pulse">
<span class="brand-label">Docs</span>
</a>
<div class="nav-links">
<a href="api.html" aria-current="page">API</a>
<a href="ai-search-guide.html">AI Search Guide</a>
<a href="examples.html">Examples</a>
<a class="external" href="https://llmpulse.ai/">Website</a>
<a class="nav-cta" href="https://llmpulse.ai/users/sign_up">Start Free</a>
</div>
</nav>
</header>
<main id="main">
<section class="page-hero">
<p class="eyebrow">API reference</p>
<h1>Connect LLM Pulse to your stack</h1>
<p class="lead">The REST API exposes AI visibility metrics, prompt responses, citations, recommendations, Search Console data, webhooks, and reporting data. The MCP endpoint exposes the same product surface to AI clients through OAuth or API-key authentication.</p>
<ul class="hero-badges" aria-label="API formats">
<li>REST</li>
<li>MCP</li>
<li>OpenAPI</li>
<li>Webhooks</li>
<li>Bearer auth</li>
</ul>
<div class="actions">
<a class="button primary" href="openapi.json">OpenAPI JSON</a>
<a class="button secondary" href="swagger.json">Swagger JSON</a>
<a class="button secondary" href="https://llmpulse.ai/api-docs">Live docs</a>
</div>
</section>
<section class="section compact">
<div class="grid two">
<article class="card">
<h2>Base URL</h2>
<pre><code>https://api.llmpulse.ai/api/v1</code></pre>
<p class="lead">All REST examples below assume this base path.</p>
</article>
<article class="card">
<h2>Authentication</h2>
<pre><code>Authorization: Bearer llmpulse_your_api_key_here</code></pre>
<p class="lead">REST API keys are available on Scale and Enterprise. MCP via OAuth is available on every plan, including Starter and free trial accounts.</p>
</article>
</div>
</section>
<section class="band">
<div class="section">
<div class="section-header">
<div>
<h2>Quickstart</h2>
<p>Use the projects endpoint first, then request metrics for a project ID.</p>
</div>
</div>
<div class="grid two">
<article class="card">
<h3>1. Validate your key</h3>
<pre><code>curl https://api.llmpulse.ai/api/v1/ping \
-H "Authorization: Bearer llmpulse_your_api_key_here"</code></pre>
</article>
<article class="card">
<h3>2. List projects</h3>
<pre><code>curl https://api.llmpulse.ai/api/v1/dimensions/projects \
-H "Authorization: Bearer llmpulse_your_api_key_here"</code></pre>
</article>
<article class="card">
<h3>3. Get summary metrics</h3>
<pre><code>curl "https://api.llmpulse.ai/api/v1/metrics/summary?project_id=123&metrics=mentions,visibility,weighted_visibility&range=30" \
-H "Authorization: Bearer llmpulse_your_api_key_here"</code></pre>
</article>
<article class="card">
<h3>4. Compare share of voice</h3>
<pre><code>curl "https://api.llmpulse.ai/api/v1/metrics/sov?project_id=123&range=30" \
-H "Authorization: Bearer llmpulse_your_api_key_here"</code></pre>
</article>
</div>
</div>
</section>
<section class="section">
<div class="section-header">
<div>
<h2>Endpoint Groups</h2>
<p>Representative endpoint map from the current OpenAPI spec. Use the linked JSON files for exact request and response schemas.</p>
</div>
</div>
<div class="endpoint-list" aria-label="Endpoint groups">
<div class="endpoint">
<span class="method">GET</span>
<span class="path">/metrics/timeseries</span>
<p>Daily, weekly, or monthly series for mentions, citations, responses, mention rate, citation rate, AI visibility score, positions, and sentiment.</p>
</div>
<div class="endpoint">
<span class="method">GET</span>
<span class="path">/metrics/summary</span>
<p>Aggregated dashboard totals, min, max, last values, and position distribution for a selected date range.</p>
</div>
<div class="endpoint">
<span class="method">GET</span>
<span class="path">/metrics/sov</span>
<p>Share of Voice comparison across your project and tracked competitors.</p>
</div>
<div class="endpoint">
<span class="method">GET</span>
<span class="path">/metrics/top_sources</span>
<p>Domains and URLs most frequently cited in AI responses.</p>
</div>
<div class="endpoint">
<span class="method">GET</span>
<span class="path">/dimensions/projects</span>
<p>Projects available to the current API key. Most analytics calls start with one of these project IDs.</p>
</div>
<div class="endpoint">
<span class="method">GET</span>
<span class="path">/dimensions/prompts</span>
<p>Tracked prompts, tags, locale filters, models, and prompt metadata.</p>
</div>
<div class="endpoint">
<span class="method">GET</span>
<span class="path">/answers</span>
<p>AI responses with search support. Retrieve full responses with mentions, citations, sources, entities, and related metadata by ID.</p>
</div>
<div class="endpoint">
<span class="method">GET</span>
<span class="path">/citation_intelligence/groups</span>
<p>Group citations by URL, domain, or host with model breakdowns, citation rate, and average citation position.</p>
</div>
<div class="endpoint">
<span class="method">GET</span>
<span class="path">/recommendations</span>
<p>Read recommendation runs and items that help teams prioritize content and visibility work.</p>
</div>
<div class="endpoint">
<span class="method post">POST</span>
<span class="path">/prompts</span>
<p>Bulk-create prompts, up to 100 per request. Requires a read-write API key.</p>
</div>
<div class="endpoint">
<span class="method post">POST</span>
<span class="path">/webhooks</span>
<p>Create signed outbound webhooks for project events. Available on Scale and Enterprise.</p>
</div>
<div class="endpoint">
<span class="method post">POST</span>
<span class="path">/mcp</span>
<p>JSON-RPC MCP endpoint for AI clients. OAuth is the recommended connection flow for interactive AI assistants.</p>
</div>
</div>
</section>
<section class="band">
<div class="section">
<div class="grid two">
<article>
<h2>Common Parameters</h2>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Use</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>project_id</code></td>
<td>Required for most project-scoped endpoints.</td>
</tr>
<tr>
<td><code>range</code></td>
<td>Shortcut date range, commonly 7, 30, 90, or 365 days.</td>
</tr>
<tr>
<td><code>from</code> and <code>to</code></td>
<td>ISO8601 date range when you need exact boundaries.</td>
</tr>
<tr>
<td><code>model</code></td>
<td>Filter by model, such as ChatGPT, Perplexity, Gemini, Google AI Overview, or Google AI Mode.</td>
</tr>
<tr>
<td><code>country_code</code> and <code>language_code</code></td>
<td>Filter localized prompt runs and analytics.</td>
</tr>
<tr>
<td><code>page</code> and <code>per_page</code></td>
<td>Paginate list endpoints. Most list endpoints cap page size at 100.</td>
</tr>
</tbody>
</table>
</div>
</article>
<article class="callout">
<h2>MCP in One Minute</h2>
<p><strong>Interactive assistant use:</strong> paste <code>https://api.llmpulse.ai/api/v1/mcp</code> into a compatible AI client and complete OAuth.</p>
<p><strong>Headless use:</strong> send an API key in the bearer header. This path requires Scale or Enterprise.</p>
<p>Tool availability follows the user's plan and permissions, so locked product areas are filtered from the tool list.</p>
</article>
</div>
</div>
</section>
<section class="section">
<div class="section-header">
<div>
<h2>Error Format</h2>
<p>All API errors return a consistent envelope with a stable code and request ID.</p>
</div>
</div>
<pre><code>{
"error": {
"code": "ERR_INVALID_API_KEY",
"message": "API key is invalid or not found",
"meta": {}
},
"request_id": "req_..."
}</code></pre>
<ul class="badge-list" aria-label="Common API error codes">
<li>ERR_MISSING_AUTH</li>
<li>ERR_INVALID_API_KEY</li>
<li>ERR_INSUFFICIENT_SCOPE</li>
<li>ERR_PLAN_REQUIRED</li>
<li>ERR_PROJECT_NOT_FOUND</li>
<li>ERR_INVALID_PARAM</li>
<li>ERR_RATE_LIMITED</li>
</ul>
</section>
</main>
<footer class="site-footer">
<div class="footer-inner">
<div>
<strong>LLM Pulse API</strong>
<div>OpenAPI version 1.14.0 copied from the application repository.</div>
</div>
<div>
<a href="index.html">Home</a>
<span aria-hidden="true"> · </span>
<a href="examples.html">Examples</a>
<span aria-hidden="true"> · </span>
<a href="https://llmpulse.ai/">Website</a>
</div>
</div>
</footer>
</body>
</html>