Developer · API reference
Traffic, bots & conversions
AI-bot crawls of your pages, the visitors AI sends you, and AI-attributed conversions.
These endpoints return your AI-traffic data: which AI bots crawl your pages, the human visitors that AI referrals send you, and the conversions you can attribute to AI search. They require the tracking snippet installed on your site (see the "See which AI bots crawl your site" guide) and onboarding completed — until then they return zeroes.
`website-traffic-kpis` returns the rolling 1/7/30-day headline numbers; `website-traffic-timeseries` returns the daily series to chart; `webpage-analytics` breaks it down per page alongside each page’s AEO health.
/analytics/website-traffic-kpis/{company_id}Direct AI-bot crawls and indirect AI-referred visits
Website-level traffic KPIs over rolling 1/7/30-day windows. `bot_traffic` counts DIRECT AI-bot crawls of your pages (broken down by `llm`/`search`/`social`/`seo`). `ai_referred_traffic` counts INDIRECT human visits that AI answers sent you, with conversions and conversion rate; the `day7` block additionally carries a 7-point rolling `daily[]` (referred views) and `conversions_daily[]` series for sparklines. `conversions` summarises total vs AI-attributed conversions per window, and `provider_breakdown_7d` lists AI providers by view count over the last 7 days. Pass a `companyId` from `POST /user/user-checkin`; the company must have completed onboarding.
🔒 Requires Authorization: Bearer ll_… (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | — |
Example request
curl -X GET "https://api.lunalift.ai/analytics/website-traffic-kpis/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response · 200 OK
| Field | Type | Notes |
|---|---|---|
success | boolean | — |
data | object | — |
data.bot_traffic | object | same shape as: ai_referred_traffic, conversions |
data.bot_traffic.day1 | object | same shape as: day7, day30 |
data.bot_traffic.day1.llm | integer | same shape as: search, social, seo, total, change |
data.provider_breakdown_7d | object[] | — |
data.provider_breakdown_7d[].provider | string | — |
data.provider_breakdown_7d[].views | integer | — |
Example response
{
"success": true,
"data": {
"bot_traffic": {
"day1": {
"llm": 12,
"search": 8,
"social": 1,
"seo": 4,
"total": 25,
"change": 13.6
},
"day7": {
"llm": 84,
"search": 55,
"social": 6,
"seo": 30,
"total": 175,
"change": 9.2
},
"day30": {
"llm": 360,
"search": 240,
"social": 22,
"seo": 130,
"total": 752,
"change": -3.1
}
},
"ai_referred_traffic": {
"day1": {
"total": 6,
"conversions": 1,
"conversionRate": 16.67,
"change": 0
},
"day7": {
"total": 41,
"conversions": 5,
"conversionRate": 12.2,
"change": 8,
"daily": [
3,
4,
5,
6,
7,
8,
8
],
"conversions_daily": [
0,
1,
1,
1,
2,
2,
3
]
},
"day30": {
"total": 180,
"conversions": 22,
"conversionRate": 12.22,
"change": -2.4
}
},
"conversions": {
"day1": {
"total": 3,
"ai": 1,
"aiPercent": 33.33,
"change": 0
},
"day7": {
"total": 18,
"ai": 5,
"aiPercent": 27.78,
"change": 5.9
},
"day30": {
"total": 74,
"ai": 22,
"aiPercent": 29.73,
"change": -1.2
}
},
"provider_breakdown_7d": [
{
"provider": "openai",
"views": 60
},
{
"provider": "perplexity",
"views": 25
},
{
"provider": "google",
"views": 15
}
]
}
}/analytics/website-traffic-timeseries/{company_id}Daily traffic and conversion time series
Per-day time series for charting a website's traffic and conversions. Returns four parallel series: `traffic[]` (daily bot views split into `llm_bot`/`search_bot`/`social_bot`/`seo_bot` plus `ai_referred`), `conversions[]` (daily total and AI-attributed conversions), `providers[]` (daily views per AI provider), and `conversion_events[]` (daily conversions per event type). Pass a `companyId` from `POST /user/user-checkin`; the company must have completed onboarding.
🔒 Requires Authorization: Bearer ll_… (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | — |
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
days | integer | No | 30 | Number of trailing days to include. Clamped server-side to the range 7–90 (values below 7 are raised to 7, above 90 lowered to 90). Defaults to 30. |
Example request
curl -X GET "https://api.lunalift.ai/analytics/website-traffic-timeseries/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response · 200 OK
| Field | Type | Notes |
|---|---|---|
success | boolean | — |
data | object | — |
data.traffic | object[] | — |
data.traffic[].day | string | — |
data.traffic[].llm_bot | integer | same shape as: search_bot, social_bot, seo_bot, ai_referred |
data.conversions | object[] | — |
data.conversions[].day | string | — |
data.conversions[].total | integer | same shape as: ai |
data.providers | object[] | — |
data.providers[].day | string | same shape as: provider |
data.providers[].views | integer | — |
data.conversion_events | object[] | — |
data.conversion_events[].day | string | same shape as: event |
data.conversion_events[].total | integer | same shape as: ai |
Example response
{
"success": true,
"data": {
"traffic": [
{
"day": "2026-09-27",
"llm_bot": 12,
"search_bot": 8,
"social_bot": 1,
"seo_bot": 4,
"ai_referred": 6
}
],
"conversions": [
{
"day": "2026-09-27",
"total": 3,
"ai": 1
}
],
"providers": [
{
"day": "2026-09-27",
"provider": "openai",
"views": 9
}
],
"conversion_events": [
{
"day": "2026-09-27",
"event": "signup",
"total": 2,
"ai": 1
}
]
}
}/analytics/webpage-analyticsGet Webpage Analytics
Get paginated webpage analytics with bot/user traffic, citations, conversions
🔒 Requires Authorization: Bearer ll_… (or X-API-Key).
Request body· WebpageAnalyticsQuery
| Field | Type | Required | Description |
|---|---|---|---|
website_id | string | Yes | — |
page | integer | No | — |
page_size | integer | No | — |
group_tag | string | null | No | — |
search_query | string | null | No | — |
sort_by | WebpageAnalyticsSortBy | No | Sort options for webpage analytics. |
comparison_period | ComparisonPeriod | No | Comparison period for trend calculations. |
time_frame_days | integer | No | — |
exclude_system_pages | boolean | No | — |
Example request
curl -X POST "https://api.lunalift.ai/analytics/webpage-analytics" \
-H "Authorization: Bearer ll_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"website_id": "string"
}'Response · 200 OK
Returns a JSON object on success.
/analytics/trending-pages/{company_id}Get Trending Pages
Get trending pages with actionable recommendations. Returns: - Top movers: Pages with highest percentage changes - High-value AI pages: Pages with high AI attribution ratios
🔒 Requires Authorization: Bearer ll_… (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | — |
Example request
curl -X GET "https://api.lunalift.ai/analytics/trending-pages/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response · 200 OK
Returns a JSON object on success.
/analytics/website-analytics/{company_id}Resolve a company's website and schema analytics
Return the website record and schema/page analytics for a company. Use this to confirm a company's website has been added (a prerequisite for traffic data) and to resolve the underlying website the traffic endpoints report on. The company must have completed onboarding (a website added, plus at least one confirmed topic and one executed prompt) before analytics return data. Pass a `companyId` from `POST /user/user-checkin`.
🔒 Requires Authorization: Bearer ll_… (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | — |
Example request
curl -X GET "https://api.lunalift.ai/analytics/website-analytics/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response · 200 OK
| Field | Type | Notes |
|---|---|---|
success | boolean | — |
data | object | — |
data.website_id | string | same shape as: company_id |
data.pages | any[] | — |
data.schema_summary | object | — |
Example response
{
"success": true,
"data": {
"website_id": "018f8c1a-0000-7000-8000-000000000def",
"company_id": "018f8c1a-0000-7000-8000-000000000abc",
"pages": [],
"schema_summary": {}
}
}/analytics/website-health/{company_id}Get Website Health
Returns the website health score overview for a company: - Health score history (last 90 days, daily average) - Best 3 and worst 3 pages by current health score - Top 3 features to improve (benchmarked against global citation-page distributions) with 3 worst example pages per feature
🔒 Requires Authorization: Bearer ll_… (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | — |
Example request
curl -X GET "https://api.lunalift.ai/analytics/website-health/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response · 200 OK
Returns a JSON object on success.
/analytics/score-distributions/{company_id}Get Score Distributions
Returns the latest precomputed score distributions for the given company and optional source_type, in two layers: - global: distribution across all top-cited pages (no company filter) - company: distribution across pages cited for this company's tracked prompts Falls back to source_type=None (all types combined) when fewer than 10 pages exist for the requested source_type.
🔒 Requires Authorization: Bearer ll_… (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | — |
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
source_type | SourceType | null | No | — | — |
Example request
curl -X GET "https://api.lunalift.ai/analytics/score-distributions/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response · 200 OK
Returns a JSON object on success.
