Rank control markets
Daily revenue by region over a lookback window (default 90 days), with candidate control markets ranked by Pearson correlation of daily revenue against the proposed test set. Use this to design a test: propose test_regions, take the top-correlated candidates as controls. Omit test_regions to just inventory revenue by region.
curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/incrementality/markets?test_regions=example_string&lookback_days=90&event_name=John%20Doe&json_path=example_string&measure=revenue" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/incrementality/markets?test_regions=example_string&lookback_days=90&event_name=John%20Doe&json_path=example_string&measure=revenue"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/incrementality/markets?test_regions=example_string&lookback_days=90&event_name=John%20Doe&json_path=example_string&measure=revenue", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://mythic-analytics.gulp.workers.dev/client/v1/incrementality/markets?test_regions=example_string&lookback_days=90&event_name=John%20Doe&json_path=example_string&measure=revenue", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/incrementality/markets?test_regions=example_string&lookback_days=90&event_name=John%20Doe&json_path=example_string&measure=revenue')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"window": {
"from": "2026-05-01",
"to": "2026-05-31"
},
"test_regions": [
"example_string"
],
"test_total_revenue": 3.14,
"days": 42,
"candidates": [
{
"region": "Ohio",
"correlation": 0.93,
"total_revenue": 3.14,
"volume_ratio": 3.14
}
]
}
}
{
"error": "Error",
"message": "`scan_limit_exceeded` — the dataset is too large to scan under the API's bytes-billed cap, even after one automatic retry at half the requested lookback. Retry with a smaller `lookback_days`. The message reports how many GB the query needed.
",
"code": 413
}
{
"error": "Error",
"message": "`dataset_missing` — this client has no BigQuery event dataset, so incrementality cannot be assessed. It needs a BigQuery export provisioned (and `api_metadata.client_project_id` set if its data lives in a shared project). Distinguished from a 5xx on purpose: nothing is broken, the client just isn't set up yet.
",
"code": 424
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
{
"error": "Error",
"message": "Markets query failed for an unrecognised reason. Recognised BigQuery failures return 413/424 instead.",
"code": 502
}
/client/v1/incrementality/markets
Target server for requests. Edit to use your own host.
Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need incrementality:read or incrementality:write. See Using an mcp_ key over HTTP.
Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need incrementality:read or incrementality:write. See Using an mcp_ key over HTTP.
Comma-separated proposed test regions (e.g. California,Texas).
Days of history to correlate over. Default 90, min 14, max 365.
Conversion event name (default purchase).
JSON path to revenue in properties_json (default $.value — properties_json IS the event's properties object).
revenue (default) sums the value at json_path; count counts matching events instead — the lead-gen mode (e.g. ?event_name=form_submitted&measure=count).
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need incrementality:read or incrementality:write. See Using an mcp_ key over HTTP.
Query Parameters
Comma-separated proposed test regions (e.g. California,Texas).
Days of history to correlate over. Default 90, min 14, max 365.
Conversion event name (default purchase).
JSON path to revenue in properties_json (default $.value — properties_json IS the event's properties object).
revenue (default) sums the value at json_path; count counts matching events instead — the lead-gen mode (e.g. ?event_name=form_submitted&measure=count).
revenuecount