GET
/api/v1/usageUsage API
Query your capture logs and usage statistics programmatically.
GET /api/v1/usage
Returns a paginated list of individual capture logs: URL captured, format, status, response time, and timestamp.
GET /api/v1/usage/stats
Returns aggregate statistics for a date range: total captures, success count, failure count, and per-day breakdown.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | string | optional | Filter logs by: success or failed. |
api_key_id | integer | optional | Filter logs by a specific API key ID. |
from | string | optional | Start date in ISO 8601 format (e.g. 2026-04-01). |
to | string | optional | End date in ISO 8601 format. |
days | integer | optional | For /usage/stats: number of past days (1–90). Default: 7. |
Code Examples
# Paginated capture logs
curl "https://screenshotcore.com/api/v1/usage" \
-H "Authorization: Bearer YOUR_API_KEY"
# Failed captures in April
curl "https://screenshotcore.com/api/v1/usage?status=failed&from=2026-04-01&to=2026-04-30" \
-H "Authorization: Bearer YOUR_API_KEY"
# 30-day aggregate stats
curl "https://screenshotcore.com/api/v1/usage/stats?days=30" \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"current_page": 1,
"data": [
{
"id": 197,
"user_id": 1,
"api_key_id": 43,
"url": "https://example.com",
"options": { "url": "https://example.com", "response_type": "json" },
"format": "png",
"status": "success",
"http_status_code": null,
"error_message": null,
"response_time_ms": 2550,
"file_size_bytes": 11268,
"cached": false,
"ip_address": "127.0.0.1",
"created_at": "2026-04-27T14:21:21.000000Z",
"api_key": { "id": 43, "label": "My Key", "key_prefix": "sk_DF5sT8BPQ" }
}
],
"first_page_url": "https://screenshotcore.com/api/v1/usage?page=1",
"from": 1,
"last_page": 3,
"per_page": 25,
"to": 25,
"total": 58
}