Google Analytics Data API
Accesses report data in Google Analytics. Warning: Creating multiple Customer Applications, Accounts, or Projects to simulate or act as a single Customer…
Data & analytics#openapi#analytics#media
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Accesses report data in Google Analytics. Warning: Creating multiple Customer Applications, Accounts, or Projects to simulate or act as a single Customer Application, Account, or Project (respectively) or to circumvent Service-specific usage limits or quotas is a direct violation of Google Cloud Platform Terms of Service as well as Google APIs Terms of Service. These actions can result in immediate termination of your GCP project(s) without any warning.
Endpoints 10
properties
- POSTReturns multiple pivot reports in a batch
/v1beta/:property:batchRunPivotReportsReturns multiple pivot reports in a batch. All reports must be for the same Google Analytics property. - POSTReturns multiple reports in a batch
/v1beta/:property:batchRunReportsReturns multiple reports in a batch. All reports must be for the same Google Analytics property. - POSTThis compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility
/v1beta/:property:checkCompatibilityThis compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's… - POSTReturns a customized pivot report of your Google Analytics event data
/v1beta/:property:runPivotReportReturns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot… - POSTReturns a customized report of realtime event data for your property
/v1beta/:property:runRealtimeReportReturns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google… - POSTReturns a customized report of your Google Analytics event data
/v1beta/:property:runReportReturns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code.…
properties.audienceExports
- GETGets configuration metadata about a specific audience export
/v1beta/:nameGets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See Creating… - GETLists all audience exports for a property
/v1beta/:parent/audienceExports?pageSize=0&pageToken=stringLists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new… - POSTCreates an audience export for later retrieval
/v1beta/:parent/audienceExportsCreates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous… - POSTRetrieves an audience export of users
/v1beta/:name:queryRetrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to…
API details
- Base URL
https://analyticsdata.googleapis.com- Authentication
- OAuth 2.0 (authorization code flow) with 2 scopes
An API key in the key query parameter - Operations
- 10 operations on 9 pathsPOST 8GET 2
- Main resources
- properties 6properties.audienceExports 4
- Response formats
application/json- Description format
- Google API Discovery, API version
v1beta - Links
- Documentation · OpenAPI document
- Listed from
- Google API Discovery document (googleapis/discovery-artifact-manager) (Apache-2.0)
How to test the Google Analytics Data API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Google Analytics Data API collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 2 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Returns multiple pivot reports in a batch” (POST /v1beta/:property:batchRunPivotReports), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Google Analytics Data API?
Accesses report data in Google Analytics. Warning: Creating multiple Customer Applications, Accounts, or Projects to simulate or act as a single Customer… It is listed under Data & analytics and has 10 endpoints.
Who publishes the Google Analytics Data API?
It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Google Analytics Data API?
Requests go to https://analyticsdata.googleapis.com. Endpoint paths are added to this base URL.
How do I authenticate with the Google Analytics Data API?
It accepts 2 methods: OAuth 2.0 (authorization code flow) with 2 scopes; an API key in the key query parameter.
How many endpoints does the Google Analytics Data API have?
10 operations on 9 paths (8 POST, 2 GET). The largest groups are properties, properties.audienceExports.
Is forking the Google Analytics Data API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.