Documentation Index
Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
Use this file to discover all available pages before exploring further.
For LangSmith Cloud, granular billable usage data collection started on January 5, 2026. Data is not available for usage before this date.For self-hosted instances, data collection begins when the feature is enabled via the following environment variables, or after upgrading to a version with it enabled by default.
- Track usage across different teams or workspaces
- Identify which users or API keys are consuming the most traces
- Analyze usage patterns over time
- Export usage data for internal reporting
Prerequisites
- You must have the
organization:readpermission to access granular usage data. - You can only view usage for workspaces you have read access to.
View in the UI
You can also view granular usage data in the LangSmith UI:- Navigate to Settings > Billing and Usage
- Select the Granular Usage tab
- Use the controls to:
- Select a time range:
- Last 7 days, 30 days, 3 months, 6 months, 1 year, or custom
- Choose aggregation level (daily, weekly, or monthly)
- Group by workspace, project, user, or API key
- Filter to specific workspaces
- Select a time range:
- Click Export CSV to download the data
API endpoints
Get granular usage data
Retrieve granular usage data with flexible grouping options.Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
start_time | datetime | Yes | Start of the time range (ISO 8601 format) |
end_time | datetime | Yes | End of the time range (must be after start_time) |
workspace_ids | array of UUIDs | Yes | Filter results to specific workspaces |
group_by | string | No | Dimension to group by. One of: workspace, project, user, api_key. Default: workspace |
Response
stride field indicates the time bucket size used for aggregation, calculated based on the requested time range:
| Time range | Aggregation | Stride |
|---|---|---|
| Less than 1 day | Hourly | hours: 1 |
| 1-31 days | Daily | days: 1 |
| 32-93 days (~3 months) | Weekly | days: 7 |
| 94-366 days (~1 year) | Monthly | days: 30 |
| More than 366 days | Yearly | days: 365 |
Example: Get usage by workspace
Example: Get usage by user
Export usage as CSV
Export granular usage data as a downloadable CSV file.group_by option are populated:
| Column | Description |
|---|---|
| Time Bucket Start | Start of the time bucket |
| Time Bucket End | End of the time bucket |
| Workspace ID | UUID of the workspace (when grouping by workspace) |
| Workspace Name | Name of the workspace (when grouping by workspace) |
| Project ID | UUID of the project (when grouping by project) |
| Project Name | Name of the project (when grouping by project) |
| User ID | UUID of the user (when grouping by user) |
| User Email | Email of the user (when grouping by user) |
| API Key Short Key | Short key identifier (when grouping by API key) |
| Traces | Number of traces in the time bucket |
Example: Export to CSV
Grouping options
Thegroup_by parameter determines how usage data is aggregated:
| Value | Description | Dimensions returned |
|---|---|---|
workspace | Group by workspace | workspace_id, workspace_name |
project | Group by project | project_id, project_name |
user | Group by user | user_id, user_email |
api_key | Group by API key | api_key_short_key |
Related resources
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

