Access your analytics data programmatically with our comprehensive REST API. Build custom integrations, automate workflows, and get real-time insights.
Get started with the Statlytic API in minutes
Include your API key in the Authorization header.
All responses are in JSON format with comprehensive data.
Secure API access with bearer token authentication
https://statlytic.app/api
All endpoints are relative to this base URL. Use HTTPS for all requests.
Authorization: Bearer YOUR_API_KEY
Generate your API key from the dashboard settings. Keep it secure and never expose it in client-side code.
Essential endpoints for accessing your analytics data
startDate
Start date (YYYY-MM-DD)endDate
End date (YYYY-MM-DD)groupBy
day, week, monthpath
Page path (e.g., /about)type
click, scroll, moveGet real-time notifications for important events
Traffic increase detected
Conversion goal reached
Site error identified
Scheduled report generated
Process incoming webhook events and respond with 200 status.
Important information about API usage and limits
Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Use appropriate date ranges to avoid large responses
Implement exponential backoff for retries
Cache responses when appropriate
Use webhooks for real-time updates instead of polling
Keep your API key secure and rotate it regularly
Official SDKs and community libraries for popular languages