# Search Images

You can search images across your workspace using [RoboQL](https://docs.roboflow.com/datasets/search-and-filter) and optionally export matching results as a downloadable dataset.

## Search

```bash
roboflow search "<query>"
```

### Options

| Flag       | Description                               |
| ---------- | ----------------------------------------- |
| `--limit`  | Max results to return (default: 50)       |
| `--cursor` | Continuation token for pagination         |
| `--fields` | Comma-separated list of fields to include |

### Examples

Search for images with a specific tag:

```bash
roboflow search "tag:reviewed"
```

Search for images containing a specific class:

```bash
roboflow search "class:person" --limit 100
```

## Export Search Results

Add `--export` to download matching images as a dataset:

```bash
roboflow search "<query>" --export -f <format> -l <location>
```

### Export Options

| Flag                       | Description                          |
| -------------------------- | ------------------------------------ |
| `--export`                 | Enable export mode                   |
| `-f`, `--format`           | Annotation format (default: coco)    |
| `-l`, `--location`         | Local directory to save the export   |
| `-d`, `--dataset`          | Limit to a specific project          |
| `-g`, `--annotation-group` | Limit to a specific annotation group |
| `--name`                   | Optional name for the export         |
| `--no-extract`             | Keep zip file, skip extraction       |

### Examples

Export all reviewed images in COCO format:

```bash
roboflow search "tag:reviewed" --export -f coco -l ./reviewed-export
```

Export images from a specific project in YOLOv8 format:

```bash
roboflow search "class:car" --export -d my-project -f yolov8 -l ./cars
```

## JSON Output

```bash
roboflow search "tag:reviewed" --json
```

```json
{
  "results": [...],
  "total": 42,
  "cursor": "next-page-token"
}
```

Use the `cursor` value for pagination:

```bash
roboflow search "tag:reviewed" --cursor "next-page-token" --json
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/developer/command-line-interface/search-images.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
