Traces
Search traces
Optimization Studio
Monitoring Integration
- Overview
- Python
- TypeScript
- OpenTelemetry
- Langflow Integration
- Flowise Integration
- REST API Integration
- RAG Context Tracking
- Concepts
- Cookbooks
Evaluations
Guardrails
User Events
- Overview
- Events
DSPy Visualization
More Features
API Endpoints
Traces
Search traces
Search for traces based on given criteria
POST
/
api
/
trace
/
search
curl --request POST \
--url https://app.langwatch.ai/api/trace/search \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"query": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"pageSize": 1000,
"scrollId": "123",
"filters": {}
}'
{
"traces": [
{
"trace_id": "<string>",
"project_id": "<string>",
"timestamps": {
"inserted_at": 123,
"started_at": 123,
"updated_at": 123
},
"input": {
"value": "<string>",
"satisfaction_score": 123
},
"output": {
"value": "<string>"
},
"metadata": {
"sdk_language": "<string>",
"sdk_version": "<string>"
},
"metrics": {
"tokens_estimated": true,
"completion_tokens": 123,
"prompt_tokens": 123,
"total_cost": 123,
"total_time_ms": 123,
"first_token_ms": 123
},
"indexing_md5s": [
"<string>"
],
"error": "<string>",
"evaluations": [
{
"evaluation_id": "<string>",
"score": 123,
"timestamps": {
"finished_at": 123,
"updated_at": 123
},
"evaluator_id": "<string>",
"name": "<string>",
"details": "<string>",
"passed": true,
"label": "<string>",
"type": "<string>",
"status": "<string>"
}
],
"contexts": [
"<any>"
]
}
],
"pagination": {
"scrollId": "123",
"totalHits": 1254
}
}
Authorizations
Body
application/json
Response
200 - application/json
Successful response
curl --request POST \
--url https://app.langwatch.ai/api/trace/search \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"query": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"pageSize": 1000,
"scrollId": "123",
"filters": {}
}'
{
"traces": [
{
"trace_id": "<string>",
"project_id": "<string>",
"timestamps": {
"inserted_at": 123,
"started_at": 123,
"updated_at": 123
},
"input": {
"value": "<string>",
"satisfaction_score": 123
},
"output": {
"value": "<string>"
},
"metadata": {
"sdk_language": "<string>",
"sdk_version": "<string>"
},
"metrics": {
"tokens_estimated": true,
"completion_tokens": 123,
"prompt_tokens": 123,
"total_cost": 123,
"total_time_ms": 123,
"first_token_ms": 123
},
"indexing_md5s": [
"<string>"
],
"error": "<string>",
"evaluations": [
{
"evaluation_id": "<string>",
"score": 123,
"timestamps": {
"finished_at": 123,
"updated_at": 123
},
"evaluator_id": "<string>",
"name": "<string>",
"details": "<string>",
"passed": true,
"label": "<string>",
"type": "<string>",
"status": "<string>"
}
],
"contexts": [
"<any>"
]
}
],
"pagination": {
"scrollId": "123",
"totalHits": 1254
}
}