The Lytical REST API
Updated December 1, 2026
The REST API lets your own code read your Lytical data and manage a few things, such as tracking links and tracked keywords. It's part of the Pro plan.
If you want to ask questions about your data in Claude or ChatGPT rather than write code, use the MCP server instead.
Create an API key
API keys belong to an account and can read every website in it. Only account admins can create them.
- Go to Settings → Account Settings and scroll to API Keys.
- Enter a Key name (for example "Data warehouse sync") and, if you like, an expiry date.
- Create the key and copy it. Store it somewhere safe, like a password manager or your secrets store.
The list shows when each key was created, who created it, when it was last used and when it expires. Click Disable to revoke a key straight away.
Treat API keys like passwords. Never put them in client-side code or a public repository.
Making requests
The base URL is https://app.lytical.ai/api/v1. Send your key as a bearer token:
curl https://app.lytical.ai/api/v1/sites \
-H "Authorization: Bearer YOUR_API_KEY"
Responses are JSON. Every response includes an X-Request-Id header. Include it if you contact support about a request.
Keep to 100 requests per minute. Check your usage with GET /api/v1/usage.
Time periods
Analytics endpoints take a period parameter: today, yesterday, last_7_days (the default), last_30_days or this_month. List endpoints take limit and offset.
Endpoints
Sites
| Method | Path | Returns |
|---|---|---|
| GET | /sites |
Websites in the account |
| GET | /sites/:id |
One website |
Analytics (per site)
All under /sites/:id/analytics/:
| Path | Returns |
|---|---|
summary |
Visitors, sessions, pageviews, bounce rate and duration |
timeseries |
The same metrics day by day |
compare |
This period against the previous one |
realtime |
Visitors on the site right now |
top_pages, landing_pages, exit_pages
|
Page rankings |
top_sources, top_referrers, utm_campaigns
|
Traffic sources |
devices, browsers, locations
|
Audience breakdowns |
events |
Event counts by name |
Events, visitors and identities
| Method | Path | Returns |
|---|---|---|
| GET | /sites/:id/events |
Raw events (up to 500 per page). Filter with period and type
|
| GET | /sites/:id/events/summary |
Event totals |
| GET | /sites/:id/visitors |
Visitors |
| GET | /sites/:id/visitors/:visitor_id/sessions |
One visitor's sessions |
| GET | /sites/:id/identities |
Identified users |
| POST | /sites/:id/identify |
Identify a visitor from your server |
| GET | /sites/:id/form_submissions |
Form submissions captured by Lytical Attribute |
SEO
| Method | Path | Returns |
|---|---|---|
| GET, POST, DELETE | /sites/:id/keywords |
List, add or remove tracked keywords |
| GET, POST | /sites/:id/scans |
List scans or start a new one |
| GET | /sites/:id/scans/:scan_id/pages |
Pages and issues from a scan |
Tracking links
| Method | Path | Returns |
|---|---|---|
| GET, POST, PATCH, DELETE | /sites/:id/links |
Manage tracking links |
Quincy
| Method | Path | Returns |
|---|---|---|
| GET, POST | /chats |
List chats or start one |
| GET, POST | /chats/:id/messages |
Read a conversation or ask a question |
Quincy messages sent through the API count toward your monthly AI message limit.
Errors
| Status | Meaning |
|---|---|
| 401 | Missing, disabled or expired API key |
| 404 | The site or record doesn't exist, or the key's account can't see it |
| 422 | A parameter is invalid. The response body says which |
Was this article helpful?
Thanks for letting us know.
Related articles
Still stuck?
Ask Quincy in the app, or email support@lytical.ai.