Skip to main content

Get Experiment Result

GET/v2/project/{project_key}/experiment/{test_id}/result

Return dashboard-parity conversion results for an experiment, with optional goal drilldowns, dashboard-compatible filters, and breakdowns.

Path parameters

ParameterDescription
project_keyYour project's API key
test_idThe numeric experiment ID

Query parameters

ParameterTypeDescription
start_datestringFilter conversions from this date. Format: YYYY-MM-DD.
end_datestringFilter conversions through this date. Format: YYYY-MM-DD.
goal_keystringDrill into a specific primary or secondary goal by goal_key. If omitted, the experiment primary goal is used.
goal_profile_idstringDrill into a specific goal by internal goal ID. Prefer goal_key when available.
filter_bystringDashboard preset segment filter such as mobile, desktop, new, returning, paid, search, direct, or country-US.
custom_filterstring | arrayDashboard custom segment rules in the same nested rule shape used by the dashboard segment builder.
breakdown_bystringSegment results by a dashboard-supported dimension. See Supported breakdowns.
event_attributearrayDashboard event attribute filters for event, revenue, and script goals. Use the dashboard nested condition shape. See Event attribute filters.
min_countnumberMinimum matching event count per visitor for event-backed goals. Defaults to 1.
timeframe_daysnumberEvent conversion window in days after test entry for event-backed goals.
tzstringDashboard timezone hour offset used for date filtering. Defaults to 0.

All query parameters are optional. Counts and conversion rates are produced by the same backend route as the Mida dashboard (/abtest/conversion). Date filters can be one-sided: if only start_date is supplied, results are filtered from that date through the current server date; if only end_date is supplied, results are filtered from the experiment creation date through that date. The previous Public V2 structured filters object is rejected for parity; use filter_by or custom_filter.

Supported breakdowns

device, browser, os, country, region, city, user_type, ref_page, landing_page, utm_campaign, utm_source, utm_medium, utm_content, utm_term

UTM values are public aliases. Public V2 validates them against this allowlist, maps them to dashboard-safe property.utm_* values before calling /abtest/conversion, and rejects unsupported values with 400.

user_type is derived from visitor age at test entry: new means the visitor record was created within 24 hours of the goal row timestamp; otherwise it is returning.

Supported filters

Use the same filter inputs as the dashboard:

  • filter_by for preset segments, for example mobile, desktop, new, returning, paid, search, direct, or country-US. Comma-separating different dimensions is AND (desktop,country-US = Desktop AND US); comma-separating multiple country-XX tokens is OR within country (desktop,country-US,country-CA = Desktop AND (US OR CA)).
  • custom_filter for the dashboard's segment-builder rules in the same nested array shape: inner arrays are OR groups, outer arrays are AND groups.

custom_filter criteria

These are the same criteria the dashboard's Custom Segment form exposes:

CriteriaNotes
landing_page, ref_page, user_agentURL/string match against the visitor's landing page, referrer, or user-agent.
queryparamRequires key (the query-string param name).
sourceFixed values: direct, referral, social, search, nonpaid, paid, email.
deviceFixed values: mobile, desktop, tablet.
browserFixed values: chrome, firefox, safari, edge_chromium, edge_legacy, opera, ie, brave, vivaldi, yandex, chromium, samsung, uc, duckduckgo, silk, facebook, instagram, other.
osFixed values: windows, macos, ios, linux.
dayofweekInteger 0 (Monday) – 6 (Sunday). Also supports >, >=, <, <=.
hourofdayInteger 023. Also supports >, >=, <, <=.
visitor_typeFixed values: new, returning.
countryISO 3166-1 alpha-2 uppercase (e.g. US, GB). Only ==, !=, **, !*.
v.visitor_id, v.uuidVisitor identifiers. 1–80 chars of [A-Za-z0-9_-]. Only ==, !=, **, !*.
attributeVisitor attribute. Requires key; supports extended operators including gt, gte, lt, lte, bt, bf, days_gt, days_gte, days_lt, days_lte.
utmRequires key (the UTM param name).

Operators (unless otherwise noted): ==, !=, ** (contains), !* (does not contain), ex (exists), nx (does not exist).

region and city are not custom_filter criteria — use a filter_by regional preset (northamerica, europe, asiapacific, latinamerica, africa, middleeast) or breakdown_by=region/breakdown_by=city to split results by them.

Event attribute filters

event_attribute must be valid JSON in the nested dashboard shape: an outer OR array containing inner AND arrays of filter objects. Each object supports key, operand, and value; operator is accepted as an alias for operand.

Supported operands are =, !=, >, <, >=, <=, ** (contains), !* (does not contain), ex (exists), and nx (does not exist). Keys may contain only letters, numbers, _, ., and -, up to 80 characters. Values are capped at 500 characters.

Examples

curl "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/result" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY"

With date filtering:

curl "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/result?start_date=2024-01-15&end_date=2024-02-15" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY"

Filtered to mobile traffic:

curl -G "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/result" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY" \
--data-urlencode 'filter_by=mobile'

Custom segment — Desktop AND (US OR Canada) AND Chrome:

curl -G "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/result" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY" \
--data-urlencode 'custom_filter=[[{"criteria":"country","operator":"==","value":"US"},{"criteria":"country","operator":"==","value":"CA"}],[{"criteria":"device","operator":"==","value":"desktop"}],[{"criteria":"browser","operator":"==","value":"chrome"}]]'

Breakdown by device:

curl "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/result?breakdown_by=device" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY"

Specific goal with event attribute filters:

curl -G "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/result" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY" \
--data-urlencode 'goal_key=purchase' \
--data-urlencode 'event_attribute=[[{"key":"revenue","operand":">","value":100},{"key":"currency","operand":"=","value":"USD"}]]'

Success response

{
"success": true,
"test_id": 1234,
"test_name": "Homepage CTA Button Color Test",
"status": "live",
"status_code": 1,
"start_date": "2024-01-15T10:30:00.000Z",
"end_date": null,
"days_running": 15,
"primary_goal": {
"goal_name": "CTA Button Click",
"goal_type": "clickOnElement",
"goal_value": ".cta-button"
},
"stats_engine": "bayesian",
"confidence_threshold_percent": 95,
"total_visitors": 2980,
"total_conversions": 268,
"variants": [
{
"variant_id": "0",
"name": "Control",
"visitors": 1500,
"conversions": 120,
"conversion_rate": 8.0,
"is_control": true
},
{
"variant_id": "1",
"name": "Red CTA Button",
"visitors": 1480,
"conversions": 148,
"conversion_rate": 10.0,
"improvement": 25.0,
"is_control": false
}
]
}

Response fields

FieldTypeDescription
test_idintegerUnique experiment ID
test_namestringExperiment name
statusstringHuman-readable label: "draft", "live", or "inactive"
status_codeintegerNumeric status: 9=draft, 1=live, 0=inactive
start_datestringWhen the experiment was created (ISO 8601)
end_datestring | nullThe date the experiment was formally concluded, or null. See note below.
days_runningintegerDays since creation. If the experiment is concluded, counts to the end_date; otherwise counts to now.
stats_enginestringStatistical framework configured for this test: "bayesian" or "frequentist". Mirrors the dashboard's per-test stats mode. Consumers (AI agents, dashboards, custom integrations) should speak in the matching framework — chance-to-beat-Control / expected loss for Bayesian tests, p-values / confidence intervals for Frequentist tests.
confidence_threshold_percentnumberPer-test deploy threshold (e.g. 95). For Bayesian tests this is the chance-to-beat-Control needed to call a winner; for Frequentist tests this is the significance level (winners require p < 1 - threshold/100).
primary_goalobject | nullPrimary conversion goal definition, or null if none set
total_visitorsintegerTotal visitors across all variants
total_conversionsintegerTotal conversions across all variants
variantsarrayPer-variant result objects (control listed first)
breakdown_bystringPresent when breakdown_by is requested
breakdownsarrayPer-segment totals and variant results, present when breakdown_by is requested
About end_date and is_completed

end_date is only populated when the experiment has been formally concluded from the Mida dashboard (marked as complete). Deactivating an experiment via the API (status: 0) stops data collection but does not set end_date — it remains null. The days_running calculation uses end_date if set, otherwise counts to the current time.

Variant fields

FieldTypeDescription
variant_idstringVariant identifier ("0" = control)
namestringVariant display name
visitorsintegerUnique visitors assigned to this variant
conversionsintegerNumber of visitors who converted
conversion_ratenumberConversion rate as a percentage (e.g. 10.0 = 10%)
improvementnumberRelative lift vs the control in percent (e.g. 25.0 = +25%). Only present on non-control variants when the control has data.
is_controlbooleanWhether this is the control variant

Breakdown fields

Each breakdown item includes criteria, totals, conversion rate, and variants with lift calculated against Control within that segment.

Error responses

StatusMeaning
400Invalid test_id, malformed query parameters, unsupported filters, use of structured filters, or date parameters are malformed / out of order
401Invalid or missing API key
404Experiment not found or belongs to a different project
Next step

Need secondary goal results? Use Get Experiment Metrics. Done reviewing results? You can deactivate the experiment (status: 0) or get a public share link to send to stakeholders.