Trace usage: For LangSmith Cloud, granular billable trace data collection started on January 5, 2026. Data is not available for traces ingested before this date.For self-hosted instances, trace data collection begins when the feature is enabled via the following environment variables, or after upgrading to a version with it enabled by default.LangSmith Deployment usage uses a separate data source. For more details, refer to the LangSmith Deployment section.
kind query parameter:
- Trace usage (
kind=traces, default): number of traces ingested. - LangSmith Deployment usage (
kind=langsmith_deployments): nodes executed, agent runs, and agent uptime for LangSmith Deployment.
- Track usage across different teams or workspaces
- Identify which users or API keys are consuming the most traces or running the most agents
- 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
- Switch between the LangSmith Traces and LangSmith Deployments sub-tabs to view each domain. The active sub-tab is reflected in the URL (
?tab=tracesor?tab=deployments) so you can bookmark the page to land on the same view. - Use the controls to:
- Select a time range (Last 7 days, 30 days, 3 months, 6 months, 1 year, or custom)
- Group by workspace, project, user, or API key
- Filter to specific workspaces
- On the LangSmith Traces tab, optionally filter by retention tier (
All Retention/Long-lived only/Short-lived only)
- Click Export CSV to download the data for the active tab.
Query parameters
The granular usage endpoint accepts the following 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. |
kind | string | No | traces (default) or langsmith_deployments. Selects the billable domain. |
group_by | string | No | Dimension to group by. One of: workspace, project, user, api_key. Default: workspace. |
trace_tier | string | No | Trace-only retention filter: longlived or shortlived. Omit for all retention. Ignored when kind=langsmith_deployments. |
Day-granular contract
Usage data is aggregated at day granularity. The endpoint normalizes the window to whole days at the API layer:start_timeis rounded down to its day’s UTC midnight.end_timeis rounded up to the next UTC midnight (no-op when already at midnight).- Any day overlapping the requested window is included in full.
2026-01-01T12:00:00Z to 2026-01-02T12:00:00Z therefore returns usage for the full Jan 1 and Jan 2 buckets.
Stride
Thestride field in each response indicates the time bucket size used for aggregation, calculated from the requested time range. Daily is the minimum. Sub-day windows still bucket at one day.
| Time range | Aggregation | Stride |
|---|---|---|
| Up to 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 |
Compatibility
kind=langsmith_deployments combined with group_by=trace_tier returns 400 Bad Request. Retention tiers only apply to traces.
API endpoint
kind continue to get trace usage with the same response shape they always did.
Trace usage (kind=traces)
Response
Example: Get trace usage by workspace
Example: Get trace usage by user, filtered to long-lived retention only
LangSmith Deployment usage (kind=langsmith_deployments)
Each record carries three metrics together so a single fetch powers the whole Deployment view.
LangSmith Deployment usage is sourced separately from trace usage and is available for the full retention window of your deployment usage.For self-hosted instances, the Deployment usage endpoint is opt-in. Enable it via:Or upgrade to a LangSmith version that enables it by default (see self-hosted changelog).
Response
| Field | Description |
|---|---|
nodes_executed | Total LangGraph nodes executed in the time bucket. |
agent_runs | Total agent runs (graph invocations) in the time bucket. |
agent_uptime_seconds | Total replica uptime, in seconds, summed across deployment replicas. The deduplicated standby minutes used for invoicing is computed separately by the billing pipeline; this field is the raw sum surfaced for breakdown and analysis. |
Example: Get Deployment usage by workspace
CSV export
kind. Returns a CSV file with one row per (time bucket, dimension) tuple. All dimension columns are always present; only the columns matching the selected group_by are populated.
For kind=traces, the value column is Traces. For kind=langsmith_deployments, the value columns are Nodes Executed, Agent Runs, and Agent Uptime (seconds).
| Column | Present when |
|---|---|
| Time Bucket Start | Always |
| Time Bucket End | Always |
| Workspace ID / Name | Always (populated when group_by=workspace) |
| Project ID / Name | Always (populated when group_by=project) |
| User ID / Email | Always (populated when group_by=user) |
| API Key Short Key | Always (populated when group_by=api_key) |
| Traces | kind=traces |
| Nodes Executed / Agent Runs / Agent Uptime (seconds) | kind=langsmith_deployments |
=, +, -, @, tab, or carriage-return are tab-prefixed to neutralize spreadsheet formula evaluation in Excel / Google Sheets / LibreOffice.
Grouping options
Thegroup_by parameter determines how usage data is aggregated:
| Value | Description | Dimensions returned | Available for |
|---|---|---|---|
workspace | Group by workspace | workspace_id, workspace_name | Both kinds |
project | Group by project | project_id, project_name | Both kinds |
user | Group by user | user_id, user_email | Both kinds |
api_key | Group by API key | api_key_short_key | Both kinds |
Related resources
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

