Analytics API
Retrieve crawler visit metrics and SEO Spider insights.
API key access requires the Pro plan or above. A key on a lower plan receives 403 { "error": "plan_required", "requiredPlan": "agency" }. The agency string is the stored ID for the Pro plan.
Embed Analytics in Your Own Frontend#
To show crawler stats inside your own dashboard, or on a page you hand to a client, use a public stats token rather than an API key. The token is read-only and scoped to the single domain it was issued for, so it can ship in browser code without exposing an API key or the rest of your account.
It also works on every plan, including the tiers where API key access to analytics is closed.
Generate one from Monitor → Crawl Analytics → Share.
# As a query parameter
curl "https://encited.com/api/analytics/bots/summary?token=pub_stats_..."
# Or as a header
curl "https://encited.com/api/analytics/bots/summary" \
-H "x-lovablehtml-public-stats-token: pub_stats_..."
The token carries its own domain, so domain is optional on the endpoints below. Passing a different domain returns 403 { "error": "domain_not_owned" }, and a token whose sharing has since been turned off returns 404 { "error": "not_found" }.
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 |
|---|---|---|
url (required) |
string (URL) | Absolute URL of the page to inspect. |
days |
number | Lookback window in days. Default: 30. Max: 180. |
Response Body#
{
"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#
const targetUrl = "https://your-app.com/pricing";
const response = await fetch(
"https://encited.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 ?? []);
curl -X GET \
"https://encited.com/api/analytics/page-insights?url=https%3A%2F%2Fyour-app.com%2Fpricing&days=30" \
-H "x-lovablehtml-api-key: <API_KEY>"
Bots Breakdown#
GET /api/analytics/bots#
Get crawler visit breakdown by provider and served-by method, grouped by path.
Query Parameters#
| Parameter | Type | Description |
|---|---|---|
domain (required) |
string | Domain to query. Not needed with a public stats token. |
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). |
Response Body#
{
"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#
const response = await fetch(
"https://encited.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);
curl -X GET \
"https://encited.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 |
|---|---|---|
domain (required) |
string | Domain to query. Not needed with a public stats token. |
days |
number | Number of days. Default: 30. Max: 180. |
Response Body#
{
"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#
const response = await fetch(
"https://encited.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);
});
curl -X GET \
"https://encited.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 |
|---|---|---|
domain (required) |
string | Domain to query. Not needed with a public stats token. |
days |
number | Number of days. Default: 30. Max: 180. |
Response Body#
{
"topSearchCrawler": {
"provider": "google",
"count": 500
},
"topLlmCrawler": {
"provider": "openai",
"count": 120
},
"newPagesCrawled": 15,
"totalPagesCrawled": 200,
"totalCrawlsServed": 620,
"crawlBudgetSaved": {
"percentage": 75,
"minutesSaved": 42,
"cacheHits": 400
}
}
Example#
const response = await fetch(
"https://encited.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);
curl -X GET \
"https://encited.com/api/analytics/bots/summary?domain=your-app.com&days=30" \
-H "x-lovablehtml-api-key: <API_KEY>"
