Skip to content

Google Analytics API API

by googleapis.com

OAuthHTTPSAnalytics
Open documentation ↗

Overview

Views and manages your Google Analytics data.

Google Analytics API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 88 endpoints.

At a glance

Authentication
OAuth
HTTPS
Yes
CORS
Unknown
Category
Analytics
Base URL
https://analytics.googleapis.com/analytics/v3
Version
v3
Endpoints
88
Spec updated
2021-04-07

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://analytics.googleapis.com/analytics/v3/data/ga" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://analytics.googleapis.com/analytics/v3/data/ga", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://analytics.googleapis.com/analytics/v3/data/ga",
    headers={
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/data/gaReturns Analytics data for a view (profile).
GET/data/mcfReturns Analytics Multi-Channel Funnels data for a view (profile).
GET/data/realtimeReturns real time data for a view (profile).
GET/management/accountSummariesLists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access.
GET/management/accountsLists all accounts to which the user has access.
GET/management/accounts/{accountId}/entityUserLinksLists account-user links for a given account.
POST/management/accounts/{accountId}/entityUserLinksAdds a new user to the given account.
PUT/management/accounts/{accountId}/entityUserLinks/{linkId}Updates permissions for an existing user on the given account.
DELETE/management/accounts/{accountId}/entityUserLinks/{linkId}Removes a user from the given account.
GET/management/accounts/{accountId}/filtersLists all filters for an account
POST/management/accounts/{accountId}/filtersCreate a new filter.
GET/management/accounts/{accountId}/filters/{filterId}Returns filters to which the user has access.
PUT/management/accounts/{accountId}/filters/{filterId}Updates an existing filter.
PATCH/management/accounts/{accountId}/filters/{filterId}Updates an existing filter. This method supports patch semantics.
DELETE/management/accounts/{accountId}/filters/{filterId}Delete a filter.
GET/management/accounts/{accountId}/webpropertiesLists web properties to which the user has access.
POST/management/accounts/{accountId}/webpropertiesCreate a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one p
GET/management/accounts/{accountId}/webproperties/{webPropertyId}Gets a web property to which the user has access.
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}Updates an existing web property.
PATCH/management/accounts/{accountId}/webproperties/{webPropertyId}Updates an existing web property. This method supports patch semantics.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSourcesList custom data sources to which the user has access.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadDataDelete data associated with a previous upload.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploadsList uploads to which the user has access.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploadsUpload data for a custom data source.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}List uploads to which the user has access.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensionsLists custom dimensions to which the user has access.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensionsCreate a new custom dimension.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}Get a custom dimension to which the user has access.
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}Updates an existing custom dimension.
PATCH/management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}Updates an existing custom dimension. This method supports patch semantics.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/customMetricsLists custom metrics to which the user has access.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/customMetricsCreate a new custom metric.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}Get a custom metric to which the user has access.
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}Updates an existing custom metric.
PATCH/management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}Updates an existing custom metric. This method supports patch semantics.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinksLists webProperty-Google Ads links for a given web property.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinksCreates a webProperty-Google Ads link.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}Returns a web property-Google Ads link to which the user has access.
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}Updates an existing webProperty-Google Ads link.
PATCH/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}Updates an existing webProperty-Google Ads link. This method supports patch semantics.
DELETE/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}Deletes a web property-Google Ads link.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinksLists webProperty-user links for a given web property.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinksAdds a new user to the given web property.
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}Updates permissions for an existing user on the given web property.
DELETE/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}Removes a user from the given web property.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profilesLists views (profiles) to which the user has access.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/profilesCreate a new view (profile).
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}Gets a view (profile) to which the user has access.
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}Updates an existing view (profile).
PATCH/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}Updates an existing view (profile). This method supports patch semantics.
DELETE/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}Deletes a view (profile).
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinksLists profile-user links for a given view (profile).
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinksAdds a new user to the given view (profile).
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}Updates permissions for an existing user on the given view (profile).
DELETE/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}Removes a user from the given view (profile).
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experimentsLists experiments to which the user has access.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experimentsCreate a new experiment.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}Returns an experiment to which the user has access.
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}Update an existing experiment.
PATCH/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}Update an existing experiment. This method supports patch semantics.
DELETE/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}Delete an experiment.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goalsLists goals to which the user has access.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goalsCreate a new goal.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}Gets a goal to which the user has access.
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}Updates an existing goal.
PATCH/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}Updates an existing goal. This method supports patch semantics.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinksLists all profile filter links for a profile.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinksCreate a new profile filter link.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}Returns a single profile filter link.
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}Update an existing profile filter link.
PATCH/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}Update an existing profile filter link. This method supports patch semantics.
DELETE/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}Delete a profile filter link.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReportsLists unsampled reports to which the user has access.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReportsCreate a new unsampled report.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}Returns a single unsampled report.
DELETE/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}Deletes an unsampled report.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiencesLists remarketing audiences to which the user has access.
POST/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiencesCreates a new remarketing audience.
GET/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}Gets a remarketing audience to which the user has access.
PUT/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}Updates an existing remarketing audience.
PATCH/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}Updates an existing remarketing audience. This method supports patch semantics.
DELETE/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}Delete a remarketing audience.
POST/management/clientId:hashClientIdHashes the given Client ID.
GET/management/segmentsLists segments to which the user has access.
GET/metadata/{reportType}/columnsLists all columns for a report type
POST/provisioning/createAccountTicketCreates an account ticket.
POST/provisioning/createAccountTreeProvision account.
POST/userDeletion/userDeletionRequests:upsertInsert or update a user deletion requests.

Questions

Does the Google Analytics API API need an API key?

Yes. The Google Analytics API API uses OAuth authentication; the documentation explains how to get credentials.

Does the Google Analytics API API support HTTPS?

Yes, the Google Analytics API API is served over HTTPS.

How many endpoints does the Google Analytics API API have?

Its OpenAPI description lists 88 endpoints in version v3. All of them are shown on this page.

What are alternatives to the Google Analytics API API?

Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.

Compare alternatives →

Google Play Integrity API

Analytics

The Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.

OAuth1 endpoints

versionhistory.googleapis.com API

Analytics

Version History API - Prod

No auth4 endpoints

Doc Converter

Analytics

This api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)

No auth1 endpoints

Perspective Comment Analyzer API

Analytics

The Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.

OAuth2 endpoints

Safe Browsing API

Analytics

Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.

No auth7 endpoints

Web Fonts Developer API

Analytics

The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.

No auth1 endpoints

Listed from APIs.guru (CC0).