> ## Documentation Index
> Fetch the complete documentation index at: https://docs.byblend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How do I search across Blend?

> GET /api/v1/search spans orders, patients, prescribers, and products in one call, with ranked results. Scoped variants like /search/patients narrow to a single type.

`GET /api/v1/search` searches orders, patients, prescribers, and products in a single request. Results are ranked and each carries a `result_type` so you can tell what you matched. Searchable fields include IDs, order numbers, names, emails, phone numbers, prescriber identifiers, product names, and SKUs — with substring matching across all of them.

```bash theme={null}
curl "https://api.byblend.com/api/v1/search?q=donnelly&limit=50" \
  -H "Authorization: Bearer {access_token}"
```

`limit` defaults to 50 and maxes at 100.

## Exact phrases

Wrap the phrase in URL-escaped quotes to match it exactly rather than as loose terms:

```bash theme={null}
curl "https://api.byblend.com/api/v1/search?q=%22Joe%20Public%22" \
  -H "Authorization: Bearer {access_token}"
```

## Searching one type

When you know what you're looking for, the scoped endpoints are faster and return less noise:

| Endpoint                     | Searches    |
| ---------------------------- | ----------- |
| `/api/v1/search/orders`      | Orders      |
| `/api/v1/search/patients`    | Patients    |
| `/api/v1/search/prescribers` | Prescribers |
| `/api/v1/search/products`    | Products    |

<Tip>
  Patient search accepts a date of birth in `MM/DD/YYYY`, `YYYYMMDD`, or `YYYY-MM-DD` — you don't have to normalize the format your users type.
</Tip>

## Search versus filtered lists

Search is for **finding a known thing** when you have a fragment of it — a partial name, a phone number, half an order number. It is not the tool for enumerating a set.

For "every order that shipped last week" or "every prescription without an order", use the list endpoints with filters and [pagination](/guides/pagination):

```bash theme={null}
curl "https://api.byblend.com/api/v1/orders?status=shipped&page_size=200" \
  -H "Authorization: Bearer {access_token}"
```

Those are exhaustive and paginated. Search is ranked and capped at 100 results, so it will quietly miss things if you use it as a list.

<Note>
  Searching for a prescription that never matched a patient is a different problem — an unmatched inbound message may not surface where you expect. See [why Blend can't find a prescription I sent](/guides/find-a-missing-prescription).
</Note>

<CardGroup cols={2}>
  <Card title="Search all" icon="magnifying-glass" href="/api-reference/search/search-all">
    GET /search
  </Card>

  <Card title="Search patients" icon="user" href="/api-reference/search/search-patients">
    Accepts several DOB formats
  </Card>

  <Card title="Search orders" icon="prescription-bottle" href="/api-reference/search/search-orders">
    By order number or external ID
  </Card>

  <Card title="Search products" icon="pills" href="/api-reference/search/search-products">
    By name or SKU
  </Card>
</CardGroup>
