Skip to main content
POST
/
3
/
abtests
/
estimate
curl
curl --request POST \
  --url https://analytics.us.algolia.com/3/abtests/estimate \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
  --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \
  --data '{"configuration":{"filters":[{"domain":"abtesting","name":"isOutlier","trackEffects":true,"includes":true}],"minimumDetectableEffect":{"size":0,"metric":"addToCartRate"}},"variants":[{"index":"delcourt_production","trafficPercentage":60,"description":"Current production index"},{"index":"delcourt_production","trafficPercentage":60,"description":"Current production index"}]}'
{
  "durationDays": 21,
  "sampleSizes": [
    23415
  ]
}
Required ACL: analytics

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Body

application/json
configuration
object
required

A/B test configuration for estimating the sample size and duration using minimum detectable effect.

variants
object[]
required

A/B test variants.

Minimum length: 2
  • Option 1
  • Option 2

Response

OK

durationDays
integer

Estimated number of days needed to reach the sample sizes required for detecting the configured effect. This value is based on historical traffic.

Example:

21

sampleSizes
integer[]

Sample size estimates for each variant. The first element is the control variant. Each element is the estimated number of searches required to achieve the desired statistical significance.

Number of tracked searches needed to be able to detect the configured effect for the control variant.

I