> This page is for Gateway.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# List runs

GET https://api-gateway.merge.dev/v1/evals/suites/{suite_id}/runs

The suite's runs, newest first, keyset-paginated over (created\_at, id).

Same `{results, next, previous}` envelope as the other `/v1` lists.

Reference: https://docs.merge.dev/merge-gateway/evals-api/runs/list-runs

## Authentication

- `Authorization` header (bearer token, required) — Your gateway API key (mg_ prefix), the same key used for /v1/responses

## Request

### Path parameters

- `suite_id` (string, required)

### Query parameters

- `cursor` (string, optional, nullable)
- `limit` (integer, optional, default: 20)

## Response

### 200

Successful Response

- `results` (list of RunOut, required)
- `next` (string, required, nullable) — Cursor for the next page, or null on the last page
- `previous` (string, required, nullable) — Always null; reserved

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### RunOut

- `id` (string, required)
- `suite_id` (string, required)
- `target_model` (string, required)
- `status` (string, required)
- `trigger_source` (string, required)
- `suite_config_snapshot` (map from string to any, required)
- `pass_count` (integer, required)
- `fail_count` (integer, required)
- `error_count` (integer, required)
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `execution_mode` (string, optional, default: gateway)
- `metadata` (map from string to any, optional, nullable)
- `migration_id` (string, optional, nullable)
- `triggered_by` (string, optional, nullable)
- `passed` (boolean, optional, nullable)
- `total_cost_usd` (double, optional, nullable)
- `judge_cost_usd` (double, optional, nullable)
- `estimated_cost_usd` (double, optional, nullable)
- `trace_id` (string, optional, nullable)
- `error` (string, optional, nullable)
- `trials` (integer, optional, default: 1)
- `started_at` (datetime, optional, nullable)
- `completed_at` (datetime, optional, nullable)
- `total_cases` (integer, optional, default: 0)
- `completed_cases` (integer, optional, default: 0)
- `pass_rate` (double, optional, nullable)
- `ci_low` (double, optional, nullable)
- `ci_high` (double, optional, nullable)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "results": [
    {
      "id": "string",
      "suite_id": "string",
      "target_model": "string",
      "status": "string",
      "trigger_source": "string",
      "suite_config_snapshot": {},
      "pass_count": 1,
      "fail_count": 1,
      "error_count": 1,
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "execution_mode": "gateway",
      "metadata": {},
      "migration_id": "string",
      "triggered_by": "string",
      "passed": true,
      "total_cost_usd": 1.1,
      "judge_cost_usd": 1.1,
      "estimated_cost_usd": 1.1,
      "trace_id": "string",
      "error": "string",
      "trials": 1,
      "started_at": "2024-01-15T09:30:00Z",
      "completed_at": "2024-01-15T09:30:00Z",
      "total_cases": 0,
      "completed_cases": 0,
      "pass_rate": 1.1,
      "ci_low": 1.1,
      "ci_high": 1.1
    }
  ],
  "next": "string",
  "previous": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api-gateway.merge.dev/v1/evals/suites/suite_id/runs"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api-gateway.merge.dev/v1/evals/suites/suite_id/runs';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-gateway.merge.dev/v1/evals/suites/suite_id/runs"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-gateway.merge.dev/v1/evals/suites/suite_id/runs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-gateway.merge.dev/v1/evals/suites/suite_id/runs")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gateway.merge.dev/v1/evals/suites/suite_id/runs', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api-gateway.merge.dev/v1/evals/suites/suite_id/runs");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway.merge.dev/v1/evals/suites/suite_id/runs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```