google-cloud-retail
Google Cloud Retail API client library
What it is and what it does
This package is the official Python client library for Google Cloud Retail API, part of Vertex AI Search for commerce. It wraps the gRPC-based Retail API to let you call search, browse, and recommendation services from Python code. The library handles authentication, serialization, and network communication with Google's managed retail service.
You use it to integrate personalized product discovery into e-commerce applications—search results ranked by ML models, category browsing with recommendations, and personalized suggestions based on user behavior. It requires an active Google Cloud project with the Retail API enabled and proper authentication credentials; all actual computation and model serving happens on Google's infrastructure, not locally.
Use it for:
- Build a personalized product search endpoint for an e-commerce website using ML-ranked results from Google's Retail API.
- Implement category browse pages with AI-driven product recommendations tailored to individual users.
- Log user interactions (clicks, purchases, views) to the Retail API to improve recommendation models over time.
- Integrate product discovery into a mobile app with search and recommendation features powered by Google's retail ML models.
- Migrate an existing search system to Google Cloud Retail to leverage pre-trained recommendation and ranking models.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings to Google Cloud Retail API for implementing personalized search, browse, and recommendation features powered by machine learning models.
Yes. This is an official, actively maintained Google Cloud client library for a managed service. Install it if you are building on Google Cloud Retail or Vertex AI Search for commerce. The low install friction, permissive license, current Python version support (3.10+), and zero known vulnerabilities make it a safe choice. The main constraint is that it requires Google Cloud project setup and API enablement—it is not a standalone library.
Install
google-cloud-retail on PyPI
pip
pip install google-cloud-retailuv
uv add google-cloud-retailpoetry
poetry add google-cloud-retailInstalling google-cloud-retail
Before you install
Low friction installation with a pure-Python wheel. Actively maintained as of 2026-06-22 with recent activity; depends on standard Google Cloud libraries (google-api-core, google-auth, grpcio, proto-plus, protobuf) that are widely used and stable.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install google-cloud-retail
from google.cloud import retail_v2
client = retail_v2.SearchServiceClient()
# Configure credentials via GOOGLE_APPLICATION_CREDENTIALS or Application Default Credentials
Requires Python >= 3.10. Requires Google Cloud project setup, billing enabled, Vertex AI Search for commerce API enabled, and authentication credentials (typically via GOOGLE_APPLICATION_CREDENTIALS environment variable or Application Default Credentials).
Verify before relying
- Whether the package supports async/await patterns for high-concurrency use cases
- Performance characteristics and rate limits for production search and recommendation workloads
- Whether offline or local deployment modes are supported beyond cloud-hosted API calls
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 — 53 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 233,854/month — #9,032 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: google_cloud_retail-2.11.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-cloud-recommendations-aiPython client library for Google Cloud…
permissive · top 5,000 on PyPI
google-cloud-recommenderPython client library for Google Cloud…
permissive · top 15,000 on PyPI
google-cloud-workflowsPython client library for Google Cloud…
permissive · top 1,000 on PyPI
google-cloud-notebooksProvides a Python client to manage notebook…
permissive · top 15,000 on PyPI
google-cloud-billingProgrammatic access to Google Cloud Platform…
permissive · top 15,000 on PyPI
google-cloud-discoveryenginePython client library for Google Cloud…
permissive · top 5,000 on PyPI
google-cloud-dlpPython client library for Google Cloud's…
permissive · top 1,000 on PyPI
google-shopping-typeProvides Python type definitions and client…
permissive · top 15,000 on PyPI
google-cloud-monitoringPython client library for Google Cloud…
permissive · top 1,000 on PyPI
google-cloud-vectorsearchPython client library for Google Cloud Vector…
permissive · top 5,000 on PyPI