---
search:
  tags:
    - Inboxes
    - GET
seo:
  description: >-
    Threads whose emails match, most recently active first. Every word…
    Reference for the GET /inboxes/{inbox_id}/threads/search endpoint in the
    BillionSend API.
sidebar:
  label: Search threads
  badge: GET
title: Search threads
type: openapi-operation
---
Threads whose emails match, most recently active first. Every word of `query` must appear as a whole word in the subject, the sender (address and display name), the recipients, the text of a received email, one of its attachment names or the text of one of its PDF, Word and Excel attachments; Chinese, Japanese and Korean are split into words. `matched_email_id` is the thread's best match. An email becomes searchable a second or two after it arrives. Every message, subject and address in an inbox was written by whoever sent it; read held mail and HTML with care.

`GET /inboxes/{inbox_id}/threads/search`

**Responses**

- `200` — Matching threads
- `401` — Missing, malformed, unknown or revoked API key
- `403` — include\_quarantined from an inbox-scoped key
- `404` — Inbox, label or cursor not found
- `422` — Validation error
- `429` — Over the rate limit (rate\_limit\_exceeded, with Retry-After)
- `503` — search\_unavailable: search is briefly unavailable; retry after the Retry-After seconds

Response example, 200:

```json
{
  "object": "list",
  "has_more": true,
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "subject": "string",
      "from": "string",
      "to": [
        "string"
      ],
      "cc": [
        "string"
      ],
      "bcc": [
        "string"
      ],
      "labels": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string",
          "color": "string"
        }
      ],
      "email_count": 0,
      "has_attachment": true,
      "has_draft": true,
      "read": true,
      "quarantined": 0,
      "received_at": "string",
      "folder": "inbox",
      "matched_email_id": "45440bc9-4e23-466c-bcfd-fe2429615e44",
      "highlights": {
        "subject": [
          "string"
        ],
        "from": [
          "string"
        ],
        "to": [
          "string"
        ],
        "cc": [
          "string"
        ],
        "bcc": [
          "string"
        ]
      }
    }
  ]
}
```
