> ## 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 Loyalty Rewards

> Searches for loyalty rewards.

`square.searchLoyaltyRewards` searches for loyalty rewards.

## Example

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

export default automation("Search Square Loyalty Rewards", () => {
  onDashboardRun({ title: "Search Square Loyalty Rewards" })

  square.searchLoyaltyRewards({
    query: {
      loyaltyAccountId: "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd",
    },
    limit: 10,
  })
})
```

## Inputs

Every input accepts a compatible signal. It requires `LOYALTY_READ`.

| Field    | Type                                                   | Required | Default | Description                                                                                                                                                                                                                                                         |
| -------- | ------------------------------------------------------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`  | `Square.SearchLoyaltyRewardsRequestLoyaltyRewardQuery` | No       | —       | The search criteria for the request. If empty, the endpoint retrieves all loyalty rewards in the loyalty program.                                                                                                                                                   |
| `limit`  | `number`                                               | No       | 30      | The maximum number of results to return in the response. The default value is 30.                                                                                                                                                                                   |
| `cursor` | `string`                                               | No       | —       | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |

Use the official [SearchLoyaltyRewards reference](https://developer.squareup.com/reference/square/loyalty-api/search-loyalty-rewards) for provider field semantics and limits.

## Output

Returns the official `Square.SearchLoyaltyRewardsResponse` response as a codec-safe object. Square integer money amounts remain `bigint` values.
