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

# search_transactions

> Search transactions, fetch by id, list by lead, read property address details and transaction custom field definitions.

> [!NOTE]
>
> **READ** · 5 operations · never changes data

Search transactions, fetch one by id, list by lead, read property address details and the team's transaction custom field definitions.

```js theme={null}
search_transactions({
  lead_id?, filters?, ids?, group_by?, metric?, custom_fields?, address_for?
})
```

| Parameter | Notes |
| - | - |
| `ids` | Requires `lead_id` — a transaction is addressed by its own id together with its lead's id. Accepts up to 100. |
| `address_for` | A transaction id. Also requires `lead_id`. |
| `custom_fields: true` | Returns the team's transaction custom field definitions instead of searching. Takes no other parameter. |
| `filters.transactionType` | One of `"Purchase"`, `"Listing"`, `"Lease"`, `"Other"`, `"All"` (every type in one call). Defaults to `"Purchase"` when omitted. Anything else (e.g. `"Buyer"`) is rejected. |
| `group_by` | A real field name, e.g. `"transactionStatus"` — not `"stage"`, which doesn't exist on a transaction record. |
| `metric` | `"count"` (default), `"sum:<field>"` e.g. `"sum:homePrice"` (the real numeric price field is `homePrice`, not `price`), or `"avg:<field>"`. Ignored when `group_by` is absent. |

`group_by`/`metric` return grouped counts/sums instead of a record list, rather than paging through everything yourself — it refuses outright past a fixed scan limit rather than ever returning a silently-truncated number.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.