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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Search deals

> Search HubSpot deals by CRM property values.

Use `hubspot.searchDeals` to search HubSpot deals by CRM property values.

```ts automations/hubspot-search-deals.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { hubspot } from "automate.ax/hubspot"

export default automation("Search deals", () => {
  onDashboardRun({ title: "Search deals" })
  hubspot.searchDeals({
    filterGroups: [
      {
        filters: [
          {
            propertyName: "dealname",
            operator: "EQ",
            value: "Enterprise renewal",
          },
        ],
      },
    ],
    limit: 100,
  })
})
```

## Inputs

`filterGroups` are OR groups whose filters use AND logic. HubSpot accepts at most five groups, six filters per group, and 18 filters total. You can also pass `query`, one `sort`, `properties`, `after`, and `limit` up to 200. Optional second argument `{ account }` selects a named HubSpot binding.

## Output

Returns matching `records`, optional `total`, and `pageInfo.after`. HubSpot search returns at most 10,000 results for one query.
