> ## Documentation Index
> Fetch the complete documentation index at: https://bruno-a6972042-docs-api-docs-split-more-menu-ryan.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Request Variables

Request variables are variables that are scoped to a specific request. They are useful for storing variables that is used in a specific request.

## Creating a Request Variable

* Go to the Request
* Go to Vars Tab
* Add your variable name, value, and an optional description for what the variable represents in the Pre Request Vars section
* Save your changes

<img src="https://mintcdn.com/bruno-a6972042-docs-api-docs-split-more-menu-ryan/PX9XB9TVq5qgK6Mt/images/screenshots/variables/request-variables.webp?fit=max&auto=format&n=PX9XB9TVq5qgK6Mt&q=85&s=95637265a1b688f6463dfc3d9c8dc6e7" alt="Request Variables" width="2472" height="796" data-path="images/screenshots/variables/request-variables.webp" />

## Using a Request Variable

You can use the `{{varName}}` syntax to use a request variable in a request.

<img src="https://mintcdn.com/bruno-a6972042-docs-api-docs-split-more-menu-ryan/PX9XB9TVq5qgK6Mt/images/screenshots/variables/request-variables-usage.webp?fit=max&auto=format&n=PX9XB9TVq5qgK6Mt&q=85&s=aa8ad4915362b8f8199afed2e1f478d7" alt="Request Variables Usage" width="2472" height="888" data-path="images/screenshots/variables/request-variables-usage.webp" />

#### Access Request Variable inside scripts

You can also use the `bru.getRequestVar()` function to get the value of a request variable and use it inside your scripts.

```javascript theme={null}
let source = bru.getRequestVar("source");
let destination = bru.getRequestVar("destination");
```
