Overview
The Windsurf Analytics API enables enterprise customers to programmatically access detailed usage analytics for their teams. Query data from autocomplete, chat, command features, and Cascade with flexible filtering, grouping, and aggregation options.The Analytics API is available for Enterprise plans only
API data is refreshed every 3 hours
Base URL
All API requests should be made to:Authentication
The Analytics API uses service keys for authentication. Service keys must be included in the request body of all API calls.Creating a Service Key
- Navigate to your team settings page
- Go to the “Service Keys” section
- Create a new service key with appropriate permissions
- Copy the generated service key for use in API requests
Required Permissions
All Analytics API endpoints require “Teams Read-only” permissions.Using Service Keys
Include your service key in the request body of all API calls:Keep your service keys secure and never expose them in client-side code or public repositories
Common Parameters
Most Analytics API endpoints support these common parameters:Parameter | Type | Required | Description |
---|---|---|---|
service_key | string | Yes | Your service key for authentication |
group_name | string | No | Filter results to a specific group |
start_timestamp | string | Varies | Start time in RFC 3339 format (e.g., 2023-01-01T00:00:00Z ) |
end_timestamp | string | Varies | End time in RFC 3339 format (e.g., 2023-12-31T23:59:59Z ) |
Available Endpoints
The Analytics API provides three main endpoints:- User Page Analytics - Get user activity data from the teams page
- Cascade Analytics - Query Cascade-specific usage metrics
- Custom Analytics - Flexible querying with custom selections, filters, and aggregations
Rate Limits
API requests are subject to rate limiting to ensure service stability. If you exceed the rate limit, you’ll receive a429 Too Many Requests
response.