lovablehtml logo - turn your SPA into a crawler-friendly website BLOGAPI PLATFORMPRICING

Analytics API

Retrieve crawler visit metrics and SEO Spider insights.

Retrieve crawler visit metrics and SEO Spider insights. Supports session auth, API key auth, and public stats token auth.

Page Insights

GET/api/analytics/page-insights

Get crawler visit counts plus latest SEO Spider issues for a single page URL.

Query Parameters

Parameter Type Description
urlrequired string (URL) Absolute URL of the page to inspect.
days number Lookback window in days. Default: 30. Max: 180.
token string Public stats token for read-only access.

Response Body

json
CopyDownload
{
"url": "https://your-app.com/pricing",
"domain": "your-app.com",
"path": "/pricing",
"window": {
"days": 30,
"from": "2026-02-08T00:00:00.000Z",
"to": "2026-03-11T00:00:00.000Z"
},
"crawlerVisits": {
"total": 150,
"byProvider": [
{ "provider": "google", "count": 100 }
],
"byServedBy": [
{ "servedBy": "cache", "count": 120 },
{ "servedBy": "render", "count": 30 }
]
},
"seoSpider": {
"latestRun": {
"id": "run_abc123",
"status": "success",
"startedAt": 1710000000000,
"completedAt": 1710003600000
},
"page": {
"found": true,
"issueCount": 2,
"issues": [
{ "issueId": "missing_meta_description", "severity": "warning" }
],
"statusCode": 200,
"healthScore": 85,
"previewScore": 90,
"indexable": true
}
}
}

Example

javascript
CopyDownload
const targetUrl = 'https://your-app.com/pricing';
const response = await fetch(
'https://lovablehtml.com/api/analytics/page-insights?url=' +
encodeURIComponent(targetUrl) +
'&days=30',
{
headers: {
'x-lovablehtml-api-key': '<API_KEY>'
}
}
);
const data = await response.json();
console.log(data.crawlerVisits.total);
console.log(data.seoSpider.page?.issues ?? []);
bash
CopyDownload
curl -X GET \
"https://lovablehtml.com/api/analytics/page-insights?url=https%3A%2F%2Fyour-app.com%2Fpricing&days=30" \
-H "x-lovablehtml-api-key: <API_KEY>"
# Or with public stats token:
# curl "https://lovablehtml.com/api/analytics/page-insights?url=...&token=pub_stats_..."

Bots Breakdown

GET/api/analytics/bots

Get crawler visit breakdown by provider and served-by method, grouped by path.

Query Parameters

Parameter Type Description
domainrequired string Domain to query. Required for session/API key auth.
from string (yyyy-mm-dd) Start date (inclusive). Default: 30 days ago.
to string (yyyy-mm-dd) End date (inclusive). Default: today.
path string Filter by exact path (e.g., "/about").
search string Substring search filter on path (case-insensitive).
token string Public stats token for read-only access.

Response Body

json
CopyDownload
{
"byProvider": [
{ "path": "/about", "provider": "google", "count": 42 },
{ "path": "/", "provider": "openai", "count": 10 }
],
"byServedBy": [
{ "path": "/about", "servedBy": "cache", "count": 35 },
{ "path": "/about", "servedBy": "render", "count": 7 }
]
}

Example

javascript
CopyDownload
const response = await fetch(
'https://lovablehtml.com/api/analytics/bots?' + new URLSearchParams({
domain: 'your-app.com',
from: '2026-01-01',
to: '2026-01-31'
}),
{
headers: {
'x-lovablehtml-api-key': '<API_KEY>'
}
}
);
const data = await response.json();
console.log(data.byProvider);
console.log(data.byServedBy);
bash
CopyDownload
curl -X GET \
"https://lovablehtml.com/api/analytics/bots?domain=your-app.com&from=2026-01-01&to=2026-01-31" \
-H "x-lovablehtml-api-key: <API_KEY>"

Bots Daily

GET/api/analytics/bots/daily

Get daily crawler visit time series with per-provider breakdown.

Query Parameters

Parameter Type Description
domainrequired string Domain to query. Required for session/API key auth.
days number Number of days. Default: 30. Max: 180.
token string Public stats token for read-only access.

Response Body

json
CopyDownload
{
"daily": [
{
"date": "2026-02-09",
"total": 55,
"providers": [
{ "provider": "google", "count": 30 },
{ "provider": "openai", "count": 25 }
]
},
{
"date": "2026-02-10",
"total": 0,
"providers": []
}
]
}

The daily array always contains one entry per day, including days with zero visits.

Example

javascript
CopyDownload
const response = await fetch(
'https://lovablehtml.com/api/analytics/bots/daily?' + new URLSearchParams({
domain: 'your-app.com',
days: '30'
}),
{
headers: {
'x-lovablehtml-api-key': '<API_KEY>'
}
}
);
const data = await response.json();
data.daily.forEach(day => {
console.log(day.date, day.total, day.providers);
});
bash
CopyDownload
curl -X GET \
"https://lovablehtml.com/api/analytics/bots/daily?domain=your-app.com&days=30" \
-H "x-lovablehtml-api-key: <API_KEY>"

Bots Summary

GET/api/analytics/bots/summary

Get high-level crawl metrics: top crawlers, pages crawled, and crawl budget savings.

Query Parameters

Parameter Type Description
domainrequired string Domain to query. Required for session/API key auth.
days number Number of days. Default: 30. Max: 180.
token string Public stats token for read-only access.

Response Body

json
CopyDownload
{
"topSearchCrawler": {
"provider": "google",
"count": 500
},
"topLlmCrawler": {
"provider": "openai",
"count": 120
},
"newPagesCrawled": 15,
"totalPagesCrawled": 200,
"totalCrawlsServed": 620,
"crawlBudgetSaved": {
"percentage": 75,
"minutesSaved": 42,
"cacheHits": 400
}
}

Example

javascript
CopyDownload
const response = await fetch(
'https://lovablehtml.com/api/analytics/bots/summary?' + new URLSearchParams({
domain: 'your-app.com',
days: '30'
}),
{
headers: {
'x-lovablehtml-api-key': '<API_KEY>'
}
}
);
const data = await response.json();
console.log(data.totalCrawlsServed);
console.log(data.crawlBudgetSaved);
bash
CopyDownload
curl -X GET \
"https://lovablehtml.com/api/analytics/bots/summary?domain=your-app.com&days=30" \
-H "x-lovablehtml-api-key: <API_KEY>"
Avatar
How can we help?
Get instant answers to your questions or leave a message for an engineer will reach out
Ask AI about LovableHTML
See our docs
Contact support
Leave a message
We'll get back to you soon
Avatar
Ask AI about LovableHTML
Team is also here to help
Thinking
Preview
Powered by ReplyMaven
Avatar
Aki
Hi, how can we help?