Discover what the trace filter fields hold
import requests
url = "https://app.langwatch.ai/api/v1/traces/facets"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/traces/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/traces/facets \
--header 'X-Auth-Token: <api-key>'{
"facets": [
{
"key": "<string>",
"kind": "categorical",
"label": "<string>",
"group": "trace",
"topValues": [
{
"value": "<string>",
"count": 123,
"label": "<string>",
"aggregates": {
"passedCount": 123,
"failedCount": 123,
"erroredCount": 123,
"scoreMin": 123,
"scoreMax": 123,
"hasScore": true,
"distinctScores": 123,
"hasLabel": true,
"labelValues": [
{
"value": "<string>",
"count": 123
}
]
},
"eventMetrics": [
{
"key": "<string>",
"values": [
{
"value": "<string>",
"count": 123
}
]
}
]
}
],
"totalDistinct": 123
}
],
"pending": true
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Traces
Discover what the trace filter fields hold
Discover what the trace filter fields hold in this project. Without field, every facet with its top values. With field, that field’s values, paged.
GET
/
api
/
v1
/
traces
/
facets
Discover what the trace filter fields hold
import requests
url = "https://app.langwatch.ai/api/v1/traces/facets"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/traces/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/traces/facets \
--header 'X-Auth-Token: <api-key>'{
"facets": [
{
"key": "<string>",
"kind": "categorical",
"label": "<string>",
"group": "trace",
"topValues": [
{
"value": "<string>",
"count": 123,
"label": "<string>",
"aggregates": {
"passedCount": 123,
"failedCount": 123,
"erroredCount": 123,
"scoreMin": 123,
"scoreMax": 123,
"hasScore": true,
"distinctScores": 123,
"hasLabel": true,
"labelValues": [
{
"value": "<string>",
"count": 123
}
]
},
"eventMetrics": [
{
"key": "<string>",
"values": [
{
"value": "<string>",
"count": 123
}
]
}
]
}
],
"totalDistinct": 123
}
],
"pending": true
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.
Query Parameters
Required string length:
1 - 512Maximum string length:
512Required range:
1 <= x <= 1000Required range:
0 <= x <= 9007199254740991Response
Without field, every facet the project has with its top values and whether the payload is still being computed. With field, that field's values and counts plus the distinct total and whether more remain.
Last modified on October 12, 2026
Was this page helpful?