---
title: "bird email threads search"
description: "Search threads"
canonical: "https://bird.com/docs/cli/reference/email-threads-search"
---

# `bird email threads search`

## Usage

```bash
bird email threads search <q> [flags]
```

## Description

Full-text search across every mailbox in the workspace, ranked by relevance. Matches a conversation's message subjects, body text, and sender and recipient addresses, and returns the matching threads with highlighted subject or body fragments when available.

Returns a paginated JSON envelope; narrow with the filters below and page with --limit and --starting-after.

## Examples

```bash
bird email threads search <q>
bird email threads search <q> | jq -r '.data[].id'
bird email threads search <q> --limit 50 --starting-after <cursor>
```

## Options

#### Filters

| Name                | Description                                                                                                                                                                                                                                                                             |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--after`           | Match only conversations with a matching message received at or after this time. Use the response cursors for pagination.                                                                                                                                                               |
| `--before`          | Match only conversations with a matching message received at or before this time. Use the response cursors for pagination.                                                                                                                                                              |
| `--label <value>…`  | Restrict to conversations that have this label. Repeat the parameter to ask for more than one: only conversations that have every label you list are returned. A placement label picks a folder: inbox, archive, spam, or blocked. A custom label matches a conversation in any folder. |
| `--mailbox-id`      | Restrict the search to a mailbox by ID or email address in this workspace. An unknown or ambiguous email address returns 404; a valid mailbox ID with no matching threads returns an empty page.                                                                                        |
| `--response-schema` | Print the fields this command returns, then exit                                                                                                                                                                                                                                        |

#### Pagination

| Name               | Description                                                                                                                                                                                                                                                                                                                                             |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--ending-before`  | Cursor from the prev\_cursor or refresh\_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. prev\_cursor returns the preceding page. refresh\_cursor anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since. |
| `--limit <n>`      | Maximum number of items to return per page. Allowed range: 1 to 100.                                                                                                                                                                                                                                                                                    |
| `--starting-after` | Cursor from the next\_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.                                                                                                                                                                                                          |

## Related

| Name                                                                    | Description     |
| ----------------------------------------------------------------------- | --------------- |
| [`bird email threads delete`](/docs/cli/reference/email-threads-delete) | Delete a thread |
| [`bird email threads get`](/docs/cli/reference/email-threads-get)       | Get a thread    |
| [`bird email threads list`](/docs/cli/reference/email-threads-list)     | List threads    |
| [`bird email threads update`](/docs/cli/reference/email-threads-update) | Update a thread |

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
