---
title: "Get runs"
method: GET
path: "/v1/runs"
tags: ["Runs"]
---

# Get runs

`GET /v1/runs`

## Request

- Base URL: `https://api.lunary.ai`
- URL: `https://api.lunary.ai/v1/runs`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lunary/apis/lunary-api/docs/v1/runs/get.ts> (a function with typed inputs; its response is checked against the schema)

The Runs API endpoint allows you to retrieve data about specific runs from your Lunary application.

The most common run types are 'llm', 'agent', 'chain', 'tool', 'thread' and 'chat'.

It supports various filters to narrow down the results according to your needs.

This endpoint supports GET requests and expects query parameters for filtering the results.

## Query parameters

- `type` 'llm' | 'trace' | 'thread'
- `search` string
- `models` string[]
- `tags` string[]
- `tokens` string
- `exportType` 'csv' | 'jsonl'
- `minDuration` string
- `maxDuration` string
- `startTime` string
- `endTime` string
- `parentRunId` string
- `limit` string
- `page` string
- `order` string
- `sortField` string
- `sortDirection` 'asc' | 'desc'

## Response `200`

Successful response

- object
  - `total` number
  - `page` number
  - `limit` number
  - `data` Run[]
    - `id` string
    - `projectId` string
    - `isPublic` boolean
    - `feedback` Feedback
      - `thumb` 'up' | 'down'
      - `comment` string
    - `parentFeedback` Feedback
      - `thumb` 'up' | 'down'
      - `comment` string
    - `type` string
    - `name` string
    - `createdAt` string, date-time
    - `endedAt` string, date-time
    - `duration` number
    - `templateVersionId` string
    - `templateSlug` string
    - `cost` number
    - `tokens` object
      - `completion` number
      - `prompt` number
      - `total` number
    - `tags` string[]
    - `input` object
    - `output` object
    - `error` object
    - `status` string
    - `siblingRunId` string
    - `params` object
    - `metadata` object
    - `firstMessage` object: First message captured in the conversation thread, when available.
    - `messagesCount` integer: Total number of messages within the conversation thread.
    - `user` object
      - `id` string
      - `externalId` string
      - `createdAt` string, date-time
      - `lastSeen` string, date-time
      - `props` object

---

[API](https://skmtc.dev/lunary/apis/lunary-api.md) - [All operations](https://skmtc.dev/lunary/apis/lunary-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lunary/apis/lunary-api/revisions/a38233713bdc?raw)
