> This page is for Data API, version v2 (default).
> For other versions, use one of these documentation indexes:
> - v2 (default): https://developers.webflow.com/data/v2.0.0/llms.txt
> - v2 Beta: https://developers.webflow.com/data/v2.0.0-beta/llms.txt
> - v1: https://developers.webflow.com/data/v1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Get Audience Insights

GET https://api.webflow.com/v2/optimize/{optimize_id}/optimizations/{optimization_id}/audience-insights

Returns each variation's sessions, users, conversions, and conversion rate for each segment of one dimension, for one goal over a date range within one interval. Choose the dimension with `groupBy`.Each segment also shows how the variation is trending against the base variation in that segment, and how confident that trend is. Choose the goal with `goalId`, and narrow the results with `filter`.This endpoint requires a Webflow site with the Optimize add-on, or a non-Webflow site that uses Optimize.Each access token can have one Optimize request in flight at a time, across all Optimize endpoints. Additional concurrent requests return `429 Too Many Requests`. Wait for your in-flight request to finish, or for the `Retry-After` interval, then retry.Required scope | `sites:read`

Reference: https://developers.webflow.com/data/reference/optimize/get-audience-insights

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `optimize_id` (string, required) — The Optimize ID, from [List Optimize IDs](/data/reference/optimize/list-optimize-ids).
- `optimization_id` (string, required) — The optimization ID, from [List Optimizations](/data/reference/optimize/list-optimizations).

### Query parameters

- `intervalStart` (string, required) — Start of the date range. Must be a UTC timestamp ending in `Z`, such as `2026-09-01T00:00:00Z`. Offsets and date-only values aren't accepted. Seconds and milliseconds are optional. The date range must fall within a single interval of the optimization. A range that crosses from one interval into the next is rejected. Use an interval's `start` and `end` from [List Optimizations](/data/reference/optimize/list-optimizations). Can't be earlier than 18 months ago.
- `intervalEnd` (string, required) — End of the date range. Must be a UTC timestamp ending in `Z`, such as `2026-09-15T00:00:00Z`, and later than `intervalStart`. Offsets and date-only values aren't accepted. Seconds and milliseconds are optional.
- `groupBy` (string, required) — The dimension to split results by, from [List Dimensions](/data/reference/optimize/list-dimensions). Accepts any dimension except `urlParameter`.
- `goalId` (string, optional) — The goal to measure. Defaults to the interval's first target goal, or its first goal if it has no target goal. Use a `goalId` from the interval's `goals` or from the optimization's `currentGoals`. See [List Optimization Goals](/data/reference/optimize/list-optimization-goals). If the goal is in both lists, the report uses the interval's version. A goal from `currentGoals` is measured with its current settings over the whole date range, including dates before it was added to the optimization.
- `filter` (map from string to OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetParametersFilterSchema, optional) — Narrow the results to visitors who match dimension values. Use bracket notation with `in` or `nin` and indexed arrays, for example `filter[country][in][0]=US&filter[country][in][1]=GB&filter[customAttribute:towel][nin][0]=forgotten`. Keys are dimension `id` values from [List Dimensions](/data/reference/optimize/list-dimensions), and values are raw `value` values from [List Dimension Values](/data/reference/optimize/list-dimension-values). Separate dimensions combine with AND. Values within one dimension combine with OR. A filter can name at most 20 dimensions, with at most 50 values per operator and 500 values in total.

## Response

### 200

Each variation's results for each segment of the `groupBy` dimension.

- `report` (enum, required) — Identifies the report type.
  - Allowed values: `optimization_audience_insights`
- `intervalStart` (string, required) — Start of the reported date range, in full form with milliseconds.
- `intervalEnd` (string, required) — End of the reported date range, in full form with milliseconds.
- `goal` (OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaGoal, required) — The goal the report measures. When the request omits `goalId`, this is the interval's first target goal, or its first goal if it has no target goal.
- `optimizationType` (enum, required) — The kind of optimization. - `test`: A traditional test. Randomly shows different versions of your content to a set percentage of your traffic. After enough traffic has seen the variations, a single winner is determined based on statistical significance. - `personalize`: A manual personalization. Uses rules-based personalization to define who should see which variation. Runs until you choose to stop it, and every visitor in the target segment consistently sees the same version of the page. - `aiOptimize`: An AI-optimized optimization. Uses AI to automatically deliver the best-performing variation to each visitor. As behavior shifts, the AI adapts in real time, learning which versions yield the most conversions.
  - Allowed values: `test`, `personalize`, `aiOptimize`
- `groupedBy` (OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaGroupedBy, required) — The dimension the segments are grouped by, from the request's `groupBy`.
- `variations` (list of OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaVariationsItems, required) — One entry per variation.
- `filter` (map from string to OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaFilter, optional) — The request's `filter`, keyed by dimension `id`, with each dimension's display name. Present only when the request included a `filter`.

## Errors

### 400 Bad Request Error

The request failed validation. The `code` field identifies the rule that failed: - `optimize_input_validation` — a parameter is invalid. `details[0].param` names the first failing field. - `optimize_invalid_interval` — `intervalEnd` isn't later than `intervalStart`, the optimization has never run, or the date range isn't within a single interval of the optimization. - `optimize_before_historical_floor` — `intervalStart` is earlier than 18 months ago. - `optimize_unknown_goal` — `goalId` doesn't match a goal in the interval's `goals` or the optimization's `currentGoals`, or the interval has no goals. - `optimize_unknown_dimension` — `groupBy` or a `filter` key doesn't match a dimension for this optimization and interval. - `optimize_unsupported_group_by` — the `groupBy` dimension can't be used to group, such as `urlParameter`.

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 401 Unauthorized Error

Provided access token is invalid or does not have access to requested resource

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 403 Forbidden Error

The access token is missing the `sites:read` scope (`missing_scopes`), or doesn't have sufficient user-level permissions (`insufficient_permissions`).

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 404 Not Found Error

The requested resource wasn't found (`resource_not_found`), or no optimization matches `optimization_id` (`optimize_unknown_optimization`).

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 409 Conflict Error

The `optimize_id` matches more than one resource the access token can access.

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 429 Too Many Requests Error

The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 500 Internal Server Error

We had a problem with our server. Try again later.

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

## Types

### OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetParametersFilterSchema

Values to include or exclude for one dimension. Specify at least one of `in` or `nin`. Values within one dimension combine with OR.

- `in` (list of string, optional) — Include visitors whose value for this dimension is in this list. Use indexed bracket notation, for example `filter[country][in][0]=US&filter[country][in][1]=GB`.
- `nin` (list of string, optional) — Exclude visitors whose value for this dimension is in this list. Use indexed bracket notation, for example `filter[customAttribute:towel][nin][0]=forgotten`.

### OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaGoal

The goal the report measures. When the request omits `goalId`, this is the interval's first target goal, or its first goal if it has no target goal.

- `goalId` (string, required) — The goal ID.
- `name` (string, required) — The goal's name.

### OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaGroupedBy

The dimension the segments are grouped by, from the request's `groupBy`.

- `id` (string, required) — The dimension ID. Use it in `groupBy`, as a `filter` key, or to list the dimension's values.
- `name` (string, required) — The dimension's display name.

### OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaVariationsItems

One variation's results, split by segment.

- `variationId` (string, required) — The variation ID.
- `name` (string, required) — The variation's name.
- `segments` (list of OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaVariationsItemsSegmentsItems, required) — One entry per segment of the `groupBy` dimension.

### OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaFilter

The filter applied for one dimension.

- `name` (string, required) — The dimension's display name.
- `in` (list of string, optional) — The included values.
- `nin` (list of string, optional) — The excluded values.

### OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaDetailsItems

### OptimizeOptimizeIdOptimizationsOptimizationIdAudienceInsightsGetResponsesContentApplicationJsonSchemaVariationsItemsSegmentsItems

One variation's results for one segment of the `groupBy` dimension.

- `segment` (string, required) — The segment's value for the `groupBy` dimension.
- `segmentLabel` (string, required) — The segment's display label.
- `sessions` (double, required) — The number of sessions in this segment that saw the variation.
- `users` (double, required) — The number of users in this segment who saw the variation.
- `conversions` (double, required) — The number of conversions in this segment.
- `conversionRate` (double, required) — The conversion rate in this segment, as a fraction. For example, `0.19` means 19%.
- `value` (double, optional) — The total value of this segment's conversions. For `value` goals only.
- `lift` (double, optional) — The variation's lift in this segment, as a fraction. For example, `0.19` means 19%. For `conversion` goals only.
- `trendDirection` (enum, optional) — How the variation performs against the base variation in this segment. - `up`: The variation is trending better than the base variation in this segment. - `down`: The variation is trending worse than the base variation in this segment. - `sideways`: No meaningful difference from the base variation in this segment, with enough data that a 10% difference would likely have been detected. - `unsure`: Not enough data in this segment to tell whether the variation differs from the base variation.
  - Allowed values: `up`, `down`, `sideways`, `unsure`
- `confidence` (double, optional) — A value from 0 to 1 for how much to trust `trendDirection`. - For `up` and `down`, the confidence that the difference from the base variation is real. - For `sideways`, the confidence that a 10% difference would have been detected. - Always `0` for `unsure`.

## Examples

**Response**

```json
{
  "report": "optimization_audience_insights",
  "intervalStart": "2026-09-01T00:00:00.000Z",
  "intervalEnd": "2026-09-15T00:00:00.000Z",
  "goal": {
    "goalId": "198042422",
    "name": "Newsletter signup"
  },
  "optimizationType": "test",
  "groupedBy": {
    "id": "country",
    "name": "Country"
  },
  "variations": [
    {
      "variationId": "617424201",
      "name": "Base variation",
      "segments": [
        {
          "segment": "US",
          "segmentLabel": "United States",
          "sessions": 2800,
          "users": 2100,
          "conversions": 252,
          "conversionRate": 0.12
        },
        {
          "segment": "GB",
          "segmentLabel": "United Kingdom",
          "sessions": 1300,
          "users": 950,
          "conversions": 114,
          "conversionRate": 0.12
        }
      ]
    },
    {
      "variationId": "617424202",
      "name": "Don't Panic in large, friendly letters",
      "segments": [
        {
          "segment": "US",
          "segmentLabel": "United States",
          "sessions": 2905,
          "users": 2150,
          "conversions": 261,
          "conversionRate": 0.1214,
          "lift": 0.0117,
          "trendDirection": "sideways",
          "confidence": 0.81
        },
        {
          "segment": "GB",
          "segmentLabel": "United Kingdom",
          "sessions": 1337,
          "users": 970,
          "conversions": 191,
          "conversionRate": 0.1969,
          "lift": 0.6408,
          "trendDirection": "up",
          "confidence": 0.93
        }
      ]
    }
  ]
}
```

**SDK Code**

```python AudienceInsights
import requests

url = "https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/audience-insights"

querystring = {"intervalStart":"2026-09-01T00:00:00Z","intervalEnd":"2026-09-15T00:00:00Z","groupBy":"country","goalId":"198042421"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript AudienceInsights
const url = 'https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/audience-insights?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z&groupBy=country&goalId=198042421';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go AudienceInsights
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/audience-insights?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z&groupBy=country&goalId=198042421"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby AudienceInsights
require 'uri'
require 'net/http'

url = URI("https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/audience-insights?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z&groupBy=country&goalId=198042421")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java AudienceInsights
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/audience-insights?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z&groupBy=country&goalId=198042421")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php AudienceInsights
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/audience-insights?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z&groupBy=country&goalId=198042421', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp AudienceInsights
using RestSharp;

var client = new RestClient("https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/audience-insights?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z&groupBy=country&goalId=198042421");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift AudienceInsights
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/audience-insights?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z&groupBy=country&goalId=198042421")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```