Introduction
The “audience-segments sizes” endpoints allow estimating (estimate endpoint) and retrieving (computeendpoint) the size of one or more audience-segments.
Comparative use of estimate VS compute endpoints
Feature |
|
|
|---|---|---|
Purpose | Computes size for one or more previously saved segments by ID. | Provides a quick size estimation for a specific segment. |
Input Definition | Requires a list of saved segment IDs. | A single segment ID is provided inline. |
Use Case | Used for analyzing reach of known, existing segments. | Ideal for testing or previewing a specific segment. |
Segment Source | Segment definitions are already stored in the system. | Segment reference is passed directly in the request payload. |
Response Format | Returns an array of segment sizes, one per provided ID. | Returns a single segment size object. |
Channel Specification | Required in the request payload. | Required in the request payload. |
Endpoints
Method | Path | Description |
|---|---|---|
POST |
| Compute audience segment(s) size |
POST |
| Estimate audience-segment size |
Compute Audience Segment(s) sizes
This endpoint returns the size computation for an audience-segment (if available and if supported). If the size cannot be estimated, an error is returned.Audience Segment Size Computation Attributes
Name | Format | Description |
|---|---|---|
| string / list\ | Audience Segment ID(s), generated internally by Criteo, to which the computation(s) are required Accepted values: string of int64 / list of strings of int64 Writeable? N / Nullable? N |
| string | AccountID associated with the Audience Segment, generated internally by Criteo Accepted values: string of int64 Writeable? N / Nullable? N |
| enum | Channels associated to the Audience Segment Accepted values: Writeable? N / Nullable? N |
| integer | Reach in absolute number of users (e.g., 150,300 users). Not returned if the user lacks permission to view it. Accepted values: Writeable? N / Nullable? Y |
| decimal | Reach in number of users relative to the retailer’s total audience (e.g., 0.5523 = 55.23%). Accepted values: 0.0 ≤ Writeable? N / Nullable? N |
- Writeable (Y/N): Indicates if the field can be modified in requests.
- Nullable (Y/N): Indicates if the field can accept null/empty values.
- Primary Key: A unique, immutable identifier of the entity, generated internally by Criteo. Primary keys are typically ID fields (e.g.,
retailerId,campaignId,lineItemId) and are usually required in the URL path.
Estimate Audience Segment size
Returns the size estimation for an Audience Segment (if available and if supported). If the size cannot be estimated, an error is returned.Audience Segment Size Estimation Attributes
Name | Format | Description |
|---|---|---|
| string | AccountID associated with the Audience Segment, generated internally by Criteo Accepted values: string of int64 Writeable? N / Nullable? N |
| string | RetailerID, associated with the Audience Segment, generated internally by Criteo Accepted values: string of int64 Writeable? N / Nullable? N |
| enum | Channel associated to the Audience Segment Accepted values: Writeable? N / Nullable? N |
| object | Settings to target users based on their events. Accepted values: see below for more details Writeable? N / Nullable? N |
|
| Reach in absolute number of users (e.g., 150,300 users). Not present when the user lacks permissions to view it. |
|
| Reach relative to the retailer’s total user base (e.g., 0.5523 = 55.23%). |
Events Segment Attributes
Attribute | Data Type | Description |
|---|---|---|
| enum | Activity type performed by the desired target users in the retailer’s environment Accepted values: Writeable? N / Nullable? N |
| enum | Timeframe of the interaction performed by the desired target users in the retailer’s environment Accepted values: Writeable? N / Nullable? N |
| list\ | Define users interested in specific categories from retailer’sCatalog. Note, either one of Accepted values: array of strings/int64 Writeable? N / Nullable? Y |
| list\ | Define users who performed the activity type above in specific brands from retailer’sCatalog. Note, either one of Accepted values: array of strings/int64 Writeable? N / Nullable? Y |
| decimal | Define users who interact with products whose prices are greater than Accepted values: Writeable? N / Nullable? Y |
| decimal | Define users who interact with products whose prices are smaller than Accepted values: Writeable? N / Nullable? Y |
Sample request
Responses
Response | Description |
|---|---|
🟢 | Call completed successfully (or audience-level errors returned with specific details) |
🔴 | Retailer must be authorized in provided account. Review the retailer ID provided |
🔴 | One of the permission levels was not respected. Make sure that the respective API app has access to:
|
Errors and warnings
segment-size-not-available
Error: Segment size not availableMessage: The segment size is currently not available.
segment-size-too-small
Error: Segment size is too smallMessage: Size is below the minimum: 20.