# listRuns

> **Method** in `langsmith`

📖 [View in docs](https://reference.langchain.com/javascript/langsmith/client/Client/listRuns)

List runs from the LangSmith server.

## Signature

```javascript
listRuns(props: ListRunsParams): AsyncIterable<Run>
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `props` | `ListRunsParams` | Yes |  |

## Returns

`AsyncIterable<Run>`

- The runs.

## Examples

### Example 1

```ts
// List all runs in a project
const projectRuns = client.listRuns({ projectName: "<your_project>" });
```

### Example 2

```ts
// List LLM and Chat runs in the last 24 hours
const todaysLLMRuns = client.listRuns({
  projectName: "<your_project>",
  start_time: new Date(Date.now() - 24 * 60 * 60 * 1000),
  run_type: "llm",
});
```

### Example 3

```ts
// List traces in a project
const rootRuns = client.listRuns({
  projectName: "<your_project>",
  execution_order: 1,
});
```

### Example 4

```ts
// List runs without errors
const correctRuns = client.listRuns({
  projectName: "<your_project>",
  error: false,
});
```

### Example 5

```ts
// List runs by run ID
const runIds = [
  "a36092d2-4ad5-4fb4-9c0d-0dba9a2ed836",
  "9398e6be-964f-4aa4-8ae9-ad78cd4b7074",
];
const selectedRuns = client.listRuns({ run_ids: runIds });
```

### Example 6

```ts
// List all "chain" type runs that took more than 10 seconds and had `total_tokens` greater than 5000
const chainRuns = client.listRuns({
  projectName: "<your_project>",
  filter: 'and(eq(run_type, "chain"), gt(latency, 10), gt(total_tokens, 5000))',
});
```

### Example 7

```ts
// List all runs called "extractor" whose root of the trace was assigned feedback "user_score" score of 1
const goodExtractorRuns = client.listRuns({
  projectName: "<your_project>",
  filter: 'eq(name, "extractor")',
  traceFilter: 'and(eq(feedback_key, "user_score"), eq(feedback_score, 1))',
});
```

### Example 8

```ts
// List all runs that started after a specific timestamp and either have "error" not equal to null or a "Correctness" feedback score equal to 0
const complexRuns = client.listRuns({
  projectName: "<your_project>",
  filter: 'and(gt(start_time, "2023-07-15T12:34:56Z"), or(neq(error, null), and(eq(feedback_key, "Correctness"), eq(feedback_score, 0.0))))',
});
```

### Example 9

```ts
// List all runs where `tags` include "experimental" or "beta" and `latency` is greater than 2 seconds
const taggedRuns = client.listRuns({
  projectName: "<your_project>",
  filter: 'and(or(has(tags, "experimental"), has(tags, "beta")), gt(latency, 2))',
});
```

## ⚠️ Deprecated

Use `client.runs.query()` instead. See https://docs.langchain.com/langsmith/smithdb-sdk-migration-query-runs#runs-query for the migration guide. Will be removed after Jan 31, 2027.

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/aadfe00ed2cf31808d14a32646e73030a9eeb0b5/js/src/client.ts#L3368)