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

# Offers

> Cashback Hive SDK offers API reference: list, search and paginate cashback offers with offers.list(), or fetch a single offer by slug with offers.get().

All methods return promises and reject with an [`SdkApiError`](https://developer.cashbackhive.com/reference/errors) on API failure. Offers returned by these methods are cached by slug so they can be passed to [`openOffer()`](https://developer.cashbackhive.com/reference/tracking) and [`trackingUrl()`](https://developer.cashbackhive.com/reference/tracking) as strings.

If a member is signed in, requests include their token so the API can return member-specific rates where applicable.

## `offers.list()`

Fetch a page of offers.

```ts theme={null}
offers.list(params?: OfferListParams): Promise<OfferListResult>
```

**params.search** `string`

Free-text search. Matches against the offer name and domain, case-insensitively.

**params.category** `string`

Return only offers whose `category` equals this string exactly.

**params.limit** `number`

Maximum number of offers to return. Defaults to the server's page size.

**params.offset** `number` (default: 0)

Number of offers to skip, for pagination.

Empty-string and `undefined` parameters are omitted from the request.

**Returns**

**offers** `Offer[]`

The offers for this page, with pinned offers first. See [`Offer`](https://developer.cashbackhive.com/reference/types#offer).

**total** `number`

Total number of offers matching the filters, across all pages.

```ts theme={null}
const { offers, total } = await sdk.offers.list({
  search: "nike",
  limit: 20,
  offset: 0,
});
```

## `offers.get()`

Fetch a single offer by slug.

```ts theme={null}
offers.get(slug: string): Promise<Offer | null>
```

**slug** `string` *required*

The offer's slug, e.g. `"nike"`.

**Returns** the [`Offer`](https://developer.cashbackhive.com/reference/types#offer), or `null` if the API responds `404`. Other errors reject.

```ts theme={null}
const offer = await sdk.offers.get("nike");
if (offer) sdk.openOffer(offer);
```

## Caching behaviour

Every offer returned by `list()` or `get()` is stored in an in-memory map keyed by slug for the lifetime of the page. This cache exists so that `openOffer("nike")` and `trackingUrl("nike")` can resolve a slug to its `clickUrl` without a network round trip. It is **not** a response cache — calling `list()` twice makes two requests.


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