Skip to Content

Statistics

GET /api/v1/search/serp/stats counts the account’s SERP requests over a date range: how many returned a results page and how many failed, in total and day by day. The dashboard  shows the same numbers on the Browsing page.

A request is one call to POST /api/v1/search/serp/google, however many attempts it took inside. An attempt that does not produce a page is retried automatically and is not billed, so the task list in the dashboard, which shows every attempt, has more failures than this endpoint. A failed request is never billed. A successful one is; so is a request whose connection you closed early if its search still returned a page — the work was done. billed counts both.

GET /api/v1/search/serp/stats

curl -sS "https://llm.dat.ai/api/v1/search/serp/stats?from=2026-10-14&to=2026-10-15" \ -H "Authorization: Bearer YOUR_API_KEY"
ParameterMeaning
fromFirst day, YYYY-MM-DD, UTC. Default: 29 days before to
toLast day, YYYY-MM-DD, UTC, included. Default: today

The range is at most 92 days.

Response (200):

{ "from": "2026-10-14", "to": "2026-10-15", "total": 413, "successful": 396, "failed": 14, "cancelled": 3, "billed": 399, "success_rate": 0.9659, "days": [ { "date": "2026-10-14", "total": 64, "successful": 64, "failed": 0, "cancelled": 0, "billed": 64 }, { "date": "2026-10-15", "total": 349, "successful": 332, "failed": 14, "cancelled": 3, "billed": 335 } ] }
FieldMeaning
totalRequests in the range
successfulRequests that returned a results page
failedRequests that returned an error after all their attempts. Not billed
cancelledRequests whose connection the client closed before the answer
billedRequests that were charged: successful, plus cancelled ones whose search still returned a page
success_ratesuccessful / (successful + failed), rounded to four places; null when there were none
daysOne entry per day of the range, days without requests included with zeros

Errors: 400 (a bad date, or a range the wrong way round or too long):

{ "error": "from must be a date such as 2026-10-01" }
{ "error": "from must not be after to" }
{ "error": "the range is 288 days; at most 92 at a time" }

401 (missing or invalid API key):

{ "error": "Authentication required: missing Authorization header. Please provide Authorization header with Bearer token format: 'Authorization: Bearer <your-api-key>'" }