API Reference
Complete reference for SiteTooling.space APIs, including tracking scripts, analytics display, and REST endpoints for programmatic access.
Quick Access
Tracking Script
JavaScript API for tracking page views, custom events, and controlling tracking behavior.
Analytics Display
Embed live analytics charts and metrics directly on your website or dashboard.
REST API
Server-side API for retrieving analytics data, managing websites, and custom integrations.
Authentication
API Authentication Methods
Tracking Token
Used for client-side tracking scripts. Public and safe to expose in frontend code.
data-token="st_live_1234567890abcdef"API Key (Secret)
Used for server-side REST API calls. Keep secret and never expose in frontend code.
Authorization: Bearer st_secret_abcdef1234567890Security Best Practices
Never expose your secret API key in client-side code. Use tracking tokens for frontend scripts and API keys only for server-side requests.
Rate Limits
All API endpoints are rate limited to ensure fair usage and system stability.
Rate Limit Headers
All API responses include rate limit information in headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200Response Formats
Success Response
All successful API responses follow this format:
{
"success": true,
"data": {
"page_views": 1250,
"unique_visitors": 892
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"version": "1.0"
}
}Error Response
Error responses include detailed error information:
{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "The provided token is invalid",
"details": "Token must start with 'st_'"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}SDKs & Libraries
Official SDKs Coming Soon
We're working on official SDKs to make integration even easier. Currently, all APIs are accessible via standard HTTP requests.
Endpoint Overview
Tracking Endpoints
POST/api/trackGET/track.jsAnalytics Endpoints
GET/api/analyticsGET/analytics.jsManagement Endpoints
POST/api/registerGET/api/websitesGET/api/exportGetting Started
Choose your integration method
Select the approach that best fits your needs:
🚀 Quick Start
📊 Display Analytics
🔧 Custom Integration
Need help with API integration? Contact our support team for technical assistance.