Documentation
Everything you need to know about setget.net
What is setget.net?
setget.net is a simple HTTP-based key-value storage service. Think of it as a public locker where you can store text data using a key (ID) of your choice, then retrieve it later from anywhere.
API Endpoints
/set/<id>
Store a value
Save any text or JSON data with a key of your choice.
Parameters
id |
Required | Your custom key (URL path). Can be anything: my-data, user123, abc-xyz-789 |
ttl |
Optional | Time-to-live in seconds or PostgreSQL interval (e.g., 3600, 7 days). Default: 3 months, Maximum: 1 year |
password |
Optional | Protect your data with a password. Required for future retrievals |
Request Body
Send your data as the request body (any text format up to 50,000 characters).
Examples
curl -X POST https://setget.net/set/my-note -d "Remember to buy milk"
curl -X POST https://setget.net/set/config \
-H "Content-Type: application/json" \
-d '{"theme":"dark","lang":"en"}'
curl -X POST "https://setget.net/set/secret?password=mypass123" \
-d "Top secret information"
curl -X POST "https://setget.net/set/temp?ttl=3600" \
-d "This expires in 1 hour"
Response
{"id": "my-note", "status": "ok"}
/get/<id>
Retrieve a value
Get the data you previously stored using its key.
Parameters
id |
Required | The key you used when storing the data |
password |
Optional | Required if the data was stored with password protection |
format |
Optional | Format handling: auto (default, auto-detects JSON), json (force JSON parsing), or text (force plain text) |
Examples
curl https://setget.net/get/my-note
curl "https://setget.net/get/secret?password=mypass123"
VALUE=$(curl -s https://setget.net/get/my-note | jq -r '.value')
echo "Retrieved: $VALUE"
# Store JSON
curl -X POST https://setget.net/set/config -d '{"server":"api.example.com","port":8080}'
# Retrieve - automatically parsed as JSON
curl https://setget.net/get/config
# Returns: {"id":"config","value":{"server":"api.example.com","port":8080},"content_type":"application/json"}
Response
{"id": "my-note", "value": "Remember to buy milk", "content_type": "text/plain"}
JSON Detection: By default (format=auto), valid JSON objects and arrays are automatically parsed. Use format=text to force plain text, or format=json to require valid JSON.
Try It Live
Test the API directly from your browser
📤 Store Data
Enter your own data or use a random phrase:
📥 Retrieve Data
Enter the key you stored (or any existing key):
Common Use Cases
📋 Cross-Device Clipboard
Copy text on one device, paste on another.
# On device 1
echo "some text" | curl -X POST https://setget.net/set/clipboard -d @-
# On device 2
curl https://setget.net/get/clipboard | jq -r '.value'
🔄 CI/CD Pipeline Coordination
Pass data between build stages or jobs.
# Build job stores version
curl -X POST https://setget.net/set/build-$BUILD_ID -d "v1.2.3"
# Deploy job retrieves it
VERSION=$(curl -s https://setget.net/get/build-$BUILD_ID | jq -r '.value')
🎮 Game State Sharing
Share player data or game server info.
# Store server list
curl -X POST https://setget.net/set/game-servers \
-d '["server1.game.com","server2.game.com"]'
# Retrieve in game client
curl https://setget.net/get/game-servers
🏠 IoT Device Communication
Share sensor data between devices.
# Sensor posts temperature
curl -X POST https://setget.net/set/room-temp -d "72.5"
# Control system reads it
curl https://setget.net/get/room-temp
📤 Quick File Sharing
Share file contents without email.
# Upload file
cat document.txt | curl -X POST https://setget.net/set/shared-doc -d @-
# Download on another machine
curl https://setget.net/get/shared-doc | jq -r '.value' > document.txt
🔗 Webhook Payload Store
Temporarily store webhook data for testing.
# Webhook stores data
curl -X POST https://setget.net/set/webhook-$(date +%s) -d "$PAYLOAD"
# Developer retrieves for debugging
curl https://setget.net/get/webhook-1234567890
Technical Details
📦 Storage Limits
- Max value size: 50,000 characters (~50KB)
- Key format: Any URL-safe characters (letters, numbers, hyphens, underscores)
- Active entries limit: 25,000 active entries per IP address
- Smart cleanup: Only active (non-expired) entries count toward limit
⏰ Expiration Rules
- Default TTL: 3 months from creation or last access
- Maximum TTL: 1 year (enforced limit)
- Auto-renewal: Each GET request resets expiration to the original TTL
- Custom TTL: Override with
?ttl=secondsparameter (up to 1 year) - Inactive data: Automatically deleted after expiration
🔒 Security Features
- Password protection: Optional password parameter for sensitive data
- HTTPS only: All connections encrypted
- Passwords hashed: Never stored in plain text
- Choose random keys: Use UUIDs for unpredictable access
- Security headers: CSP, HSTS, X-Frame-Options, and more (browser protection)
⚡ Performance
- Redis cache: Recently accessed data served from memory
- Cache duration: 60 seconds
- Response time: Typically <50ms
- Rate limit: 10 requests/second per IP address
Error Responses
| Status Code | Error | Meaning | Solution |
|---|---|---|---|
400 |
empty value | You tried to store empty data | Include actual content in the request body |
403 |
unauthorized | Wrong password or missing password | Include correct ?password=... parameter |
404 |
not found | Key doesn't exist or has expired | Check the key name or store new data |
413 |
too large | Data exceeds 50,000 characters | Reduce data size or split into multiple keys |
429 |
rate limit exceeded | Rate limit exceeded (10 requests/second) | Wait time indicated in Retry-After HTTP header and retry_after JSON field (both in seconds) |
500 |
failed | Server error | Try again, report if persists |
Best Practices
✅ Do
- Use random UUIDs for sensitive data:
curl -X POST https://setget.net/set/$(uuidgen) -d "data" - Set appropriate TTL for temporary data
- Use password protection for private information
- Use descriptive key names for your own organization
- Let data expire naturally or overwrite keys when needed
❌ Don't
- Store passwords, API keys, or sensitive credentials
- Store personally identifiable information (PII)
- Use setget.net for production-critical data
- Store illegal, malicious, or harmful content
- Abuse the service with excessive requests
Language Examples
🐍 Python
import requests
# Store data
response = requests.post('https://setget.net/set/my-key', data='Hello World')
print(response.json()) # {'id': 'my-key', 'status': 'ok'}
# Retrieve data
response = requests.get('https://setget.net/get/my-key')
data = response.json()
print(data['value']) # 'Hello World'
# With password
requests.post('https://setget.net/set/secret',
params={'password': 'pass123'},
data='Secret data')
response = requests.get('https://setget.net/get/secret',
params={'password': 'pass123'})
📜 JavaScript (Node.js)
// Store data
const response = await fetch('https://setget.net/set/my-key', {
method: 'POST',
body: 'Hello World'
});
const result = await response.json();
console.log(result); // {id: 'my-key', status: 'ok'}
// Retrieve data
const getResponse = await fetch('https://setget.net/get/my-key');
const data = await getResponse.json();
console.log(data.value); // 'Hello World'
// With password
await fetch('https://setget.net/set/secret?password=pass123', {
method: 'POST',
body: 'Secret data'
});
💻 Bash
#!/bin/bash
# Store data
curl -X POST https://setget.net/set/my-key -d "Hello World"
# Retrieve and use data
VALUE=$(curl -s https://setget.net/get/my-key | jq -r '.value')
echo "Got: $VALUE"
# Function for easy usage
setget_store() {
curl -X POST "https://setget.net/set/$1" -d "$2"
}
setget_get() {
curl -s "https://setget.net/get/$1" | jq -r '.value'
}
# Usage
setget_store "mydata" "some value"
setget_get "mydata"
🔷 Go
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
// Store data
resp, _ := http.Post(
"https://setget.net/set/my-key",
"text/plain",
bytes.NewBufferString("Hello World"),
)
defer resp.Body.Close()
// Retrieve data
resp, _ = http.Get("https://setget.net/get/my-key")
var result map[string]string
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["value"]) // Hello World
}
Frequently Asked Questions
How long does my data stay stored?
Data expires after the TTL period of inactivity (default is 3 months, maximum is 1 year). Every time you access (GET) your data, the expiration resets to the original TTL you specified. You can set a custom TTL when storing data up to the maximum limit.
Is my data secure?
All connections use HTTPS encryption. You can add password protection for sensitive data. However, setget.net is designed for temporary, non-critical data sharing. Don't store passwords, API keys, or personally identifiable information.
Can someone guess my key and access my data?
If you use simple keys like test or mydata, yes. For sensitive data, use randomly generated keys (like UUIDs) and add password protection: $(uuidgen) or $(openssl rand -hex 16)
What happens if I use the same key twice?
The data is overwritten. Each key can only store one value. If you POST to the same key again, the old data is replaced with the new data.
Are there any rate limits?
Yes, to ensure fair usage and service availability, we enforce a rate limit of 10 requests/second per IP address for all API endpoints. If you exceed this limit, you'll receive a 429 (Too Many Requests) error with a Retry-After HTTP header and retry_after field in the JSON response indicating how many seconds to wait before retrying. Please be respectful and don't abuse the service.
How many entries can I store?
You can store up to 25,000 active (non-expired) entries per IP address. Once your entries expire, they no longer count toward this limit. This means if you create thousands of short-lived entries (like hourly CI/CD artifacts), they'll automatically free up space as they expire. The background cleanup runs every 6 hours to remove expired entries from the database.
Can I store binary data?
Not directly. setget.net stores text only. You can Base64 encode binary data first, but keep in mind the 50KB limit.
What characters can I use in keys?
Any URL-safe characters: letters (a-z, A-Z), numbers (0-9), hyphens (-), and underscores (_). Avoid spaces and special characters.
Can I list all my keys?
No. setget.net doesn't provide a key listing feature. Keep track of your own keys.
Need Help?
Found a bug? Have a question? Want to report abuse?