curl
curl --request GET \
--url 'https://analytics.us.algolia.com/2/abtests?offset=0&limit=10&indexPrefix=dev_&indexSuffix=_development' \
--header 'accept: application/json' \
--header 'x-algolia-api-key: ALGOLIA_API_KEY' \
--header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID'// Initialize the client
var client = new AbtestingClient(
new AbtestingConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
);
// Call the API
var response = await client.ListABTestsAsync();
// print the response
Console.WriteLine(response);// Initialize the client with your application region, eg. abtesting.ALGOLIA_APPLICATION_REGION
client, err := abtesting.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", abtesting.US)
if err != nil {
// The client can fail to initialize if you pass an invalid parameter.
panic(err)
}
// Call the API
response, err := client.ListABTests(client.NewApiListABTestsRequest())
if err != nil {
// handle the eventual error
panic(err)
}
// print the response
print(response)// Initialize the client
AbtestingClient client = new AbtestingClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION");
// Call the API
ListABTestsResponse response = client.listABTests();
// print the response
System.out.println(response);// Initialize the client
// Replace 'us' with your Algolia Application Region
const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY').initAbtesting({ region: 'us' });
// Call the API
const response = await client.listABTests();
// print the response
console.log(response);// Initialize the client
val client =
AbtestingClient(
appId = "ALGOLIA_APPLICATION_ID",
apiKey = "ALGOLIA_API_KEY",
region = "ALGOLIA_APPLICATION_REGION",
)
// Call the API
var response = client.listABTests()
// print the response
println(response)// Initialize the client
$client = AbtestingClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY', 'ALGOLIA_APPLICATION_REGION');
// Call the API
$response = $client->listABTests();
// print the response
var_dump($response);# Initialize the client
# In an asynchronous context, you can use AbtestingClient instead, which exposes the exact same methods.
client = AbtestingClientSync(
"ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION"
)
# Call the API
response = client.list_ab_tests()
# print the response
print(response)# Initialize the client
client = Algolia::AbtestingClient.create("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
# Call the API
response = client.list_ab_tests
# print the response
puts(response)// Initialize the client
val client = AbtestingClient(
appId = "ALGOLIA_APPLICATION_ID",
apiKey = "ALGOLIA_API_KEY",
region = Option("ALGOLIA_APPLICATION_REGION")
)
// Call the API
val response = Await.result(
client.listABTests(
),
Duration(100, "sec")
)
// print the response
println(response)// Initialize the client
let client = try AbtestingClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY", region: .us)
// Call the API
let response = try await client.listABTests()
// print the response
print(response){
"abtests": [
{
"abTestID": 224,
"createdAt": "2023-06-15T15:06:04.249906Z",
"endAt": "2023-06-17T00:00:00Z",
"name": "Custom ranking sales rank test",
"status": "active",
"updatedAt": "2023-06-15T15:06:44.400601Z",
"variants": [
{
"addToCartCount": 0,
"clickCount": 65131,
"conversionCount": 4785,
"index": "delcourt_production",
"noResultCount": 0,
"purchaseCount": 0,
"searchCount": 86269,
"trackedUserCount": 55501,
"trafficPercentage": 60,
"userCount": 55501,
"addToCartRate": 0,
"averageClickPosition": 29.12342,
"clickThroughRate": 0.22219857724813036,
"conversionRate": 0.14546725846658964,
"currencies": {
"USD": {
"currency": "USD",
"revenue": 120,
"mean": 53.7,
"standardDeviation": 12.3,
"winsorizedAmount": 23
},
"EUR": {
"currency": "EUR",
"revenue": 100,
"mean": 43.7,
"standardDeviation": 10.3,
"winsorizedAmount": 10
}
},
"description": "Current production index",
"estimatedSampleSize": 0,
"filterEffects": {
"emptySearch": {
"usersCount": 1,
"trackedSearchesCount": 237
},
"outliers": {
"usersCount": 1,
"trackedSearchesCount": 237
}
},
"purchaseRate": 0,
"trackedSearchCount": 2
}
],
"addToCartSignificance": 1,
"clickSignificance": 1,
"configuration": {
"emptySearch": {
"exclude": true
},
"featureFilters": {
"aiPerso": true,
"dynamicReRanking": true,
"multiSignalRanking": true
},
"minimumDetectableEffect": {
"metric": "addToCartRate",
"size": 0.5
},
"outliers": {
"exclude": true
}
},
"conversionSignificance": 1,
"purchaseSignificance": 1,
"revenueSignificance": {
"USD": 1,
"EUR": 0.87
},
"stoppedAt": "2023-06-15T15:06:44.400601Z"
}
],
"count": 10,
"total": 12
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}A/B testing API v2 (deprecated)
List all A/B tests
deprecated
This endpoint is deprecated. Use the A/B Testing API v3 instead.
GET
/
2
/
abtests
curl
curl --request GET \
--url 'https://analytics.us.algolia.com/2/abtests?offset=0&limit=10&indexPrefix=dev_&indexSuffix=_development' \
--header 'accept: application/json' \
--header 'x-algolia-api-key: ALGOLIA_API_KEY' \
--header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID'// Initialize the client
var client = new AbtestingClient(
new AbtestingConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
);
// Call the API
var response = await client.ListABTestsAsync();
// print the response
Console.WriteLine(response);// Initialize the client with your application region, eg. abtesting.ALGOLIA_APPLICATION_REGION
client, err := abtesting.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", abtesting.US)
if err != nil {
// The client can fail to initialize if you pass an invalid parameter.
panic(err)
}
// Call the API
response, err := client.ListABTests(client.NewApiListABTestsRequest())
if err != nil {
// handle the eventual error
panic(err)
}
// print the response
print(response)// Initialize the client
AbtestingClient client = new AbtestingClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION");
// Call the API
ListABTestsResponse response = client.listABTests();
// print the response
System.out.println(response);// Initialize the client
// Replace 'us' with your Algolia Application Region
const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY').initAbtesting({ region: 'us' });
// Call the API
const response = await client.listABTests();
// print the response
console.log(response);// Initialize the client
val client =
AbtestingClient(
appId = "ALGOLIA_APPLICATION_ID",
apiKey = "ALGOLIA_API_KEY",
region = "ALGOLIA_APPLICATION_REGION",
)
// Call the API
var response = client.listABTests()
// print the response
println(response)// Initialize the client
$client = AbtestingClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY', 'ALGOLIA_APPLICATION_REGION');
// Call the API
$response = $client->listABTests();
// print the response
var_dump($response);# Initialize the client
# In an asynchronous context, you can use AbtestingClient instead, which exposes the exact same methods.
client = AbtestingClientSync(
"ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION"
)
# Call the API
response = client.list_ab_tests()
# print the response
print(response)# Initialize the client
client = Algolia::AbtestingClient.create("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
# Call the API
response = client.list_ab_tests
# print the response
puts(response)// Initialize the client
val client = AbtestingClient(
appId = "ALGOLIA_APPLICATION_ID",
apiKey = "ALGOLIA_API_KEY",
region = Option("ALGOLIA_APPLICATION_REGION")
)
// Call the API
val response = Await.result(
client.listABTests(
),
Duration(100, "sec")
)
// print the response
println(response)// Initialize the client
let client = try AbtestingClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY", region: .us)
// Call the API
let response = try await client.listABTests()
// print the response
print(response){
"abtests": [
{
"abTestID": 224,
"createdAt": "2023-06-15T15:06:04.249906Z",
"endAt": "2023-06-17T00:00:00Z",
"name": "Custom ranking sales rank test",
"status": "active",
"updatedAt": "2023-06-15T15:06:44.400601Z",
"variants": [
{
"addToCartCount": 0,
"clickCount": 65131,
"conversionCount": 4785,
"index": "delcourt_production",
"noResultCount": 0,
"purchaseCount": 0,
"searchCount": 86269,
"trackedUserCount": 55501,
"trafficPercentage": 60,
"userCount": 55501,
"addToCartRate": 0,
"averageClickPosition": 29.12342,
"clickThroughRate": 0.22219857724813036,
"conversionRate": 0.14546725846658964,
"currencies": {
"USD": {
"currency": "USD",
"revenue": 120,
"mean": 53.7,
"standardDeviation": 12.3,
"winsorizedAmount": 23
},
"EUR": {
"currency": "EUR",
"revenue": 100,
"mean": 43.7,
"standardDeviation": 10.3,
"winsorizedAmount": 10
}
},
"description": "Current production index",
"estimatedSampleSize": 0,
"filterEffects": {
"emptySearch": {
"usersCount": 1,
"trackedSearchesCount": 237
},
"outliers": {
"usersCount": 1,
"trackedSearchesCount": 237
}
},
"purchaseRate": 0,
"trackedSearchCount": 2
}
],
"addToCartSignificance": 1,
"clickSignificance": 1,
"configuration": {
"emptySearch": {
"exclude": true
},
"featureFilters": {
"aiPerso": true,
"dynamicReRanking": true,
"multiSignalRanking": true
},
"minimumDetectableEffect": {
"metric": "addToCartRate",
"size": 0.5
},
"outliers": {
"exclude": true
}
},
"conversionSignificance": 1,
"purchaseSignificance": 1,
"revenueSignificance": {
"USD": 1,
"EUR": 0.87
},
"stoppedAt": "2023-06-15T15:06:44.400601Z"
}
],
"count": 10,
"total": 12
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}Replaced by
GET /3/abtests.
Lists all A/B tests you configured for this application.
Required ACL: analyticsAuthorizations
Query Parameters
Last modified on September 9, 2026
Was this page helpful?