---
title: "List analytics events"
method: POST
path: "/api/v2/product-analytics/analytics/list"
tags: ["Product Analytics"]
---

# List analytics events

`POST /api/v2/product-analytics/analytics/list`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/product-analytics/analytics/list`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/product-analytics/analytics/list/post.ts> (a function with typed inputs; its response is checked against the schema)

List the individual event records matching an analytics query.
Use `columns` to choose the attributes returned on each row, `sort` to order the rows,
and `limit` to cap how many are returned.

## Request body

- ProductAnalyticsAnalyticsListRequest: Request for listing the individual event records matching an analytics query.
  - `data` ProductAnalyticsAnalyticsListRequestData, required: Data object for an analytics list request.
    - `attributes` ProductAnalyticsAnalyticsListRequestAttributes, required: Attributes for an analytics list request.
      - `from` integer, required: Start time in epoch milliseconds. Must be less than `to`.
      - `query` ProductAnalyticsAnalyticsListQuery, required: The analytics list query definition. It selects the events to return with `query`, then chooses the columns on each event row, the sort applied to those rows, and a row limit. Unlike the scalar and timeseries queries, a list query returns raw event rows rather than aggregates, so it takes no compute or group-by rule.
        - `audience_filters` ProductAnalyticsAudienceFilters: Audience filter definitions for targeting specific user segments.
          - `accounts` ProductAnalyticsAudienceAccountSubquery[]: Account audience queries.
            - `name` string, required: Name of this query, referenced in the formula.
            - `query` string: Search query for filtering accounts.
          - `formula` string: Boolean formula combining audience queries by name.
          - `segments` ProductAnalyticsAudienceSegmentSubquery[]: Segment audience queries.
            - `name` string, required: Name of this query, referenced in the formula.
            - `segment_id` string, uuid, required: UUID of the segment to filter by.
          - `users` ProductAnalyticsAudienceUserSubquery[]: User audience queries.
            - `name` string, required: Name of this query, referenced in the formula.
            - `query` string: Search query for filtering users.
        - `columns` string[]: Attribute columns to include in each event row.
        - `limit` integer: Maximum number of event rows to return.
        - `query` union, required: A query definition discriminated by the `data_source` field. Use `product_analytics` for standard event queries, or `product_analytics_occurrence` for occurrence-filtered queries.
          - ProductAnalyticsEventQuery: A standard Product Analytics event query.
            - `data_source` 'product_analytics', required: The data source identifier.
            - `search` ProductAnalyticsEventSearch, required: Search parameters for an event query.
              - …
          - ProductAnalyticsOccurrenceQuery: A Product Analytics occurrence-filtered query.
            - `data_source` 'product_analytics_occurrence', required: The data source identifier for occurrence queries.
            - `search` ProductAnalyticsOccurrenceSearch, required: Search parameters for an occurrence query.
              - …
        - `sort` ProductAnalyticsAnalyticsListSort: The sort applied to the returned event rows.
          - `facet` string: Name of the facet to sort the rows by.
          - `order` 'asc' | 'desc': The direction rows are sorted in.
      - `to` integer, required: End time in epoch milliseconds.
    - `type` 'formula_analytics_extended_list_request', required: The resource type for analytics list requests.

## Response `200`

OK

- ProductAnalyticsAnalyticsListResponse: Response for an analytics list query, containing individual event records.
  - `data` ProductAnalyticsAnalyticsListResponseData, required: Data object for an analytics list response.
    - `attributes` ProductAnalyticsAnalyticsListResponseAttributes, required: Attributes of an analytics list response, containing the matching event rows.
      - `records` ProductAnalyticsAnalyticsListRecord[]: The event rows, each holding the values of the requested columns.
      - `total_count` integer: Total number of records matching the query, before the row limit is applied.
    - `id` string, required: Unique identifier for this response data object.
    - `type` 'list_response', required: The resource type identifier for an analytics list response.
  - `meta` ProductAnalyticsResponseMeta: Metadata for a Product Analytics query response.
    - `request_id` string: Unique identifier of the query.
    - `status` 'done' | 'running' | 'timeout': The execution status of a Product Analytics query.

## Other responses

- `400`: Bad Request
- `403`: Not Authorized
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
