Skip to content
main
Switch branches/tags
Code

Google Cloud Node.js Client Libraries

Node.js idiomatic client libraries for Google Cloud Platform services.

Libraries are available on GitHub and npm for developing Node.js applications that interact with individual Google Cloud services:

Repo Release Level Version
Access Approval Stable npm
API Gateway Stable npm
Apigee Connect API Stable npm
Asset Inventory Stable npm
AutoML Stable npm
Bigtable Stable npm
Billing Stable npm
Billing Budgets Stable npm
Build Stable npm
Certificate Authority Service Stable npm
Channel API Stable npm
Composer Stable npm
Data Catalog Stable npm
Data Loss Prevention Stable npm
Database Migration Service Stable npm
Dataproc Stable npm
Datastore Stable npm
Datastore Session Stable npm
Dialogflow API Stable npm
Dialogflow CX API Stable npm
DNS Stable npm
Document AI Stable npm
Essential Contacts API Stable npm
Eventarc Stable npm
Filestore Stable npm
Firestore Stable npm
Firestore Session Stable npm
Functions Stable npm
Game Servers Stable npm
GKE Hub Stable npm
Google BigQuery Stable npm
Google BigQuery Connection Stable npm
Google BigQuery Data Transfer Service Stable npm
Google BigQuery Reservation Stable npm
Google BigQuery Storage Stable npm
Google Compute Engine Stable npm
Google Container Analysis Stable npm
Grafeas Stable npm
IAM Policy Troubleshooter API Stable npm
Identity-Aware Proxy Stable npm
Internet of Things (IoT) Core Stable npm
Key Management Service Stable npm
Kubernetes Engine Cluster Manager API Stable npm
Logging Stable npm
Logging for Bunyan Stable npm
Logging for Winston Stable npm
Managed Service for Microsoft Active Directory Stable npm
Memorystore for Memcached Stable npm
Monitoring Dashboards Stable npm
Natural Language Stable npm
Network Management API Stable npm
Organization Policy Stable npm
OS Config API Stable npm
OS Login Stable npm
Profiler Stable npm
Pub/Sub Stable npm
reCAPTCHA Enterprise Stable npm
Recommender Stable npm
Redis Stable npm
Resource Settings API Stable npm
Retail API Stable npm
Scheduler Stable npm
Secret Manager Stable npm
Security Command Center Stable npm
Service Directory Stable npm
Service Usage Stable npm
Shell Stable npm
Spanner Stable npm
Speech Stable npm
Stackdriver Monitoring Stable npm
Storage Stable npm
Storage Transfer Service Stable npm
Talent Solution Stable npm
Tasks Stable npm
Text-to-Speech Stable npm
TPU Stable npm
Transcoder API Stable npm
Translation Stable npm
Vertex AI Stable npm
Video Intelligence Stable npm
Virtual Private Cloud Stable npm
Vision API Stable npm
Web Risk API Stable npm
Web Security Scanner Stable npm
Workflows Stable npm
Access Context Manager Preview npm
AI Platform Notebooks Preview npm
App Engine Admin API Preview npm
Area120 Tables API Preview npm
Artifact Registry Preview npm
Assured Workloads for Government Preview npm
Binary Authorization Preview npm
Contact Center AI Insights API Preview npm
Data Fusion Preview npm
Data Labeling Preview npm
Data QnA Preview npm
Dataflow Preview npm
Dataproc Metastore Preview npm
Datastream Preview npm
Deploy Preview npm
Domains Preview npm
Error Reporting Preview npm
GKE Connect Gateway Preview npm
Google Analytics Admin Preview npm
Google Analytics Data Preview npm
IAM Service Account Credentials API Preview npm
Life Sciences Preview npm
Media Translation Preview npm
Migrate for Compute Engine Preview npm
Network Connectivity Center Preview npm
Network Security API Preview npm
Phishing Protection Preview npm
Private Catalog Preview npm
Resource Manager API Preview npm
Service Control API Preview npm
Service Management API Preview npm
Stackdriver Debugger Preview npm
Trace Preview npm

If the service is not listed above, google-api-nodejs-client interfaces with additional Google Cloud APIs using a legacy REST interface.

When building Node.js applications, preference should be given to the libraries listed in the table.

Enabling APIs

Before you can interact with a given Google Cloud Service, you must enable its API.

Links are available for enabling APIs in the table at the beginning of this document, and in each libraries README.md.

Authentication

Download your Service Account Credentials JSON file

To use Application Default Credentials, You first need to download a set of JSON credentials for your project. Go to APIs & Auth > Credentials in the Google Developers Console and select Service account from the Add credentials dropdown.

This file is your only copy of these credentials. It should never be committed with your source code, and should be stored securely.

Once downloaded, store the path to this file in the GOOGLE_APPLICATION_CREDENTIALS environment variable.

Other Authentication Methods

Other authentication methods are outlined in the README for google-auth-library-nodejs, which is the authentication library used by all Google Cloud Node.js clients.

Example Applications

  • nodejs-getting-started - A sample and tutorial that demonstrates how to build a complete web application using Cloud Datastore, Cloud Storage, and Cloud Pub/Sub and deploy it to Google App Engine or Google Compute Engine.
  • gcloud-node-todos - A TodoMVC backend using google-cloud-node and Datastore.
  • gitnpm - Easily lookup an npm package's GitHub repo using google-cloud-node and Google App Engine.
  • gcloud-kvstore - Use Datastore as a simple key-value store.
  • hya-wave - Cloud-based web sample editor. Part of the hya-io family of products.
  • gstore-node - Google Datastore Entities Modeling library.
  • gstore-api - REST API builder for Google Datastore Entities.

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js.

Client libraries targetting some end-of-life versions of Node.js are available, and can be installed via npm dist-tags. The dist-tags follow the naming convention legacy-(version).

Legacy Node.js versions are supported as a best effort:

  • Legacy versions will not be tested in continuous integration.
  • Some security patches may not be able to be backported.
  • Dependencies will not be kept up-to-date, and features will not be backported.

Legacy tags available

  • legacy-8: install client libraries from this dist-tag for versions compatible with Node.js 8.

Versioning

Our libraries follow Semantic Versioning.

Please note it is currently under active development. Any release versioned 0.x.y is subject to backwards-incompatible changes at any time.

Stable: Libraries defined at the Stable quality level are stable. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against Stable libraries are addressed with the highest priority.

Preview: Libraries defined at the preview quality level are still a work-in-progress and are more likely to get backwards-incompatible updates.

Contributing

Contributions to this library are always welcome and highly encouraged.

See CONTRIBUTING for more information on how to get started.

License

Apache 2.0 - See LICENSE for more information.