- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- AudienceRow
- AudienceDimensionValue
- Try it!
Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to audienceExports.create
is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export.
See Creating an Audience Export for an introduction to Audience Exports with examples.
Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572.
Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the Google Analytics Audience Export API Feedback form.
HTTP request
POST https://analyticsdata.googleapis.com/v1beta/{name=properties/*/audienceExports/*}:query
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name |
Required. The name of the audience export to retrieve users from. Format: |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "offset": string, "limit": string } |
Fields | |
---|---|
offset |
Optional. The row count of the start row. The first row is counted as row 0. When paging, the first request does not specify offset; or equivalently, sets offset to 0; the first request returns the first To learn more about this pagination parameter, see Pagination. |
limit |
Optional. The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for. The API can also return fewer rows than the requested To learn more about this pagination parameter, see Pagination. |
Response body
A list of users in an audience export.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "audienceRows": [ { object ( |
Fields | |
---|---|
audience |
Rows for each user in an audience export. The number of rows in this response will be less than or equal to request's page size. |
audience |
Configuration data about AudienceExport being queried. Returned to help interpret the audience rows in this response. For example, the dimensions in this AudienceExport correspond to the columns in the AudienceRows. |
row |
The total number of rows in the AudienceExport result. To learn more about this pagination parameter, see Pagination. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics
AudienceRow
Dimension value attributes for the audience user row.
JSON representation |
---|
{
"dimensionValues": [
{
object ( |
Fields | |
---|---|
dimension |
Each dimension value attribute for an audience user. One dimension value will be added for each dimension column requested. |
AudienceDimensionValue
The value of a dimension.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field one_value . One kind of dimension value. one_value can be only one of the following: |
|
value |
Value as a string if the dimension type is a string. |