## Google

All functionality related to [Google Cloud Platform](https://cloud.google.com/) and other `Google` products.

## LLMs[​](#llms "Direct link to LLMs")

We recommend individual developers to start with Gemini API (`langchain-google-genai`) and move to Vertex AI (`langchain-google-vertexai`) when they need access to commercial support and higher rate limits. If you’re already Cloud-friendly or Cloud-native, then you can get started in Vertex AI straight away. Please, find more information [here](https://ai.google.dev/gemini-api/docs/migrate-to-cloud).

### Google Generative AI[​](#google-generative-ai "Direct link to Google Generative AI")

Access GoogleAI `Gemini` models such as `gemini-pro` and `gemini-pro-vision` through the `GoogleGenerativeAI` class.

Install python package.

```
pip install langchain-google-genai
```

See a [usage example](https://python.langchain.com/docs/integrations/llms/google_ai/).

```
from langchain_google_genai import GoogleGenerativeAI
```

### Vertex AI Model Garden[​](#vertex-ai-model-garden "Direct link to Vertex AI Model Garden")

Access `PaLM` and hundreds of OSS models via `Vertex AI Model Garden` service.

We need to install `langchain-google-vertexai` python package.

```
pip install langchain-google-vertexai
```

See a [usage example](https://python.langchain.com/docs/integrations/llms/google_vertex_ai_palm/#vertex-model-garden).

```
from langchain_google_vertexai import VertexAIModelGarden
```

## Chat models[​](#chat-models "Direct link to Chat models")

### Google Generative AI[​](#google-generative-ai-1 "Direct link to Google Generative AI")

Access GoogleAI `Gemini` models such as `gemini-pro` and `gemini-pro-vision` through the `ChatGoogleGenerativeAI` class.

```
pip install -U langchain-google-genai
```

Configure your API key.

```
export GOOGLE_API_KEY=your-api-key
```

```
from langchain_google_genai import ChatGoogleGenerativeAIllm = ChatGoogleGenerativeAI(model="gemini-pro")llm.invoke("Sing a ballad of LangChain.")
```

Gemini vision model supports image inputs when providing a single chat message.

```
from langchain_core.messages import HumanMessagefrom langchain_google_genai import ChatGoogleGenerativeAIllm = ChatGoogleGenerativeAI(model="gemini-pro-vision")message = HumanMessage(    content=[        {            "type": "text",            "text": "What's in this image?",        },  # You can optionally provide text parts        {"type": "image_url", "image_url": "https://picsum.photos/seed/picsum/200/300"},    ])llm.invoke([message])
```

The value of image\_url can be any of the following:

*   A public image URL
*   A gcs file (e.g., "gcs://path/to/file.png")
*   A local file path
*   A base64 encoded image (e.g., data:image/png;base64,abcd124)
*   A PIL image

### Vertex AI[​](#vertex-ai "Direct link to Vertex AI")

Access PaLM chat models like `chat-bison` and `codechat-bison` via Google Cloud.

We need to install `langchain-google-vertexai` python package.

```
pip install langchain-google-vertexai
```

See a [usage example](https://python.langchain.com/docs/integrations/chat/google_vertex_ai_palm/).

```
from langchain_google_vertexai import ChatVertexAI
```

## Embedding models[​](#embedding-models "Direct link to Embedding models")

### Google Generative AI Embeddings[​](#google-generative-ai-embeddings "Direct link to Google Generative AI Embeddings")

See a [usage example](https://python.langchain.com/docs/integrations/text_embedding/google_generative_ai/).

```
pip install -U langchain-google-genai
```

Configure your API key.

```
export GOOGLE_API_KEY=your-api-key
```

```
from langchain_google_genai import GoogleGenerativeAIEmbeddings
```

### Vertex AI[​](#vertex-ai-1 "Direct link to Vertex AI")

We need to install `langchain-google-vertexai` python package.

```
pip install langchain-google-vertexai
```

See a [usage example](https://python.langchain.com/docs/integrations/text_embedding/google_vertex_ai_palm/).

```
from langchain_google_vertexai import VertexAIEmbeddings
```

## Document Loaders[​](#document-loaders "Direct link to Document Loaders")

### AlloyDB for PostgreSQL[​](#alloydb-for-postgresql "Direct link to AlloyDB for PostgreSQL")

> [Google Cloud AlloyDB](https://cloud.google.com/alloydb) is a fully managed relational database service that offers high performance, seamless integration, and impressive scalability on Google Cloud. AlloyDB is 100% compatible with PostgreSQL.

Install the python package:

```
pip install langchain-google-alloydb-pg
```

See [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_alloydb/).

```
from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBLoader
```

### BigQuery[​](#bigquery "Direct link to BigQuery")

> [Google Cloud BigQuery](https://cloud.google.com/bigquery) is a serverless and cost-effective enterprise data warehouse that works across clouds and scales with your data in Google Cloud.

We need to install `google-cloud-bigquery` python package.

```
pip install google-cloud-bigquery
```

See a [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_bigquery/).

```
from langchain_community.document_loaders import BigQueryLoader
```

### Bigtable[​](#bigtable "Direct link to Bigtable")

> [Google Cloud Bigtable](https://cloud.google.com/bigtable/docs) is Google's fully managed NoSQL Big Data database service in Google Cloud. Install the python package:

```
pip install langchain-google-bigtable
```

See [Googel Cloud usage example](https://python.langchain.com/docs/integrations/document_loaders/google_bigtable/).

```
from langchain_google_bigtable import BigtableLoader
```

### Cloud SQL for MySQL[​](#cloud-sql-for-mysql "Direct link to Cloud SQL for MySQL")

> [Google Cloud SQL for MySQL](https://cloud.google.com/sql) is a fully-managed database service that helps you set up, maintain, manage, and administer your MySQL relational databases on Google Cloud. Install the python package:

```
pip install langchain-google-cloud-sql-mysql
```

See [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_cloud_sql_mysql/).

```
from langchain_google_cloud_sql_mysql import MySQLEngine, MySQLDocumentLoader
```

### Cloud SQL for SQL Server[​](#cloud-sql-for-sql-server "Direct link to Cloud SQL for SQL Server")

> [Google Cloud SQL for SQL Server](https://cloud.google.com/sql) is a fully-managed database service that helps you set up, maintain, manage, and administer your SQL Server databases on Google Cloud. Install the python package:

```
pip install langchain-google-cloud-sql-mssql
```

See [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_cloud_sql_mssql/).

```
from langchain_google_cloud_sql_mssql import MSSQLEngine, MSSQLLoader
```

### Cloud SQL for PostgreSQL[​](#cloud-sql-for-postgresql "Direct link to Cloud SQL for PostgreSQL")

> [Google Cloud SQL for PostgreSQL](https://cloud.google.com/sql) is a fully-managed database service that helps you set up, maintain, manage, and administer your PostgreSQL relational databases on Google Cloud. Install the python package:

```
pip install langchain-google-cloud-sql-pg
```

See [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_cloud_sql_pg/).

```
from langchain_google_cloud_sql_pg import PostgresEngine, PostgresLoader
```

### Cloud Storage[​](#cloud-storage "Direct link to Cloud Storage")

> [Cloud Storage](https://en.wikipedia.org/wiki/Google_Cloud_Storage) is a managed service for storing unstructured data in Google Cloud.

We need to install `google-cloud-storage` python package.

```
pip install google-cloud-storage
```

There are two loaders for the `Google Cloud Storage`: the `Directory` and the `File` loaders.

See a [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_cloud_storage_directory/).

```
from langchain_community.document_loaders import GCSDirectoryLoader
```

See a [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_cloud_storage_file/).

```
from langchain_community.document_loaders import GCSFileLoader
```

### El Carro for Oracle Workloads[​](#el-carro-for-oracle-workloads "Direct link to El Carro for Oracle Workloads")

> Google [El Carro Oracle Operator](https://github.com/GoogleCloudPlatform/elcarro-oracle-operator) offers a way to run Oracle databases in Kubernetes as a portable, open source, community driven, no vendor lock-in container orchestration system.

```
pip install langchain-google-el-carro
```

See [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_el_carro/).

```
from langchain_google_el_carro import ElCarroLoader
```

### Google Drive[​](#google-drive "Direct link to Google Drive")

> [Google Drive](https://en.wikipedia.org/wiki/Google_Drive) is a file storage and synchronization service developed by Google.

Currently, only `Google Docs` are supported.

We need to install several python packages.

```
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/document_loaders/google_drive/).

```
from langchain_community.document_loaders import GoogleDriveLoader
```

### Firestore (Native Mode)[​](#firestore-native-mode "Direct link to Firestore (Native Mode)")

> [Google Cloud Firestore](https://cloud.google.com/firestore/docs/) is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Install the python package:

```
pip install langchain-google-firestore
```

See [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_firestore/).

```
from langchain_google_firestore import FirestoreLoader
```

### Firestore (Datastore Mode)[​](#firestore-datastore-mode "Direct link to Firestore (Datastore Mode)")

> [Google Cloud Firestore in Datastore mode](https://cloud.google.com/datastore/docs) is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Firestore is the newest version of Datastore and introduces several improvements over Datastore. Install the python package:

```
pip install langchain-google-datastore
```

See [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_datastore/).

```
from langchain_google_datastore import DatastoreLoader
```

### Memorystore for Redis[​](#memorystore-for-redis "Direct link to Memorystore for Redis")

> [Google Cloud Memorystore for Redis](https://cloud.google.com/memorystore/docs/redis) is a fully managed Redis service for Google Cloud. Applications running on Google Cloud can achieve extreme performance by leveraging the highly scalable, available, secure Redis service without the burden of managing complex Redis deployments. Install the python package:

```
pip install langchain-google-memorystore-redis
```

See [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_memorystore_redis/).

```
from langchain_google_memorystore_redis import MemorystoreLoader
```

### Spanner[​](#spanner "Direct link to Spanner")

> [Google Cloud Spanner](https://cloud.google.com/spanner/docs) is a fully managed, mission-critical, relational database service on Google Cloud that offers transactional consistency at global scale, automatic, synchronous replication for high availability, and support for two SQL dialects: GoogleSQL (ANSI 2011 with extensions) and PostgreSQL. Install the python package:

```
pip install langchain-google-spanner
```

See [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_spanner/).

```
from langchain_google_spanner import SpannerLoader
```

### Speech-to-Text[​](#speech-to-text "Direct link to Speech-to-Text")

> [Google Cloud Speech-to-Text](https://cloud.google.com/speech-to-text) is an audio transcription API powered by Google's speech recognition models in Google Cloud.

This document loader transcribes audio files and outputs the text results as Documents.

First, we need to install the python package.

```
pip install google-cloud-speech
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/document_loaders/google_speech_to_text/).

```
from langchain_community.document_loaders import GoogleSpeechToTextLoader
```

## Document Transformers[​](#document-transformers "Direct link to Document Transformers")

### Document AI[​](#document-ai "Direct link to Document AI")

> [Google Cloud Document AI](https://cloud.google.com/document-ai/docs/overview) is a Google Cloud service that transforms unstructured data from documents into structured data, making it easier to understand, analyze, and consume.

We need to set up a [`GCS` bucket and create your own OCR processor](https://cloud.google.com/document-ai/docs/create-processor) The `GCS_OUTPUT_PATH` should be a path to a folder on GCS (starting with `gs://`) and a processor name should look like `projects/PROJECT_NUMBER/locations/LOCATION/processors/PROCESSOR_ID`. We can get it either programmatically or copy from the `Prediction endpoint` section of the `Processor details` tab in the Google Cloud Console.

```
pip install google-cloud-documentaipip install google-cloud-documentai-toolbox
```

See a [usage example](https://python.langchain.com/docs/integrations/document_transformers/google_docai/).

```
from langchain_community.document_loaders.blob_loaders import Blobfrom langchain_community.document_loaders.parsers import DocAIParser
```

### Google Translate[​](#google-translate "Direct link to Google Translate")

> [Google Translate](https://translate.google.com/) is a multilingual neural machine translation service developed by Google to translate text, documents and websites from one language into another.

The `GoogleTranslateTransformer` allows you to translate text and HTML with the [Google Cloud Translation API](https://cloud.google.com/translate).

To use it, you should have the `google-cloud-translate` python package installed, and a Google Cloud project with the [Translation API enabled](https://cloud.google.com/translate/docs/setup). This transformer uses the [Advanced edition (v3)](https://cloud.google.com/translate/docs/intro-to-v3).

First, we need to install the python package.

```
pip install google-cloud-translate
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/document_transformers/google_translate/).

```
from langchain_community.document_transformers import GoogleTranslateTransformer
```

## Vector Stores[​](#vector-stores "Direct link to Vector Stores")

### AlloyDB for PostgreSQL[​](#alloydb-for-postgresql-1 "Direct link to AlloyDB for PostgreSQL")

> [Google Cloud AlloyDB](https://cloud.google.com/alloydb) is a fully managed relational database service that offers high performance, seamless integration, and impressive scalability on Google Cloud. AlloyDB is 100% compatible with PostgreSQL.

Install the python package:

```
pip install langchain-google-alloydb-pg
```

See [usage example](https://python.langchain.com/docs/integrations/vectorstores/google_alloydb/).

```
from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore
```

### BigQuery Vector Search[​](#bigquery-vector-search "Direct link to BigQuery Vector Search")

> [Google Cloud BigQuery](https://cloud.google.com/bigquery), BigQuery is a serverless and cost-effective enterprise data warehouse in Google Cloud.
> 
> [Google Cloud BigQuery Vector Search](https://cloud.google.com/bigquery/docs/vector-search-intro) BigQuery vector search lets you use GoogleSQL to do semantic search, using vector indexes for fast but approximate results, or using brute force for exact results.

> It can calculate Euclidean or Cosine distance. With LangChain, we default to use Euclidean distance.

We need to install several python packages.

```
pip install google-cloud-bigquery
```

See a [usage example](https://python.langchain.com/docs/integrations/vectorstores/google_bigquery_vector_search/).

```
from langchain.vectorstores import BigQueryVectorSearch
```

### Memorystore for Redis[​](#memorystore-for-redis-1 "Direct link to Memorystore for Redis")

> [Google Cloud Memorystore for Redis](https://cloud.google.com/memorystore/docs/redis) is a fully managed Redis service for Google Cloud. Applications running on Google Cloud can achieve extreme performance by leveraging the highly scalable, available, secure Redis service without the burden of managing complex Redis deployments. Install the python package:

```
pip install langchain-google-memorystore-redis
```

See [usage example](https://python.langchain.com/docs/integrations/vectorstores/google_memorystore_redis/).

```
from langchain_google_memorystore_redis import RedisVectorStore
```

### Spanner[​](#spanner-1 "Direct link to Spanner")

> [Google Cloud Spanner](https://cloud.google.com/spanner/docs) is a fully managed, mission-critical, relational database service on Google Cloud that offers transactional consistency at global scale, automatic, synchronous replication for high availability, and support for two SQL dialects: GoogleSQL (ANSI 2011 with extensions) and PostgreSQL. Install the python package:

```
pip install langchain-google-spanner
```

See [usage example](https://python.langchain.com/docs/integrations/vectorstores/google_spanner/).

```
from langchain_google_spanner import SpannerVectorStore
```

### Firestore (Native Mode)[​](#firestore-native-mode-1 "Direct link to Firestore (Native Mode)")

> [Google Cloud Firestore](https://cloud.google.com/firestore/docs/) is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Install the python package:

```
pip install langchain-google-firestore
```

See [usage example](https://python.langchain.com/docs/integrations/vectorstores/google_firestore/).

```
from langchain_google_firestore import FirestoreVectorstore
```

### Cloud SQL for MySQL[​](#cloud-sql-for-mysql-1 "Direct link to Cloud SQL for MySQL")

> [Google Cloud SQL for MySQL](https://cloud.google.com/sql) is a fully-managed database service that helps you set up, maintain, manage, and administer your MySQL relational databases on Google Cloud. Install the python package:

```
pip install langchain-google-cloud-sql-mysql
```

See [usage example](https://python.langchain.com/docs/integrations/vectorstores/google_cloud_sql_mysql/).

```
from langchain_google_cloud_sql_mysql import MySQLEngine, MySQLVectorStore
```

### Cloud SQL for PostgreSQL[​](#cloud-sql-for-postgresql-1 "Direct link to Cloud SQL for PostgreSQL")

> [Google Cloud SQL for PostgreSQL](https://cloud.google.com/sql) is a fully-managed database service that helps you set up, maintain, manage, and administer your PostgreSQL relational databases on Google Cloud. Install the python package:

```
pip install langchain-google-cloud-sql-pg
```

See [usage example](https://python.langchain.com/docs/integrations/vectorstores/google_cloud_sql_pg/).

```
from langchain_google_cloud_sql_pg import PostgresEngine, PostgresVectorStore
```

### Vertex AI Vector Search[​](#vertex-ai-vector-search "Direct link to Vertex AI Vector Search")

> [Google Cloud Vertex AI Vector Search](https://cloud.google.com/vertex-ai/docs/vector-search/overview) from Google Cloud, formerly known as `Vertex AI Matching Engine`, provides the industry's leading high-scale low latency vector database. These vector databases are commonly referred to as vector similarity-matching or an approximate nearest neighbor (ANN) service.

Install the python package:

```
pip install langchain-google-vertexai
```

See a [usage example](https://python.langchain.com/docs/integrations/vectorstores/google_vertex_ai_vector_search/).

```
from langchain_google_vertexai import VectorSearchVectorStore
```

### ScaNN[​](#scann "Direct link to ScaNN")

> [Google ScaNN](https://github.com/google-research/google-research/tree/master/scann) (Scalable Nearest Neighbors) is a python package.
> 
> `ScaNN` is a method for efficient vector similarity search at scale.

> `ScaNN` includes search space pruning and quantization for Maximum Inner Product Search and also supports other distance functions such as Euclidean distance. The implementation is optimized for x86 processors with AVX2 support. See its [Google Research github](https://github.com/google-research/google-research/tree/master/scann) for more details.

We need to install `scann` python package.

See a [usage example](https://python.langchain.com/docs/integrations/vectorstores/scann/).

```
from langchain_community.vectorstores import ScaNN
```

## Retrievers[​](#retrievers "Direct link to Retrievers")

### Google Drive[​](#google-drive-1 "Direct link to Google Drive")

We need to install several python packages.

```
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/retrievers/google_drive/).

```
from langchain_googledrive.retrievers import GoogleDriveRetriever
```

### Vertex AI Search[​](#vertex-ai-search "Direct link to Vertex AI Search")

> [Vertex AI Search](https://cloud.google.com/generative-ai-app-builder/docs/introduction) from Google Cloud allows developers to quickly build generative AI powered search engines for customers and employees.

We need to install the `google-cloud-discoveryengine` python package.

```
pip install google-cloud-discoveryengine
```

See a [usage example](https://python.langchain.com/docs/integrations/retrievers/google_vertex_ai_search/).

```
from langchain.retrievers import GoogleVertexAISearchRetriever
```

### Document AI Warehouse[​](#document-ai-warehouse "Direct link to Document AI Warehouse")

> [Document AI Warehouse](https://cloud.google.com/document-ai-warehouse) from Google Cloud allows enterprises to search, store, govern, and manage documents and their AI-extracted data and metadata in a single platform.

```
from langchain.retrievers import GoogleDocumentAIWarehouseRetrieverdocai_wh_retriever = GoogleDocumentAIWarehouseRetriever(    project_number=...)query = ...documents = docai_wh_retriever.get_relevant_documents(    query, user_ldap=...)
```

### Text-to-Speech[​](#text-to-speech "Direct link to Text-to-Speech")

> [Google Cloud Text-to-Speech](https://cloud.google.com/text-to-speech) is a Google Cloud service that enables developers to synthesize natural-sounding speech with 100+ voices, available in multiple languages and variants. It applies DeepMind’s groundbreaking research in WaveNet and Google’s powerful neural networks to deliver the highest fidelity possible.

We need to install a python package.

```
pip install google-cloud-text-to-speech
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/tools/google_cloud_texttospeech/).

```
from langchain.tools import GoogleCloudTextToSpeechTool
```

### Google Drive[​](#google-drive-2 "Direct link to Google Drive")

We need to install several python packages.

```
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/tools/google_drive/).

```
from langchain_community.utilities.google_drive import GoogleDriveAPIWrapperfrom langchain_community.tools.google_drive.tool import GoogleDriveSearchTool
```

### Google Finance[​](#google-finance "Direct link to Google Finance")

We need to install a python package.

```
pip install google-search-results
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/tools/google_finance/).

```
from langchain_community.tools.google_finance import GoogleFinanceQueryRunfrom langchain_community.utilities.google_finance import GoogleFinanceAPIWrapper
```

### Google Jobs[​](#google-jobs "Direct link to Google Jobs")

We need to install a python package.

```
pip install google-search-results
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/tools/google_jobs/).

```
from langchain_community.tools.google_jobs import GoogleJobsQueryRunfrom langchain_community.utilities.google_finance import GoogleFinanceAPIWrapper
```

### Google Lens[​](#google-lens "Direct link to Google Lens")

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/tools/google_lens/).

```
from langchain_community.tools.google_lens import GoogleLensQueryRunfrom langchain_community.utilities.google_lens import GoogleLensAPIWrapper
```

### Google Places[​](#google-places "Direct link to Google Places")

We need to install a python package.

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/tools/google_places/).

```
from langchain.tools import GooglePlacesTool
```

### Google Scholar[​](#google-scholar "Direct link to Google Scholar")

We need to install a python package.

```
pip install google-search-results
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/tools/google_scholar/).

```
from langchain_community.tools.google_scholar import GoogleScholarQueryRunfrom langchain_community.utilities.google_scholar import GoogleScholarAPIWrapper
```

### Google Search[​](#google-search "Direct link to Google Search")

*   Set up a Custom Search Engine, following [these instructions](https://stackoverflow.com/questions/37083058/programmatically-searching-google-in-python-using-custom-search)
*   Get an API Key and Custom Search Engine ID from the previous step, and set them as environment variables `GOOGLE_API_KEY` and `GOOGLE_CSE_ID` respectively.

```
from langchain_community.utilities import GoogleSearchAPIWrapper
```

For a more detailed walkthrough of this wrapper, see [this notebook](https://python.langchain.com/docs/integrations/tools/google_search/).

We can easily load this wrapper as a Tool (to use with an Agent). We can do this with:

```
from langchain.agents import load_toolstools = load_tools(["google-search"])
```

### Google Trends[​](#google-trends "Direct link to Google Trends")

We need to install a python package.

```
pip install google-search-results
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/tools/google_trends/).

```
from langchain_community.tools.google_trends import GoogleTrendsQueryRunfrom langchain_community.utilities.google_trends import GoogleTrendsAPIWrapper
```

### GMail[​](#gmail "Direct link to GMail")

> [Google Gmail](https://en.wikipedia.org/wiki/Gmail) is a free email service provided by Google. This toolkit works with emails through the `Gmail API`.

We need to install several python packages.

```
pip install google-api-python-client google-auth-oauthlib google-auth-httplib2
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/toolkits/gmail/).

```
from langchain_community.agent_toolkits import GmailToolkit
```

## Memory[​](#memory "Direct link to Memory")

### AlloyDB for PostgreSQL[​](#alloydb-for-postgresql-2 "Direct link to AlloyDB for PostgreSQL")

> [AlloyDB for PostgreSQL](https://cloud.google.com/alloydb) is a fully managed relational database service that offers high performance, seamless integration, and impressive scalability on Google Cloud. AlloyDB is 100% compatible with PostgreSQL.

Install the python package:

```
pip install langchain-google-alloydb-pg
```

See [usage example](https://python.langchain.com/docs/integrations/memory/google_alloydb/).

```
from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBChatMessageHistory
```

### Cloud SQL for PostgreSQL[​](#cloud-sql-for-postgresql-2 "Direct link to Cloud SQL for PostgreSQL")

> [Cloud SQL for PostgreSQL](https://cloud.google.com/sql) is a fully-managed database service that helps you set up, maintain, manage, and administer your PostgreSQL relational databases on Google Cloud. Install the python package:

```
pip install langchain-google-cloud-sql-pg
```

See [usage example](https://python.langchain.com/docs/integrations/memory/google_sql_pg/).

```
from langchain_google_cloud_sql_pg import PostgresEngine, PostgresChatMessageHistory
```

### Cloud SQL for MySQL[​](#cloud-sql-for-mysql-2 "Direct link to Cloud SQL for MySQL")

> [Cloud SQL for MySQL](https://cloud.google.com/sql) is a fully-managed database service that helps you set up, maintain, manage, and administer your MySQL relational databases on Google Cloud. Install the python package:

```
pip install langchain-google-cloud-sql-mysql
```

See [usage example](https://python.langchain.com/docs/integrations/memory/google_sql_mysql/).

```
from langchain_google_cloud_sql_mysql import MySQLEngine, MySQLChatMessageHistory
```

### Cloud SQL for SQL Server[​](#cloud-sql-for-sql-server-1 "Direct link to Cloud SQL for SQL Server")

> [Cloud SQL for SQL Server](https://cloud.google.com/sql) is a fully-managed database service that helps you set up, maintain, manage, and administer your SQL Server databases on Google Cloud. Install the python package:

```
pip install langchain-google-cloud-sql-mssql
```

See [usage example](https://python.langchain.com/docs/integrations/memory/google_sql_mssql/).

```
from langchain_google_cloud_sql_mssql import MSSQLEngine, MSSQLChatMessageHistory
```

### Spanner[​](#spanner-2 "Direct link to Spanner")

> [Google Cloud Spanner](https://cloud.google.com/spanner/docs) is a fully managed, mission-critical, relational database service on Google Cloud that offers transactional consistency at global scale, automatic, synchronous replication for high availability, and support for two SQL dialects: GoogleSQL (ANSI 2011 with extensions) and PostgreSQL. Install the python package:

```
pip install langchain-google-spanner
```

See [usage example](https://python.langchain.com/docs/integrations/memory/google_spanner/).

```
from langchain_google_spanner import SpannerChatMessageHistory
```

### Memorystore for Redis[​](#memorystore-for-redis-2 "Direct link to Memorystore for Redis")

> [Google Cloud Memorystore for Redis](https://cloud.google.com/memorystore/docs/redis) is a fully managed Redis service for Google Cloud. Applications running on Google Cloud can achieve extreme performance by leveraging the highly scalable, available, secure Redis service without the burden of managing complex Redis deployments. Install the python package:

```
pip install langchain-google-memorystore-redis
```

See [usage example](https://python.langchain.com/docs/integrations/document_loaders/google_memorystore_redis/).

```
from langchain_google_memorystore_redis import MemorystoreChatMessageHistory
```

### Bigtable[​](#bigtable-1 "Direct link to Bigtable")

> [Google Cloud Bigtable](https://cloud.google.com/bigtable/docs) is Google's fully managed NoSQL Big Data database service in Google Cloud. Install the python package:

```
pip install langchain-google-bigtable
```

See [usage example](https://python.langchain.com/docs/integrations/memory/google_bigtable/).

```
from langchain_google_bigtable import BigtableChatMessageHistory
```

### Firestore (Native Mode)[​](#firestore-native-mode-2 "Direct link to Firestore (Native Mode)")

> [Google Cloud Firestore](https://cloud.google.com/firestore/docs/) is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Install the python package:

```
pip install langchain-google-firestore
```

See [usage example](https://python.langchain.com/docs/integrations/memory/google_firestore/).

```
from langchain_google_firestore import FirestoreChatMessageHistory
```

### Firestore (Datastore Mode)[​](#firestore-datastore-mode-1 "Direct link to Firestore (Datastore Mode)")

> [Google Cloud Firestore in Datastore mode](https://cloud.google.com/datastore/docs) is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Firestore is the newest version of Datastore and introduces several improvements over Datastore. Install the python package:

```
pip install langchain-google-datastore
```

See [usage example](https://python.langchain.com/docs/integrations/memory/google_firestore_datastore/).

```
from langchain_google_datastore import DatastoreChatMessageHistory
```

### El Carro: The Oracle Operator for Kubernetes[​](#el-carro-the-oracle-operator-for-kubernetes "Direct link to El Carro: The Oracle Operator for Kubernetes")

> Google [El Carro Oracle Operator for Kubernetes](https://github.com/GoogleCloudPlatform/elcarro-oracle-operator) offers a way to run `Oracle` databases in `Kubernetes` as a portable, open source, community driven, no vendor lock-in container orchestration system.

```
pip install langchain-google-el-carro
```

See [usage example](https://python.langchain.com/docs/integrations/memory/google_el_carro/).

```
from langchain_google_el_carro import ElCarroChatMessageHistory
```

## Chat Loaders[​](#chat-loaders "Direct link to Chat Loaders")

### GMail[​](#gmail-1 "Direct link to GMail")

> [Gmail](https://en.wikipedia.org/wiki/Gmail) is a free email service provided by Google. This loader works with emails through the `Gmail API`.

We need to install several python packages.

```
pip install google-api-python-client google-auth-oauthlib google-auth-httplib2
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/chat_loaders/gmail/).

```
from langchain_community.chat_loaders.gmail import GMailLoader
```

## 3rd Party Integrations[​](#3rd-party-integrations "Direct link to 3rd Party Integrations")

### SearchApi[​](#searchapi "Direct link to SearchApi")

> [SearchApi](https://www.searchapi.io/) provides a 3rd-party API to access Google search results, YouTube search & transcripts, and other Google-related engines.

See [usage examples and authorization instructions](https://python.langchain.com/docs/integrations/tools/searchapi/).

```
from langchain_community.utilities import SearchApiAPIWrapper
```

### SerpApi[​](#serpapi "Direct link to SerpApi")

> [SerpApi](https://serpapi.com/) provides a 3rd-party API to access Google search results.

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/tools/serpapi/).

```
from langchain_community.utilities import SerpAPIWrapper
```

### Serper.dev[​](#serperdev "Direct link to Serper.dev")

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/tools/google_serper/).

```
from langchain_community.utilities import GoogleSerperAPIWrapper
```

### YouTube[​](#youtube "Direct link to YouTube")

> [YouTube Search](https://github.com/joetats/youtube_search) package searches `YouTube` videos avoiding using their heavily rate-limited API.
> 
> It uses the form on the YouTube homepage and scrapes the resulting page.

We need to install a python package.

```
pip install youtube_search
```

See a [usage example](https://python.langchain.com/docs/integrations/tools/youtube/).

```
from langchain.tools import YouTubeSearchTool
```

### YouTube audio[​](#youtube-audio "Direct link to YouTube audio")

> [YouTube](https://www.youtube.com/) is an online video sharing and social media platform created by `Google`.

Use `YoutubeAudioLoader` to fetch / download the audio files.

Then, use `OpenAIWhisperParser` to transcribe them to text.

We need to install several python packages.

```
pip install yt_dlp pydub librosa
```

See a [usage example and authorization instructions](https://python.langchain.com/docs/integrations/document_loaders/youtube_audio/).

```
from langchain_community.document_loaders.blob_loaders.youtube_audio import YoutubeAudioLoaderfrom langchain_community.document_loaders.parsers import OpenAIWhisperParser, OpenAIWhisperParserLocal
```

### YouTube transcripts[​](#youtube-transcripts "Direct link to YouTube transcripts")

> [YouTube](https://www.youtube.com/) is an online video sharing and social media platform created by `Google`.

We need to install `youtube-transcript-api` python package.

```
pip install youtube-transcript-api
```

See a [usage example](https://python.langchain.com/docs/integrations/document_loaders/youtube_transcript/).

```
from langchain_community.document_loaders import YoutubeLoader
```