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

# waitForRequest

Waits for a network request matching a URL or predicate to occur.
Example: `waitForRequest(urlOrPredicate: "**/api/data")`
Returns true if a matching request occurred within the timeout.

## Definition

```graphql theme={null}
waitForRequest(
  urlOrPredicate: String!
  options: TimeoutOptions
): Boolean!
```

## Arguments

### `urlOrPredicate`

[String!](/reference/graphql/scalars/string)

A URL string, glob pattern, or JavaScript predicate string to match against request URLs.
Example: `"https://example.com/resource.js"` or `"**/*.css"`

### `options`

[TimeoutOptions](/reference/graphql/inputs/timeout-options)

Options for waiting, such as timeout.

## Returns

[Boolean!](/reference/graphql/scalars/boolean)

The `Boolean` scalar type represents `true` or `false`.
