# search (/build/mcp/search)



Usage [#usage]

```json title="headless.ly/mcp#search"
{
  "type": "Contact",
  "filter": { "stage": "Lead" },
  "sort": "-createdAt",
  "limit": 25
}
```

Parameters [#parameters]

| Parameter | Type   | Description                                  |
| --------- | ------ | -------------------------------------------- |
| `type`    | string | Entity type (Contact, Deal, Issue, etc.)     |
| `filter`  | object | MongoDB-style query filters                  |
| `sort`    | string | Field to sort by (prefix `-` for descending) |
| `limit`   | number | Max results (default 25)                     |
| `offset`  | number | Skip N results                               |
| `asOf`    | string | Time travel -- query as of ISO timestamp     |

Filter Operators [#filter-operators]

```json title="headless.ly/mcp#search"
{
  "type": "Deal",
  "filter": {
    "value": { "$gte": 50000 },
    "stage": { "$in": ["Proposal", "Negotiation"] },
    "closedAt": { "$exists": false }
  }
}
```

Cross-Entity Search [#cross-entity-search]

```json title="headless.ly/mcp#search"
{
  "type": "Contact",
  "filter": {
    "organization.industry": "Technology",
    "stage": "Qualified"
  }
}
```
