---
updatedAt: 2025-11-12T02:16:25.000Z
agentTools:
  projectIndex: https://developers.rebrandly.com/llms.txt
---

# Advanced usage

In this section you can find some advanced things you can do with our Query Parameter API

# Variables

Rebrandly provides a set of perticular query parameter values that can be used as **variables**.\
If you place a *variable* as parameter value this will be replaced with a run-time-computed value when the link is navigated to. Variables can be used both in [Presets](https://developers.rebrandly.com/docs/presets) or while composing the link's destination query string.

The table below indicates or the available variables

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Variable
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        req.client.agent.browser.code
      </td>

      <td>
        Browser (e.g. `firefox`)
      </td>
    </tr>

    <tr>
      <td>
        req.client.location.country
      </td>

      <td>
        Country code (e.g. `gb`, `it`)
      </td>
    </tr>

    <tr>
      <td>
        req.client.agent.device.code
      </td>

      <td>
        Device (e.g. `desktop`, `mobile`)
      </td>
    </tr>

    <tr>
      <td>
        req.client.language
      </td>

      <td>
        Lenguage (e.g. `it`, `en`)
      </td>
    </tr>

    <tr>
      <td>
        req.client.agent.os.code
      </td>

      <td>
        Platform (e.g. `macos`)
      </td>
    </tr>

    <tr>
      <td>
        req.referral.hostname
      </td>

      <td>
        Referral: contains the absolute or partial address from which a resource has been requested.  

        (e.g. `yoursite.com`)
      </td>
    </tr>

    <tr>
      <td>
        req.referral.origin.name
      </td>

      <td>
        Source (e.g. `direct`, `other`)
      </td>
    </tr>

    <tr>
      <td>
        req.timestamp
      </td>

      <td>
        Timestamp in JSON format (e.g. `2022-11-18T15:12:27Z`)
      </td>
    </tr>
  </tbody>
</Table>

These variables values *must* be enclosed in curly braces when used as parameter value and **NOT URL-encoded**.

For example, a query parameter like `?country={req.client.location.country}` will replace the country code of the person who clicked navigated the short link.

A variable can also be concatenated to form a value:\
`?time=clickedAt_{req.timestamp}`