Skip to content

Commit 7a8e3b5

Browse files
docs(changelog): add Scores API v3 entry (#3082)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 0376c4b commit 7a8e3b5

3 files changed

Lines changed: 55 additions & 7 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
date: 2026-06-10
3+
title: "Scores API v3"
4+
description: Cursor-based pagination, a typed value field, and list-based filters with numeric ranges on the new GET /api/public/v3/scores endpoint.
5+
author: Niklas
6+
---
7+
8+
import { ChangelogHeader } from "@/components/changelog/ChangelogHeader";
9+
10+
<ChangelogHeader />
11+
12+
<Callout type="info">
13+
The previous `/api/public/v2/scores` endpoints are deprecated. On deployments
14+
fully migrated to [Langfuse v4](/docs/v4), they return a 404 error — switch
15+
to `/api/public/v3/scores`.
16+
</Callout>
17+
18+
The new `GET /api/public/v3/scores` endpoint makes querying scores faster and simpler: cursor-based pagination, a single typed `value` field, and filters that accept lists of values and numeric ranges.
19+
20+
```
21+
GET /api/public/v3/scores?dataType=NUMERIC&name=hallucination,toxicity&valueMax=0.5
22+
```
23+
24+
Common cases this simplifies:
25+
26+
- **Compare experiment runs** by fetching the scores of one or more dataset runs in a single request, e.g. `experimentId=run-a,run-b`.
27+
- **Pull only failing evals** by combining `name`, `dataType=NUMERIC`, and `valueMax` in a single request instead of filtering client-side.
28+
- **Audit annotations per reviewer** with the new `authorUserId` filter, e.g. `source=ANNOTATION&authorUserId=user-123`.
29+
30+
**One typed `value` field.** The v2 split between a numeric `value` and a separate `stringValue` is gone. v3 returns a single `value` whose type follows the `dataType`: a number for `NUMERIC`, a boolean for `BOOLEAN`, and a string for `CATEGORICAL`, `TEXT`, and `CORRECTION`. No more decoding booleans from `1`/`0` or looking up category strings.
31+
32+
**Cursor-based pagination.** Pass `limit` (max 100) and follow the `cursor` from the response `meta` to fetch the next page; it's absent on the final page. This replaces v2's `page` parameter. For recurring full exports to your data warehouse, use the [scheduled blob storage export](/docs/api-and-data-platform/features/export-to-blob-storage) instead of paginating through the API.
33+
34+
**List filters and value ranges.** Most filters now take comma-separated lists — `id`, `name`, `source`, `dataType`, `environment`, `configId`, `queueId`, `authorUserId`, `traceId`, `sessionId`, `observationId`, and `experimentId` (previously `datasetRunId`). Values within one parameter are OR-ed, parameters are AND-ed: `name=hallucination,toxicity&source=EVAL` returns eval scores named either `hallucination` or `toxicity`. The v2 `operator`/`value` pair is replaced by an exact-match `value` list (for `NUMERIC`, `BOOLEAN`, and `CATEGORICAL` scores) plus `valueMin`/`valueMax` range bounds for numeric scores.
35+
36+
**Selective field retrieval.** Responses always include the core fields — `id`, `projectId`, `name`, `value`, `dataType`, `source`, `timestamp`, `environment`, `createdAt`, and `updatedAt` — and stay lean by default; opt into additional field groups via the `fields` parameter:
37+
38+
```
39+
GET /api/public/v3/scores?fields=details,subject,annotation
40+
```
41+
42+
- `details``comment`, `configId`, `metadata`
43+
- `subject` — what the score is attached to, as a discriminated object (`kind`: `trace`, `observation`, `session`, or `experiment`) replacing v2's flat `traceId`/`observationId`/`sessionId`/`datasetRunId` fields
44+
- `annotation``authorUserId`, `queueId`
45+
46+
**Migrating from v2.** v3 queries scores directly instead of joining traces, which keeps response times predictable at any volume. Filters therefore target score properties: for trace-level questions like "scores for traces of user X", the [Metrics API](/docs/metrics/features/metrics-api) replaces the v2 `userId` and `traceTags` filters and the `trace` field group. Every filter is now an explicit, typed parameter, replacing v2's JSON-stringified `filter` argument, and fetching a single score works through the `id` filter, replacing the get-by-id endpoint. Invalid filter combinations are rejected with HTTP 400.
47+
48+
The full parameter reference is in the [API docs](https://api.reference.langfuse.com/#tag/scores/GET/api/public/v3/scores).

content/docs/evaluation/evaluation-methods/scores-via-sdk.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ with langfuse.start_as_current_observation(as_type="span", name="my-operation"):
138138

139139
</Tab>
140140
<Tab>
141-
Boolean scores must be provided as a float. The value's string equivalent will be automatically populated and is accessible on read. See [API reference](/docs/api) for more details on POST/GET scores endpoints.
141+
Boolean scores must be provided as a float, where `1` is true and `0` is false. When read via the [v3 scores API](https://api.reference.langfuse.com/#tag/scores/GET/api/public/v3/scores), the value is returned as a boolean. See [API reference](/docs/api) for more details on POST/GET scores endpoints.
142142

143143
```python
144144
from langfuse import get_client
@@ -295,7 +295,7 @@ await langfuse.flush();
295295

296296
</Tab>
297297
<Tab>
298-
Boolean scores must be provided as a float. The value's string equivalent will be automatically populated and is accessible on read. See [API reference](/docs/api) for more details on POST/GET scores endpoints.
298+
Boolean scores must be provided as a float, where `1` is true and `0` is false. When read via the [v3 scores API](https://api.reference.langfuse.com/#tag/scores/GET/api/public/v3/scores), the value is returned as a boolean. See [API reference](/docs/api) for more details on POST/GET scores endpoints.
299299

300300
```ts
301301
import { LangfuseClient } from "@langfuse/client";
@@ -345,7 +345,7 @@ await langfuse.flush();
345345
</Tab>
346346
<Tab>
347347

348-
You can also create scores directly via the [REST API](https://api.reference.langfuse.com/#tag/score/POST/api/public/scores). Authenticate using HTTP Basic Auth with your Langfuse Public Key as username and Secret Key as password.
348+
You can also create scores directly via the [REST API](https://api.reference.langfuse.com/#tag/legacyscorev1/POST/api/public/scores). Authenticate using HTTP Basic Auth with your Langfuse Public Key as username and Secret Key as password.
349349

350350
<Tabs items={["Numeric", "Categorical", "Boolean", "Text"]}>
351351
<Tab>
@@ -385,7 +385,7 @@ curl -X POST https://cloud.langfuse.com/api/public/scores \
385385

386386
</Tab>
387387
<Tab>
388-
Boolean scores must be provided as a float (`0` or `1`). The value's string equivalent will be automatically populated and is accessible on read.
388+
Boolean scores must be provided as a float, where `1` is true and `0` is false. When read via the [v3 scores API](https://api.reference.langfuse.com/#tag/scores/GET/api/public/v3/scores), the value is returned as a boolean.
389389

390390
```bash
391391
curl -X POST https://cloud.langfuse.com/api/public/scores \
@@ -745,7 +745,7 @@ await langfuse.flush();
745745
</Tab>
746746
<Tab>
747747

748-
You can also enforce score configs via the [REST API](https://api.reference.langfuse.com/#tag/score/POST/api/public/scores) by providing a `configId`.
748+
You can also enforce score configs via the [REST API](https://api.reference.langfuse.com/#tag/legacyscorev1/POST/api/public/scores) by providing a `configId`.
749749

750750
<Tabs items={["Numeric Scores", "Categorical Scores", "Boolean Scores", "Text Scores"]}>
751751
<Tab>
@@ -842,7 +842,7 @@ Certain score properties might be inferred based on your input:
842842

843843
- **If you don't provide a score data type** it will always be inferred. See tables below for details.
844844
- **For boolean and categorical scores**, we will provide the score value in both numerical and string format where possible. The score value format that is not provided as input, i.e. the translated value is referred to as the inferred value in the tables below.
845-
- **On read for boolean scores both** numerical and string representations of the score value will be returned, e.g. both 1 and True.
845+
- **On read via the [v3 scores API](https://api.reference.langfuse.com/#tag/scores/GET/api/public/v3/scores)**, boolean scores are returned as a single boolean `value`.
846846
- **For categorical scores**, the string representation is always provided and a numerical mapping of the category will be produced only if a `ScoreConfig` was provided.
847847

848848
Detailed Examples:

content/docs/observability/features/corrections.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Coming soon: Fetch corrections via the SDK.
146146
<Tab>
147147

148148
```bash
149-
curl -X GET "https://cloud.langfuse.com/api/public/scores?dataType=CORRECTION" \
149+
curl -X GET "https://cloud.langfuse.com/api/public/v3/scores?dataType=CORRECTION&fields=subject,details" \
150150
-H "Authorization: Basic <base64_encoded_credentials>"
151151
```
152152

0 commit comments

Comments
 (0)