---
updatedAt: 2026-07-28T10:25:05.000Z
agentTools:
  projectIndex: https://doc.superannotate.com/llms.txt
---

# Queries

When you’re in the **Explore** tab, you'll see a query search bar above your items. This bar uses a custom SuperAnnotate query language to filter items with a range of parameters (e.g. item status, metadata, assignment, individual component values etc.). You can also combine multiple statements with logical operators such as `AND` and `OR`.

When you've built a query, if you want to reuse it in the future, you can [save](https://doc.superannotate.com/docs/queries#save-query) it for convenience.

## Metadata

The item's metadata information can be filtered using the `metadata` field, and any of its applicable nested parameters. Here are the nested parameters available:

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Parameters
      </th>

      <th>
        Value
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        status
      </td>

      <td>
        For system workflows: `NotStarted`, `InProgress`, `QualityCheck`, `Returned`, `Completed`, and `Skipped`.

        For a custom workflow, the values depend on the statuses that exist within it.
      </td>
    </tr>

    <tr>
      <td>
        approvalStatus
      </td>

      <td>
        `true`, `false`, and `null`.
      </td>
    </tr>

    <tr>
      <td>
        lastAction.email
      </td>

      <td>
        The value is the email address of the user who updated the item last.
      </td>
    </tr>

    <tr>
      <td>
        lastAction.timestamp
      </td>

      <td>
        The value is a date with this format `YYYY-MM-DD`.
      </td>
    </tr>

    <tr>
      <td>
        name
      </td>

      <td>
        The value is the item's name.
      </td>
    </tr>

    <tr>
      <td>
        priority
      </td>

      <td>
        The value is numeric. This is the [priority score](https://doc.superannotate.com/docs/multimodal-project-settings#priority-score) given to the item.
      </td>
    </tr>

    <tr>
      <td>
        category
      </td>

      <td>
        The value is the [category](https://doc.superannotate.com/docs/multimodal-project-settings#category) name.
      </td>
    </tr>
  </tbody>
</Table>

<Callout icon="📘" theme="info">
  ### Last Action

  For the `lastAction` parameter, updates only count when they change the item's JSON in any way. This doesn't include things like item annotation or assignments, or approval status changes.
</Callout>

<Callout icon="👍" theme="okay">
  ### Examples

  To search items with the `QualityCheck` status:

  `metadata(status = QualityCheck )`

  To search items with the `InProgress` status that are disapproved:

  `metadata(status = InProgress AND approvalStatus = false )`
</Callout>

## Assignment

The `assignment`  can be used to filter items assigned to users by role, email, name, activity status or whether their status as a member is pending.

<Callout icon="👍" theme="okay">
  ### Examples

  To filter items where `Annotator` is `John Smith:`

  `assignment.Annotator(name = John Smith)`

  To filter items where `QA` role is unassigned or any role assignee is `paused`:

  `assignment.QA(email = none) OR assignment(isPaused = true )`

  To filter items where `QA` assignee name contains John and `Audit` assignee has pending state:

  `assignment.QA(name CONTAINS John) AND assignment.Audit(isPending = true )`

  Note that `ROLE` corresponds to a existing role in your project's workflow.
</Callout>

## Component fields

These are the fields that correspond to the <Anchor target="_blank" href="https://doc.superannotate.com/docs/multimodal-component-reference">component types</Anchor> that exist within your form. They can be differentiated by using each component's individual ID after the component type, for example:<br />`number.calculation` where `number` is the component type, and `calculation` is the specific component's ID.

A component's type and ID can be seen when viewing the item in the Explore list, or in ​<Anchor target="_blank" href="https://doc.superannotate.com/docs/using-explore#zoom-view">Zoom View</Anchor>​.

You can also exclude the component's ID if you want to query all components of the same type.

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Parameters
      </th>

      <th>
        Value
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `input`
      </td>

      <td>
        Filters the value of input components in the item.

        Queries for this component are case-insensitive when used with the `CONTAINS` operator.

        You can use `inputLength` instead to query the number of characters in an input component. You may also use `inputLength.ID `where `ID` is the specific component's ID.
      </td>
    </tr>

    <tr>
      <td>
        `textarea`
      </td>

      <td>
        Filters the value of input components in the item.

        Queries for this component are case-insensitive when used with the `CONTAINS` operator.

        You can use `textareaLength` instead to query the number of characters in an `textarea` component. You may also use `textareaLength.ID` where `ID` is the specific component's ID.
      </td>
    </tr>

    <tr>
      <td>
        `number`
      </td>

      <td>
        Value is a manual input after an operator is selected.
      </td>
    </tr>

    <tr>
      <td>
        `slider`
      </td>

      <td>
        Value is a manual input after an operator is selected.
      </td>
    </tr>

    <tr>
      <td>
        `radio`
      </td>

      <td>
        All radio options will be auto-suggested after entering this parameter.

        If you include a component’s ID in the query, only options belonging to that ID will be shown.

        Value can either be a selected option, or a manual input.
      </td>
    </tr>

    <tr>
      <td>
        `checkbox`
      </td>

      <td>
        All checkbox options will be auto-suggested after entering this parameter.

        If you include a component’s ID in the query, only options belonging to that ID will be shown.

        Value can either be a selected option, or a manual input.
      </td>
    </tr>

    <tr>
      <td>
        `rating`
      </td>

      <td>
        Value is a manual input after an operator is selected.
      </td>
    </tr>

    <tr>
      <td>
        `voting`
      </td>

      <td>
        `true`, `false`, and `null`.
      </td>
    </tr>

    <tr>
      <td>
        `select`
      </td>

      <td>
        All select options (except **dynamic**) will be auto-suggested after entering this parameter.

        Querying for **static** options will display a dropdown of existing options in the component. Querying for **dynamic** options will require a free text input.

        If you include a component’s ID in the query, only **static** options belonging to that ID will be shown.

        Value can either be a selected option, or a manual input.
      </td>
    </tr>

    <tr>
      <td>
        `datetime`
      </td>

      <td>
        The value is a date with this format `YYYY-MM-DD`.
      </td>
    </tr>

    <tr>
      <td>
        `code`
      </td>

      <td>
        Filters the value of input components in the item.

        Queries for this component are case-insensitive when used with the `CONTAINS` operator.

        You can use `codeLength` instead to query the number of characters in an `code` component. You may also use `codeLength.ID` where `ID` is the specific component's ID.
      </td>
    </tr>

    <tr>
      <td>
        `paragraph`
      </td>

      <td>
        Filters the value of input components in the item.

        Queries for this component are case-insensitive when used with the `CONTAINS` operator.

        You can use `paragraphLength` instead to query the number of characters in an `paragraph` component. You may also use `paragraphLength.ID` where `ID` is the specific component's ID.
      </td>
    </tr>

    <tr>
      <td>
        `markdown`
      </td>

      <td>
        Filters the value of input components in the item.

        Queries for this component are case-insensitive when used with the `CONTAINS` operator.

        You can use `markdownLength` instead to query the number of characters in an `markdown` component. You may also use `markdownLength.ID` where `ID` is the specific component's ID.
      </td>
    </tr>

    <tr>
      <td>
        `csv`
      </td>

      <td>
        Value is a manual input.

        Queries for this component are case-insensitive when used with the `CONTAINS` operator.

        When querying with the `=` or `!=` operators, you must use the exact expression that’s used in the JSON file. For example: `cell1_text,cell2_text,,\r\n,,,\r\n,,,\r\n,,,`
      </td>
    </tr>

    <tr>
      <td>
        `web_[COMPONENT_ID]`
      </td>

      <td>
        Value is a manual input after an operator is selected and a key name is given.

        For example, if your key has a `Number` value type:

        `[KEY_NAME] >= 10`

        This query will also detect keys that are an array of values that contain the specified value (for example, `[1, 4, 7, 10]`).

        IDs of Web components that don’t contain any [keys](https://doc.superannotate.com/docs/media-components#web) won’t be shown.
      </td>
    </tr>
  </tbody>
</Table>

If you want to query components that don’t have a value entered or selected, you can use the value of `none`.

<Callout icon="👍" theme="okay">
  ### Examples

  To search for items that have a rating of 3 stars or higher for any parameter and are voted `Approved`:

  `rating >= 3 AND voting = true`

  To search for items that have a rating of 3 stars or higher for prompt and whose completion is voted Approved. In this case, the needed **rating** component's ID is `prompt`, and the **voting** component's ID is `completion`.

  `rating.prompt >= 3 AND voting.completion = true`

  To search for items that are marked '`Complete`' for model 1 and '`Incomplete`' for model 2. In this case, there are two **radio** components with the `model1` and `model2` IDs.

  `radio.model1 = Complete AND radio.model2 = Incomplete`

  To search for items whose completion contains the word 'software' and correction contains `SaaS`. In this case, there are two **textarea** components with the `completion` and `correction` IDs.

  `textarea.completion CONTAINS software AND textarea.correction CONTAINS SaaS`
</Callout>

<Callout icon="📘" theme="info">
  ### Comparative querying

  After using an operator and any values you want to filter by, you can also incorporate component IDs to compare values between two components. You can only compare values if they share a value type. Here are the value types, and which components they correspond to:

  - **Numeric** - `number`, `slider`, `rating`, `scores`, `web` (non-array numeric value)
    - Supported operators: `=` , `!=`, `>=`, `<=`, `>`, `<`
  - **Selective** - `select`(single select only),`radio`
    - Supported operators: `=`, `!=`
  - **Date** - `datetime`, `web` (non-array `datetime` key)
    - Supported operators: `=`, `!=`, `>=`, `<=`, `>`, `<`
</Callout>

Here are some example queries that you can try:

<Callout icon="👍" theme="okay">
  ### Examples

  To search for items where `completion` and `prompt` ratings are equal:

  `rating.completion = rating.prompt`

  To search for items `approvalDate` earlier than `reviewDate`(both are `datetime` component value):

  `datetime.approvalDate < datetime.reviewDate`
</Callout>

## Group field

The `Group` field filters all **Group** components used in the project by their unique IDs or any component types that exist within a group in the project. The query can also contain additional, more particular conditions to narrow down your search.

```
group.GROUP_ID.(CHILD_COMPONENT_TYPE.CHILD_COMPONENT_ID)
```

<Callout icon="📘" theme="info">
  ### Querying groups

  When querying groups, you can specify a group component by its ID, and the types and IDs of its child components. For instance, say you have a group with the ID `firstGroup`, and within that group you have a **Text Input** component with the ID `AnswerInput`. Let's assume you want to find the components that contain the word `Red`. Your query should look something like this:

  `group.firstGroup(input.AnswerInput CONTAINS Red)`

  You may use the `AND` operator to include multiple parameters at a time. For example, you have a **Checkbox** component you want to include, with the `CheckboxResponse` ID. In this case, you're looking for a group component that has both a **Text Input** component whose value contains the word `Red`, and a **Checkbox** component whose value equals to `Option 1`. Your query should look something like this:

  `group.firstGroup(input.AnswerInput CONTAINS Red AND checkbox.CheckboxResponse = Option 1)`

  To search for a group that contains _either_ of these components, you can use the `OR` operator instead.
</Callout>

### groupCount

To query your items by the number of group repetitions, you can use the `groupCount` query.

To search for items where the group is repeated over 3 times (in this case, the group component ID is `Answer`): `groupCount.Answer > 3`

To search for items where groups with a rating of 5 are repeated more than 3 times (in this case, the group component ID is `Answer` and it has a rating component within it): `groupCount.Answer(rating=5) > 3`

## Additional fields

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Value
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        comment
      </td>

      <td>
        Value is a manual input after an operator is selected. You may filter by resolved or unresolved comments, or filter them by text.

        You can also use `commentCount` to see how many comments an item has.

        You can use `comment.ID` to specify which comment you want to query.
      </td>
    </tr>

    <tr>
      <td>
        folderName
      </td>

      <td>
        The value is the folder's name.
      </td>
    </tr>

    <tr>
      <td>
        folderStatus
      </td>

      <td>
        The value is the [folder](https://doc.superannotate.com/docs/manage-folders#change-folder-status)'s status.
      </td>
    </tr>

    <tr>
      <td>
        subsetName
      </td>

      <td>
        The value is the [subset](https://doc.superannotate.com/docs/subsets)’s name.
      </td>
    </tr>

    <tr>
      <td>
        random
      </td>

      <td>
        Numeric value.
      </td>
    </tr>
  </tbody>
</Table>

<Callout icon="📘" theme="info">
  ### Usage

  These are the queries on the same level as the `Metadata` query, each with their own nested parameters.
</Callout>

<Callout icon="👍" theme="okay">
  ### Examples

  To search items in 3 selected folder which have unresolved comments on completion text.

  `folderName IN [f1, f2, root, ] AND comment.completion(resolved = false )`
</Callout>

## Operators

You'll need to use operators to define your queries and values.

| Operator       | Description                                                                                                                                                                                                                                                                                      |
| :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `=`            | Equal.                                                                                                                                                                                                                                                                                           |
| `!=`           | Not equal.                                                                                                                                                                                                                                                                                       |
| `>`            | Greater than.                                                                                                                                                                                                                                                                                    |
| `<`            | Less than.                                                                                                                                                                                                                                                                                       |
| `>=`           | Greater than or equal to.                                                                                                                                                                                                                                                                        |
| `<=`           | Less than or equal to.                                                                                                                                                                                                                                                                           |
| `()`           | Query parentheses.                                                                                                                                                                                                                                                                               |
| `[]`           | Array.                                                                                                                                                                                                                                                                                           |
| `AND`          | Returns items where both statements are true.                                                                                                                                                                                                                                                    |
| `OR`           | Returns items where either statement is true.                                                                                                                                                                                                                                                    |
| `IN`           | Set of values to consider.                                                                                                                                                                                                                                                                       |
| `NOT IN`       | Set of values to not consider.                                                                                                                                                                                                                                                                   |
| `CONTAINS`     | Used to search for a substring and returns the results containing that substring. All text queries made with this operator are case-insensitive.                                                                                                                                                 |
| `NOT CONTAINS` | Used to search for results that exclude the entered substring. All text queries made with this operator are case-insensitive.  <br /> <br /> This operator only works for the following component parameters: `input`, `textarea`, `code`, `markdown`, `paragraph`, and `web` (string-type keys) |

## Sort by query

With the use of the query bar, you can manually specify the data you want to order your item by. You can do so by using `orderBy`. After typing it in the bar, you must then select one of the following parameters to specify the ordering.

You can set the order based on the item metadata `name`, `status`, `lastAction.date`, and `priority`.

<Callout icon="👍" theme="okay">
  ### Examples

  Say you want to sort the items that haven't been worked on by name, in ascending order. You can use the following query: `metadata(status = NotStarted) orderBy metadata.name ASC`

  Another example is to sort the items that have been marked for **Quality Check** based on the date of the last action taken, in descending order: `metadata(status = QualityCheck) orderBy metadata.lastAction.date DESC`
</Callout>

<Callout icon="🚧" theme="warn">
  ### You can't use `orderBy` as a sole query

  Please note that you can't use the `orderBy` query on its own (e.g. `orderBy metadata.status ASC`). Think of it as a secondary attachment to the overall query; it must follow a general query, such as `metadata` or `commentCount`, so that you can add an additional parameter to sort your items with.
</Callout>

### Query example

Say you want to sort the items that haven't been worked on by name, in ascending order. You can use the following query: `metadata(status = NotStarted) orderBy metadata.name ASC`

Another example is to sort the items that have been marked for **Quality Check** based on the date of the last action taken, in descending order: `metadata(status = QualityCheck) orderBy metadata.lastAction.date DESC`

## Save query

To save a query:

1. Type a query in the query bar.
2. Click on the star on the right side of the query bar.
3. In the popup, type a query name.
4. Check the **Save as shared query** box to make the query public to users with roles of **Project Admin** or higher.
5. Click **Save**.

<Callout icon="📘" theme="info">
  The maximum number of characters for a saved query's name is 60.<br />You can save up to 50 queries.
</Callout>

<Callout icon="🚧" theme="warn">
  Only the creator of a shared query can make it private again.
</Callout>

## Rename query

To rename a query:

1. Click on the star in the query bar.
2. Click the three dots `⋮` next to the query you want to rename.
3. Select **Rename**.
4. Type a new query name.
5. Click **Rename**.

## Delete query

To delete a query:

1. Click on the star in the query bar.
2. Click the three dots `⋮` next to the query you want to delete.
3. Select **Delete**.

<Callout icon="🚧" theme="warn">
  **Team Owners** and **Team Admins** can delete shared queries regardless of who created them.
</Callout>

<br />