---
title: "variable | Speedscale Docs"
description: "Extract or store values in the variable cache with Speedscale's variable feature, enabling efficient management of request/response data for API testing."
canonical: "https://docs.speedscale.com/guides/transformation/extractors/variable/"
---

[Documentation index](https://docs.speedscale.com/guides/llms.txt) | [Markdown](https://docs.speedscale.com/guides/transformation/extractors/variable/index.md) | [Canonical page](https://docs.speedscale.com/guides/transformation/extractors/variable/)

# variable

<a id="purpose"></a>

### Purpose

**variable** extracts or stores a value in the variable cache. The generator and responder maintain a variable cache, like a hashmap, for each request/response. The **variable** extractor is an easy way to interact with that cache.

This transform is usually used to populate variables during startup of the generator or responder (see runtime variables configuration) to be used by other transforms.

<a id="usage"></a>

### Usage

```json
"type": "variable",
"config": {
    "variable": "<key>"
}
```

*   **variable** - name of the variable to store or extract

<a id="example"></a>

### Example

```json
"type": "variable",
"config": {
    "variable": "bearer_value"
}
```

info

Remember, the current token value of the variable is loaded into
