> ## Documentation Index
> Fetch the complete documentation index at: https://unevenlabs-docs-drift-relayprotocol-relay-kit-pr-1069-f7cfa.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# useRequests

> Fetch cross-chain Relay transactions

<Warning>
  `useRequests` and `queryRequests` read from `GET /requests/v3`, which requires a Relay API key sent via the `x-api-key` header. Because these hooks run in the browser, never ship your API key to the client — point **`baseApiUrl`** at a server-side [proxy](/references/api/api-keys#proxy-api) that injects `x-api-key`.
</Warning>

## Parameters

| Parameter        | Description                                                                                                                                                                                                               | Required |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| **baseApiUrl**   | Base API URL for the Relay API. `/requests/v3` requires an `x-api-key`, so point this at a server-side [proxy](/references/api/api-keys#proxy-api) that injects the key rather than at `https://api.relay.link` directly. | ❌        |
| **options**      | Query parameters that map directly to the [requests api](/references/api/get-requests)                                                                                                                                    | ❌        |
| **queryOptions** | Tanstack query options. Refer to the [Tanstack](https://tanstack.com/query/latest/docs/framework/react/guides/query-options) docs.                                                                                        | ❌        |

## Return Data

The hook returns an object with the base [Tanstack Query response](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). The data property maps to the object returned in the aforementioned [requests api](/references/api/get-requests).

## Usage

<CodeGroup>
  ```typescript theme={null}
  import { useRequests } from '@relayprotocol/relay-kit-hooks'

  const { data: transactions } = useRequests()

  ```
</CodeGroup>

## Query Function

```typescript theme={null}
import { queryRequests } from '@relayprotocol/relay-kit-hooks'

queryRequests()

```
