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

# runs

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

[Source: node-sdk/src/functions.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/functions.ts)

List the runs of this function.

Includes completed runs by default. Set `only_active: true` to retrieve
only in-flight runs. Use the response pagination metadata to request
additional pages.

```typescript theme={null}
NotteFunction.runs(options?: FunctionRunListOptions): Promise<PaginatedResponseFunctionRunListItemResponse>;
```

## Parameters

<ParamField body="options" type={"FunctionRunListOptions"}>
  Pagination and filtering options. `only_active` defaults to false, including completed runs.

  Default:

  ```typescript theme={null}
  {}
  ```
</ParamField>

## Returns

```typescript theme={null}
Promise<PaginatedResponseFunctionRunListItemResponse>
```

One page of run records and pagination metadata; additional pages require another call.

## Raises

* NotteAPIError if the run history cannot be retrieved.

## Example

```typescript theme={null}
const { items } = await fn.runs({ page_size: 20 });
```

## Related types

* [FunctionRunListOptions](/typescript-sdk-reference/types/functionrunlistoptions)
* [PaginatedResponseFunctionRunListItemResponse](/typescript-sdk-reference/types/paginatedresponsefunctionrunlistitemresponse)


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