---
title: "Fetch shared experiment runs for dataset examples"
method: POST
path: "/api/v2/datasets/public/{share_token}/experiment-runs"
tags: ["datasets"]
---

# Fetch shared experiment runs for dataset examples

`POST /api/v2/datasets/public/{share_token}/experiment-runs`

## Request

- Base URL: `https://api.smith.langchain.com`
- URL: `https://api.smith.langchain.com/api/v2/datasets/public/{share_token}/experiment-runs`
- Auth: none declared

Public share-token variant of POST /v2/datasets/{dataset_id}/experiment-runs.
Returns a paginated page of dataset examples with runs from the requested experiments.

Self-hosted deployments require LangSmith `v0.16` or later.

## Path parameters

- `share_token` string, required

## Request body

- DatasetsV2DatasetsExperimentRunsRequestBody
  - `comparative_experiment_id` string: `comparative_experiment_id` scopes pairwise-annotation feedback (optional).
  - `cursor` string: `cursor` is the opaque string from a previous response's `next_cursor`. Absent for the first page.
  - `example_ids` string[]: `example_ids` optionally restricts the page to these dataset example UUIDs (max 1000).
  - `experiment_ids` string[]: `experiment_ids` lists the experiment (tracing session) UUIDs to query. Required, non-empty.
  - `filters` object: `filters` maps a project (session) UUID string to a list of filter expressions (optional).
  - `page_size` integer: `page_size` is the maximum number of examples to return. Defaults to 20, max 100.
  - `selects` QueryRunSelectField[]: `selects` lists which run properties to include. Omitted => only `id`. Tokens mirror /v2/runs/query.
  - `sort` DatasetsV2DatasetsExperimentRunsSort
    - `by` string: `by` is the feedback selector, e.g. `feedback.correctness` (the `feedback.` prefix is optional).
    - `order` string: `order` is `ASC` or `DESC` (defaults to `DESC`).

## Response `200`

OK

- DatasetsV2DatasetsExperimentRunsResponseBody
  - `items` DatasetsV2ExampleWithRuns[]
    - `attachment_urls` object: `attachment_urls` maps each attachment name to a pre-signed download URL.
    - `created_at` string, date-time: `created_at` is when the example was created (RFC3339 date-time).
    - `dataset_id` string, uuid: `dataset_id` is the parent dataset UUID.
    - `id` string, uuid: `id` is the dataset example UUID.
    - `inputs` object: `inputs` is the example input payload (arbitrary JSON object).
    - `metadata` object: `metadata` is arbitrary user-defined JSON metadata on the example.
    - `modified_at` string, date-time: `modified_at` is when the example was last modified (RFC3339 date-time).
    - `name` string: `name` is the example's optional name.
    - `outputs` object: `outputs` is the example reference-output payload (arbitrary JSON object).
    - `runs` QueryRunResponse[]: `runs` is the list of experiment runs produced for this example.
      - `app_path` string: `app_path` identifies the application code location that produced this run, if recorded.
      - `attachments` QueryRunAttachmentURLs
      - `completion_cost` number: `completion_cost` is estimated USD cost for the completion.
      - `completion_cost_details` QueryRunCompletionCostDetails
        - `raw` object: `raw` maps each category name to its estimated USD cost.
      - `completion_token_details` QueryRunCompletionTokenDetails
        - `raw` object: `raw` maps each category name to its completion-token count.
      - `completion_tokens` integer: `completion_tokens` is the completion-side token count.
      - `dotted_order` string: `dotted_order` is the hierarchical ordering key for trace trees.
      - `end_time` string, date-time: `end_time` is when the run ended (RFC3339 date-time). JSON null if the run has not finished yet.
      - `error` string: `error` is the error message when `status` indicates failure.
      - `error_preview` string: `error_preview` is a truncated plain-text error snippet.
      - `events` QueryRunEvent[]: `events` is the ordered list of run events (for example streaming tokens).
        - `kwargs` object: `kwargs` is the event payload — an opaque JSON object whose shape depends on `name` and on the emitting SDK. For example LangChain emits `{"token": {...}}` for `new_token` events, tool-call start/end details for tool events, and arbitrary user-defined payloads for custom events. Clients should treat `kwargs` as untyped JSON: do not assume specific keys exist for a given `name`, and tolerate additional unknown keys appearing over time.
        - `name` string: `name` is the event kind. Common values emitted by the LangChain/LangSmith tracer SDKs include `"start"`, `"end"`, and `"new_token"`, but applications may emit arbitrary strings for their own instrumentation.
        - `time` string, date-time: `time` is when the event occurred (RFC3339 date-time with millisecond precision).
      - `extra` object: `extra` is additional runtime JSON attached to the run.
      - `feedback_stats` QueryRunFeedbackStats
      - `first_token_time` string, date-time: `first_token_time` is when the first output token was produced (RFC3339 date-time), when recorded for streamed runs.
      - `id` string, uuid: `id` is this run's UUID.
      - `inputs` object: `inputs` is the run input payload (arbitrary JSON object).
      - `inputs_preview` string: `inputs_preview` is a truncated plain-text preview of inputs.
      - `is_in_dataset` boolean: `is_in_dataset` is true when this run is linked to a dataset example.
      - `is_root` boolean: `is_root` is true when this run has no parent (it is the trace root).
      - `last_queued_at` string, date-time: `last_queued_at` is the most recent time this run was added to an annotation queue.
      - `latency_seconds` number: `latency_seconds` is wall-clock duration from start to end in seconds.
      - `ls_user_id` string, uuid: `ls_user_id` identifies the LangSmith user whose credential traced the run. It is absent for runs traced with a service-account API key, which has no associated user.
      - `manifest` object: `manifest` is the serialized configuration of the traced component (for example the model parameters, prompt template, or pipeline definition), when recorded.
      - `metadata` object: `metadata` is arbitrary user-defined JSON metadata.
      - `name` string: `name` is a human-readable label for the run (for example the model name, function name, or step name chosen when the run was traced).
      - `outputs` object: `outputs` is the run output payload (arbitrary JSON object).
      - `outputs_preview` string: `outputs_preview` is a truncated plain-text preview of outputs.
      - `parent_run_ids` string[]: `parent_run_ids` lists ancestor run UUIDs from the trace root down to the direct parent.
      - `price_model_id` string, uuid: `price_model_id` identifies the pricing model UUID used for cost estimates, when recorded.
      - `project_id` string, uuid: `project_id` is the tracing project UUID this run was logged to.
      - `prompt_cost` number: `prompt_cost` is estimated USD cost for the prompt.
      - `prompt_cost_details` QueryRunPromptCostDetails
        - `raw` object: `raw` maps each category name to its estimated USD cost.
      - `prompt_token_details` QueryRunPromptTokenDetails
        - `raw` object: `raw` maps each category name to its prompt-token count.
      - `prompt_tokens` integer: `prompt_tokens` is the prompt-side token count.
      - `query_metadata` object, nullable: `query_metadata` describes this query result, including `sem_filter_score` when a semantic filter is used. Returned automatically by run queries, or null when unavailable.
      - `reference_dataset_id` string, uuid: `reference_dataset_id` is the dataset UUID for the reference example, if any.
      - `reference_example_id` string, uuid: `reference_example_id` is the dataset example UUID this run was compared against, if any.
      - `run_type` 'TOOL' | 'CHAIN' | 'LLM' | 'RETRIEVER' | 'EMBEDDING' | 'PROMPT' | 'PARSER'
      - `share_url` string: `share_url` is the fully-qualified URL of this run's public view, rooted at the deployment's LangSmith app origin (for example `https://smith.langchain.com/public/4f7a1b2c-8d9e-4a0b-9c1d-2e3f4a5b6c7d/r`). It is returned only when `SHARE_URL` is included in `selects`, and only when the run has been explicitly shared; the URL remains stable until the run is unshared. Anyone with this URL can view the run anonymously, so treat it as a secret and do not log it.
      - `start_time` string, date-time: `start_time` is when the run started (RFC3339 date-time).
      - `status` 'SUCCESS' | 'ERROR' | 'PENDING'
      - `tags` string[]: `tags` lists user-defined tags on this run.
      - `thread_evaluation_time` string, date-time: `thread_evaluation_time` is thread-level evaluation timing (RFC3339 date-time), when recorded.
      - `thread_id` string, uuid: `thread_id` is the conversation thread UUID this run belongs to, if any.
      - `total_cost` number: `total_cost` is total estimated USD cost (prompt plus completion).
      - `total_tokens` integer: `total_tokens` is prompt plus completion tokens.
      - `trace_id` string, uuid: `trace_id` is the root trace UUID; for a root run it matches `id`.
    - `source_run_id` string, uuid: `source_run_id` is the run UUID the example was created from, if any.
  - `next_cursor` string

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `422`: Unprocessable Entity
- `500`: Internal Server Error
- `502`: Bad Gateway

## Changes

- **2026-10-16** `1a8ee9358d81`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/langchain-ai/apis/langsmith/changes/api/v2/datasets/public/:share_token/experiment-runs/post.md)

---

[API](https://skmtc.dev/langchain-ai/apis/langsmith.md) - [All operations](https://skmtc.dev/langchain-ai/apis/langsmith/llms.txt) - [OpenAPI document](https://skmtc.dev/langchain-ai/apis/langsmith/revisions/28621d1a347a?raw)
