> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai search benchmarks

Search for benchmark results using custom query

## Usage

```bash theme={null}
vastai search benchmarks [--help] [--api-key API_KEY] [--raw] <query>
```

## Arguments

<ParamField path="query" type="string" required>
  Search query in simple query syntax (see below)
</ParamField>

## Description

Query syntax:

query = comparison comparison...
comparison = field op value
field = \<name of a field>
op = one of: \<, \<=, ==, !=, >=, >, in, notin
value = \<bool, int, float, string> | 'any' | \[value0, value1, ...]
bool: True, False

note: to pass '>' and '\<' on the command line, make sure to use quotes
note: to encode a string query value (ie for gpu\_name), replace any spaces ' ' with underscore '\_'

## Examples

```bash theme={null}
# search for benchmarks with value > 100 on RTX 4090s for 2 specific machines
    vastai search benchmarks 'value > 100.0  gpu_name=RTX_4090  machine_id in [302,402]'

Available fields:

      Name                  Type       Description

    contract_id             int        ID of instance/contract reporting benchmark
    gpu_name                string     GPU model benchmarked (e.g. RTX_4090)
    id                      int        benchmark unique ID
    image                   string     image used for benchmark
    last_update             float      date of benchmark
    launch_args             string     launch args of the benchmarked worker
    machine_id              int        id of machine benchmarked
    num_gpus                int        number of gpus used in benchmark
    template_hash           string     hash of the template benchmarked (formerly 'name')
    template_id             int        id of the template benchmarked
    type                    string     benchmark type
    value                   float      benchmark result (formerly 'score')
```

## Global Options

The following options are available for all commands:

| Option          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `--url URL`     | Server REST API URL                                   |
| `--retry N`     | Retry limit                                           |
| `--raw`         | Output machine-readable JSON                          |
| `--explain`     | Verbose explanation of API calls                      |
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |
