Use variables in requests

Use variables in requests

Variables are fixed values that you save in your Data Fetcher workspace and can reuse across multiple requests. You can use variables in request URLs, headers, parameters, and other input fields throughout your requests.

Variables are especially useful for API keys, base URLs, or other values that you use frequently. If a value changes, you only need to update the variable in one place instead of editing every request that uses it.

How to create variables

  1. Hover over the Data Fetcher extension, then click the settings icon (โš™๏ธ) to open the settings screen.

  2. Under Workspaces, click Manage next to the workspace where you want to create the variable.

  3. Under Variables, click + Add.

  4. Enter a descriptive variable name and its corresponding value.

  5. Click Save.

Your variable is now available to use in any request within that workspace.

How to use variables in requests

You can insert variables into any input field that displays a + button:

  1. Click the + button on the right side of any compatible input field.

  2. In the modal that opens, click Variable to switch to the variables tab.

  3. Select the variable you want to use from the list.

  4. The input field will now display a variable reference that looks like: -*-currency-*-

When your request runs, Data Fetcher automatically replaces the variable reference with the actual variable value.

Common use cases for variables

  • API keys and tokens - Store sensitive authentication information once and use it across multiple requests

  • Base URLs - Define common API endpoints that multiple requests share

  • Configuration values - Store settings like currency codes, region identifiers, or format preferences

Variables help keep your requests organized, secure, and easy to maintain as your API integrations grow.

Last updated