Intelligent bidding platform with advanced targeting and analytics
Your campaign uses two separate API keys for security:
/bids/ endpoint only/api/v1/lists/*)Why two keys? This prevents traffic sources from manipulating their own bidding modifiers by adding themselves to boost lists or removing competitors.
Get dynamic bid prices and destination URLs based on country, OS, browser, and traffic source.
GET https://app.rtbdomains.com/bids/
us, uk, ca, de
example.com
The bidding system supports two types of domain matching:
Lists contain exact domain names and apply modifiers when the source domain exactly matches.
List "Premium Sites" (2x modifier)
Domains: example.com, test.com
src=example.com โ List matches โ 2x modifier applied
src=example.net โ No match โ 1x modifier (no effect)
Pattern Rules contain keywords and apply modifiers when the source domain contains the pattern anywhere.
Pattern Rule "Apple Boost" (1.3x modifier)
Patterns: apple, mac, iphone
src=applestore.com โ Contains "apple" โ 1.3x modifier
src=pineapple.com โ Contains "apple" โ 1.3x modifier
src=macdeals.net โ Contains "mac" โ 1.3x modifier
src=google.com โ No match โ 1x modifier
When multiple lists and pattern rules match, modifiers multiply together:
Base Bid: $0.10
List #1 matches (2x) + Pattern Rule matches (1.3x)
Final Bid: $0.10 ร 2 ร 1.3 = $0.26
{
"country": "us",
"src": "example.com",
"os": "windows",
"browser": "chrome",
"time": "14:30",
"bid": 1.5,
"url": "https://destination.com/?cpc=1.5&domain=example.com"
}
| Field | Type | Description |
|---|---|---|
country |
string | Country code from request (normalized to lowercase) |
src |
string | Traffic source from request (normalized to lowercase) |
os |
string | Detected operating system
windows
macos
ios
linux
android
|
browser |
string | Detected browser
chrome
safari
firefox
edge
opera
facebook
instagram
|
time |
string | Current time in America/Phoenix timezone (H:M format) |
bid |
number | Calculated bid price (0 if no matching campaign or rules) |
url |
string | Destination URL with tokens replaced ([cpc] โ bid, [domain] โ source) |
GET https://app.rtbdomains.com/bids/?api=YOUR_API_KEY&cc=us&ua=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F120.0.0.0%20Safari%2F537.36&src=example.com
The bidding API returns specific error codes for validation failures:
| Status Code | Error | Description |
|---|---|---|
422 |
Missing Parameter | One or more required parameters (api, cc, ua, src) is missing |
400 |
Invalid Domain Format | Source domain contains invalid characters (only letters, numbers, hyphens, dots, underscores allowed) |
400 |
Invalid Country Code | Country code must be exactly 2 letters (e.g., us, uk, ca) |
200 |
Zero Bid | Valid request but bid=0 returned (invalid API key or no matching bid rules for this traffic) |
{
"error": "Invalid source domain format",
"message": "Domain must contain only letters, numbers, hyphens, dots, and underscores"
}
The url field in the bid response contains a signed tracking URL that logs actual clicks before redirecting to your destination.
GET https://app.rtbdomains.com/click/{signed_data}
| Status Code | Error | Description |
|---|---|---|
400 |
Invalid Tracking Data | Malformed URL or decoding failed |
403 |
Invalid Signature | HMAC signature verification failed (possible tampering) |
410 |
URL Expired | Tracking URL is older than 5 minutes |
301 |
Success | Valid click - redirects to destination URL |
Note: You don't need to call this endpoint directly. Traffic sources automatically click the URL returned in the bid response.
Retrieve statistics and performance data using your API key. Perfect for external dashboards and automated reporting.
Use either your bidding key or management key as a query parameter: ?api_key=YOUR_KEY
Statistics report for a SINGLE DAY aggregated by subId (source domain), detailing impressions and revenue
GET https://app.rtbdomains.com/api/v1/stats?api_key=YOUR_KEY&date=2025-11-18
Response:
{
"success": true,
"data": [
{
"subId": "example.com",
"source": "example.com",
"impressions": 523,
"clicks": 15,
"revenue": 7.50,
"ctr": 2.87,
"date": "2025-11-18"
}
],
"meta": {
"date": "2025-11-18",
"returned_sources": 15,
"total_impressions": 2000,
"total_clicks": 60,
"total_revenue": 30.00,
"filters": {
"min_revenue": 0.0000001,
"limit": 10000
},
"note": "Showing sources with revenue > $0. Use ?min_revenue=0 to include zero-revenue sources."
}
}
api_key (required): Your campaign API key (bidding or management key)date (optional): Single date in YYYY-MM-DD format, defaults to today
min_revenue (optional): Minimum revenue filter in dollars (default: 0.0000001)
0.0000001: Shows all revenue-generating sources (excludes zero-revenue)0: Include sources with zero revenue (impressions but no clicks)0.01: Only sources with 1ยข+ revenue1.00: Only sources with $1+ revenuelimit (optional): Maximum number of sources to return (default: 10000)
10000: Safe for most use cases100: Quick preview of top performers0: Unlimited (use with caution on large datasets)| Status Code | Error | Description |
|---|---|---|
401 |
Missing API Key | api_key parameter is required |
401 |
Invalid API Key | API key not found or campaign inactive |
500 |
Analytics Not Configured | Analytics Engine API token not configured on server |
Manage domain lists programmatically using your API key. Perfect for large portfolios that need daily updates.
Use your management API key (found in campaign settings): ?api_key=YOUR_MANAGEMENT_KEY
List all domain lists for your campaign
GET https://app.rtbdomains.com/api/v1/lists?api_key=YOUR_KEY
Response:
{
"success": true,
"data": [
{
"id": 1,
"name": "Premium Publishers",
"modifier": 1.2,
"list_type": "boost",
"domain_count": 1523
}
],
"count": 1
}
Add domains to a list (duplicates are skipped)
POST https://app.rtbdomains.com/api/v1/lists/1/domains?api_key=YOUR_KEY
Content-Type: application/json
{
"domains": ["example.com", "example2.com", "example3.com"]
}
Response:
{
"success": true,
"message": "Added 3 domain(s), skipped 0 duplicate(s)",
"added": 3,
"skipped": 0
}
Remove specific domains from a list
DELETE https://app.rtbdomains.com/api/v1/lists/1/domains?api_key=YOUR_KEY
Content-Type: application/json
{
"domains": ["example.com", "example2.com"]
}
Response:
{
"success": true,
"message": "Removed 2 domain(s)",
"removed": 2
}
Replace all domains in a list (full synchronization)
PUT https://app.rtbdomains.com/api/v1/lists/1/domains?api_key=YOUR_KEY
Content-Type: application/json
{
"domains": ["newdomain1.com", "newdomain2.com", "newdomain3.com"]
}
Response:
{
"success": true,
"message": "Replaced list with 3 domain(s)",
"total": 3
}
| Status Code | Error | Description |
|---|---|---|
401 |
Missing API Key | api_key parameter is required |
401 |
Invalid Management Key | Invalid or inactive management API key. Use your management key (not bidding key) for domain operations. |
404 |
List Not Found | List ID doesn't exist or you don't have permission to access it |
400 |
Invalid Request Body | Missing or malformed JSON in request body (e.g., domains array required) |
For access to the control panel and additional features, please log in at: /login
RTB Domains - Built with Cloudflare Workers
Powered by D1, Workers KV, and Analytics Engine