> ## Documentation Index
> Fetch the complete documentation index at: https://developers.criteo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Audience Endpoints

## **Endpoints**

| Verb     | Endpoint                                               | Description                                                                                                                                                                                       |
| -------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **POST** | `/retail-media/accounts/{account-id}/audiences/search` | Returns a list of audiences that match the provided filters. If present, the filters are AND'ed together when applied. You can search audiences by audience IDs, retailer IDs and/or segment IDs. |

 

## **Audience Attributes**

<ResponseField name="id">
  **Data Type:** string

  **Values:** int64

  **Nullable?** No

  **Description:** Audience ID
</ResponseField>

<ResponseField name="name">
  **Data Type:** string

  **Values:** string

  **Nullable?** No

  **Description:** Audience name
</ResponseField>

<ResponseField name="description">
  **Data Type:** string

  **Values:** string

  **Nullable?** Yes

  **Description:** Description of the Audience
</ResponseField>

<ResponseField name="createdAt">
  **Data Type:** string

  **Values:** YYYY-MM-DDTHH:mm:ss:msZ

  **Nullable?** No

  **Description:** Timestamp (in UTC) of Audience reation
</ResponseField>

<ResponseField name="createdById">
  **Data Type:** string

  **Values:** int64

  **Nullable?** Yes

  **Description:** User ID of the Audience creator (null if created by a service)
</ResponseField>

<ResponseField name="updatedAt">
  **Data Type:** string

  **Values:** YYYY-MM-DDTHH:mm:ss:msZ

  **Nullable?** No

  **Description:** Timestamp (in UTC) of Audience update
</ResponseField>

<ResponseField name="accountID">
  **Data Type:** string

  **Values:** int64

  **Nullable?** No

  **Description:** Account associated with the Audience
</ResponseField>

<ResponseField name="retailerId">
  **Data Type:** string

  **Values:** int

  **Nullable?** No

  **Description:** ID of the retailer. To retrieve the RetailerID associated to your Supply account you can use the GET call found [here](/retail-media/docs/retailers)
</ResponseField>

<ResponseField name="Algebra Node">
  **Data Type:** string

  **Values:** [Algebra Node](/retail-media/docs/algebra-nodes)

  **Nullable:** No

  **Description:** Algebra Node with the definition of how the different audiences are mixed to create the audience using logical operators: AND, OR, NOT
</ResponseField>

 

## **Search Audiences**

This endpoint returns a list of audiences that match the provided filters. If present, the filters are AND'ed together when applied. You can search audiences by audience IDs, retailer IDs and/or segment IDs.

**Sample Request: searching by Retailer ID only**

<CodeGroup>
  ```bash cURL theme={null}
  curl -L -X POST 'https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences/search' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <MY_ACCESS_TOKEN>'
  -d '{
    "data": {
      "type": "Audience",
      "attributes": {
        "audienceIds": null,
        "retailerIds": [
          "12"
        ],
        "audienceSegmentIds": null
      }
    }
  }
  ```
</CodeGroup>

**Sample Response**

<CodeGroup>
  ```json JSON expandable theme={null}
  {
      "meta": {
          "totalItems": 400,
          "limit": 50,
          "offset": 0
      },
      "data": [
          {
              "attributes": {
                  "name": "My audience A",
                  "description": null,
                  "createdAt": "2024-01-12T11:46:13.77Z",
                  "updatedAt": "2024-02-12T11:46:13.77Z",
                  "accountId": "625702934721171442",
                  "retailerId": "12",
                  "algebra": {
                      "audienceSegmentId": "56159923678901880"
                  },
                  "createdById": "j.doe"
              },
              "id": "258216562069631686",
              "type": "RetailMediaAudience"
          },
          // ...
          {
              "attributes": {
                  "name": "My audience B",
                  "description": null,
                  "createdAt": "2024-01-22T14:41:32.489Z",
                  "updatedAt": "2024-01-22T14:41:32.489Z",
                  "accountId": "625702934721171442",
                  "retailerId": "12",
                  "algebra": {
                      "audienceSegmentId": "225702933721195672"
                  },
                  "createdById": "a.jack"
              },
              "id": "920472839472539402",
              "type": "RetailMediaAudience"
          }
      ],
      /* omitted if no errors */
      "errors": [],
      /* omitted if no warnings */
      "warnings": []
  }
  ```
</CodeGroup>

**Sample Request: searching by multiple filters**

<CodeGroup>
  ```bash cURL theme={null}
  curl -L -X POST 'https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences/search' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <MY_ACCESS_TOKEN>'
  -d '{
    "data": {
      "type": "Audience",
      "attributes": {
        "audienceIds": ["920472839472539402"],
        "retailerIds": [
          "12"
        ],
        "audienceSegmentIds": ["225702933721195672"]
      }
    }
  }
  ```
</CodeGroup>

**Sample Response**

<CodeGroup>
  ```json JSON theme={null}
  {
      "meta": {
          "totalItems": 400,
          "limit": 50,
          "offset": 0
      },
      "data": [
          {
              "attributes": {
                  "name": "My audience",
                  "description": null,
                  "createdAt": "2024-01-22T14:41:32.489Z",
                  "updatedAt": "2024-01-22T14:41:32.489Z",
                  "accountId": "625702934721171442",
                  "retailerId": "12",
                  "algebra": {
                      "audienceSegmentId": "225702933721195672"
                  },
                  "createdById": "a.jack"
              },
              "id": "920472839472539402",
              "type": "RetailMediaAudience"
          }
      ],
      /* omitted if no errors */
      "errors": [],
      /* omitted if no warnings */
      "warnings": []
  }
  ```
</CodeGroup>
