google-analytics-data
Google Analytics Data API client library
What it is and what it does
google-analytics-data is the official Python client for Google's Analytics Data API, enabling programmatic access to report data from Google Analytics properties. It wraps the underlying gRPC API with a Pythonic interface, handling authentication, serialization, and request/response marshaling through dependencies on google-api-core, google-auth, and protobuf.
Developers use it to build applications that query analytics metrics and dimensions, automate reporting workflows, or integrate analytics data into dashboards and business intelligence systems. The library requires a Google Cloud project with the Analytics Data API enabled and proper authentication credentials; it supports Python 3.10 and later versions.
Use it for:
- Automate daily or weekly analytics report generation and delivery to stakeholders without manual GA interface access.
- Build custom dashboards that pull real-time or historical analytics data and combine it with other business metrics.
- Extract analytics data for specific date ranges, segments, or properties to feed into data warehouses or analysis pipelines.
- Programmatically monitor key performance indicators and trigger alerts when metrics cross defined thresholds.
- Integrate analytics insights into internal tools, CRM systems, or marketing automation platforms.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library for querying Google Analytics Data API to retrieve report data from Google Analytics properties.
Yes. This is the official, actively maintained client for Google Analytics Data API with low install friction, permissive licensing, no known vulnerabilities, and broad Python version support (3.10+). Install it if you need to query Google Analytics data programmatically; it is the standard choice for this task. Prerequisite: Google Cloud project setup and authentication configuration.
Install
google-analytics-data on PyPI
pip
pip install google-analytics-datauv
uv add google-analytics-datapoetry
poetry add google-analytics-dataInstalling google-analytics-data
Before you install
Low friction installation with a pure Python wheel. Actively maintained with recent releases; last commit 2026-08-14. Requires Python >= 3.10 and depends on standard Google Cloud libraries (google-api-core, google-auth, grpcio, proto-plus, protobuf).
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions; attribution required.
Quickstart
pip install google-analytics-data
from google.analytics.data_v1beta import BetaAnalyticsDataClient
from google.analytics.data_v1beta.types import RunReportRequest
client = BetaAnalyticsDataClient()
request = RunReportRequest(property="properties/YOUR_PROPERTY_ID")
response = client.run_report(request)
Requires Google Cloud project setup with Google Analytics Data API enabled, authentication credentials configured, and Python >= 3.10.
Verify before relying
- Whether the library supports all current Google Analytics Data API features or a subset thereof.
- Performance characteristics when querying large datasets or high-frequency report generation.
- Whether additional setup beyond standard gcloud authentication is required for specific use cases.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — google-api-core, google-auth, grpcio, proto-plus, protobuf |
| Maintenance | actively maintained — 72 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,781,790/month — #1,849 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: google_analytics_data-0.23.0-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
google-analytics-adminPython client library for the Google Analytics…
permissive · top 1,000 on PyPI
google-cloud-geminidataanalyticsPython client library for Google Cloud's Data…
permissive · top 15,000 on PyPI
universal-analytics-python3Sends event and pageview data to Google…
permissive · top 15,000 on PyPI
owslibOWSLib provides Python client access to Open…
permissive · top 15,000 on PyPI
google-maps-placesPython client library for Google Maps Places…
permissive · top 15,000 on PyPI
google-ads-admanagerPython client library for Google Ad Manager…
permissive · top 15,000 on PyPI
google-cloud-monitoringPython client library for Google Cloud…
permissive · top 1,000 on PyPI
google-shopping-typeProvides Python type definitions and client…
permissive · top 15,000 on PyPI
google-cloud-billingProgrammatic access to Google Cloud Platform…
permissive · top 15,000 on PyPI
google-cloud-bigquery-loggingPython client library for Google Cloud BigQuery…
permissive · top 15,000 on PyPI