Dynamic Variables
Generate random data on the fly with {{random.*}} placeholders. Every request gets unique values.
How to Use
Variable Syntax
Use double curly braces with the random. prefix anywhere in your request — URLs, headers, body, or key:value pairs. The placeholder is replaced with a fresh random value on each request.
# In the URL
tgrs https://api.example.com/users/{{random.uuid}}
# In the body
tgrs POST https://api.example.com/users \
name:{{random.name}} \
email:{{random.email}}
# In headers
tgrs GET https://api.example.com/data -H "X-Request-Id: {{random.uuid}}"
Available Variables
Identity
| Variable | Example Output | Description |
|---|---|---|
| {{random.uuid}} | 550e8400-e29b-41d4-a716-446655440000 | UUID v4 |
| {{random.name}} | Sarah Johnson | Full name |
| {{random.firstName}} | Sarah | First name |
| {{random.lastName}} | Johnson | Last name |
| {{random.email}} | sarah.johnson@example.com | Email address |
Data Types
| Variable | Example Output | Description |
|---|---|---|
| {{random.number}} | 922 | Random integer (0–1000) |
| {{random.number(min,max)}} | 769 | Random integer within custom range (e.g., 100,999) |
| {{random.double}} | 61.41 | Random decimal (0.0–100.0) |
| {{random.double(min,max)}} | 45.58 | Random decimal within custom range (e.g., 10.0,50.0) |
| {{random.boolean}} | true | true or false |
| {{random.string}} | hEWlRmYlSd | Random string (10 chars) |
| {{random.string(N)}} | ORsYD | Random string with custom length (max: 50) |
| {{random.slug}} | minim-sed-elit | URL-friendly slug (3 words) |
| {{random.slug(N)}} | sed-dolor-lorem-aliqua-quis | URL-friendly slug with custom word count (max: 10) |
| {{random.hex}} | a64e03776004a3ca | Hex string (16 chars) |
| {{random.hex(N)}} | b5d50de1ec1e4ecc64b9... | Hex string with custom length (max: 64) |
| {{random.alphanumeric}} | lTbGlmYr9B | Alphanumeric string (10 chars) |
| {{random.alphanumeric(N)}} | xK2mP | Alphanumeric string with custom length (max: 50) |
Date & Time
| Variable | Example Output | Description |
|---|---|---|
| {{random.date}} | 2025-08-15 | Date (YYYY-MM-DD) |
| {{random.datetime}} | 2025-08-15T14:30:00Z | ISO 8601 datetime |
| {{random.time}} | 14:30:00 | Time (HH:MM:SS) |
| {{random.timestamp}} | 1723728600 | Unix timestamp |
Network & Location
| Variable | Example Output | Description |
|---|---|---|
| {{random.ip}} | 192.168.1.42 | IPv4 address |
| {{random.ipv6}} | 2001:db8:85a3::8a2e:370:7334 | IPv6 address |
| {{random.url}} | https://example.com/path | HTTPS URL |
| {{random.website}} | example.com | Website domain |
| {{random.phone}} | +1-555-0142 | Phone number |
| {{random.city}} | San Francisco | City name |
| {{random.country}} | Japan | Country name |
Advanced Usage
Parameterized Variables
Some variables accept parameters in parentheses to control the output.
# String with custom length
tgrs POST https://api.example.com/data key:{{random.string(20)}}
# Number within a range
tgrs POST https://api.example.com/data age:{{random.number(18,65)}}
# Double with range
tgrs POST https://api.example.com/data price:{{random.double(1.0,99.99)}}
# Hex with custom length
tgrs POST https://api.example.com/data token:{{random.hex(64)}}
# Slug with custom length
tgrs POST https://api.example.com/data code:{{random.slug(8)}}
Enum — Pick from a List
Use {{random.enum(a,b,c)}} to randomly pick one value from a comma-separated list.
# Random status
tgrs POST https://api.example.com/orders status:{{random.enum(pending,active,completed)}}
# Random color
tgrs POST https://api.example.com/items color:{{random.enum(red,green,blue,yellow)}}
Custom — Regex Pattern
Use {{random.custom(pattern)}} to generate values matching a regex pattern.
# License plate format
tgrs POST https://api.example.com/vehicles plate:{{random.custom([A-Z]{3}-\d{4})}}
# Product SKU
tgrs POST https://api.example.com/products sku:{{random.custom(SKU-[A-Z]{2}\d{4})}}
Real-World Examples
Create a User with Random Data
tgrs POST https://api.example.com/users \
name:{{random.name}} \
email:{{random.email}} \
phone:{{random.phone}} \
city:{{random.city}}
Idempotency Key
tgrs POST https://api.example.com/payments \
-H "Idempotency-Key: {{random.uuid}}" \
amount:99.99 currency:USD
Timestamped Requests
tgrs POST https://api.example.com/events \
event:click \
timestamp:{{random.timestamp}} \
session_id:{{random.uuid}}