API Reference
API Overview
Access your analytics data programmatically with Databuddy's REST API. All endpoints require authentication and are rate-limited for security.
Base URLs
Quick Start
1. Get your API key from Dashboard → Organization Settings → API Keys
2. List your websites:
curl -H "x-api-key: dbdy_your_api_key" \
https://api.databuddy.cc/v1/query/websites3. Query analytics data:
curl -X POST -H "x-api-key: dbdy_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"parameters": ["summary", "pages"],
"preset": "last_30d"
}' \
"https://api.databuddy.cc/v1/query?website_id=web_123"Use date presets like last_7d, last_30d, this_month instead of explicit dates for convenience.
API Sections
Available Query Types
Website Analytics
Query types for website_id:
Link Shortener Analytics
Query types for link_id:
Health Check
Check API and dependency status:
GET /health{
"clickhouse": true,
"database": true,
"redis": true,
"success": true,
"version": "1.0.0",
"timestamp": "2024-01-01T12:00:00.000Z"
}How is this guide?