Google APIs Client Library for Go Getting Started and using: For a longer tutorial, see the Getting Started guide. For examples, see the examples directory. For support, use the golang-nuts…
Google APIs Client Library for Go
Getting Started
shell
$ go get google.golang.org/api/tasks/v1
$ go get google.golang.org/api/moderator/v1
$ go get google.golang.org/api/urlshortener/v1
... etc ...
and using:
go
package main
import (
"context"
"net/http"
"google.golang.org/api/urlshortener/v1"
)
func main() {
ctx := context.Background()
svc, err := urlshortener.NewService(ctx)
// ...
}
- For a longer tutorial, see the Getting Started guide.
- For examples, see the examples directory.
- For support, use the golang-nuts mailing list.
Status

These are auto-generated Go libraries from the Google Discovery Service's JSON description files.
Due to the auto-generated nature of this collection of libraries they may contain breaking changes from one release to
the next. The generator itself and the code it produces are considered beta for this reason.
These client libraries are officially supported by Google. However, the libraries are considered complete and are in
maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.
If you're working with Google Cloud Platform APIs such as Datastore or Pub/Sub, please use the
Cloud Client Libraries for Go instead. These are the new and idiomatic
Go libraries targeted specifically at Google Cloud Platform Services.
Authorization
By default, each API will use Google Application Default Credentials
for authorization credentials used in calling the API endpoints. This will allow your application to run in many
environments without requiring explicit configuration.
go
// import "google.golang.org/api/sheets/v4"
client, err := sheets.NewService(ctx)
To authorize using a JSON key file, passoption.WithAuthCredentialsFile to the NewService
function of the desired package. You must also specify the credential type. For example, to use a service account key file:
go
client, err := sheets.NewService(ctx, option.WithAuthCredentialsFile(option.ServiceAccount, "path/to/keyfile.json"))
Similarly, you can use JSON credentials directly with option.WithAuthCredentialsJSON:
go
// where jsonKey is a []byte containing the JSON key
client, err := sheets.NewService(ctx, option.WithAuthCredentialsJSON(option.ServiceAccount, jsonKey))
The older option.WithCredentialsFile and option.WithCredentialsJSON functions are deprecated due to a potential security risk.
You can exert more control over authorization by using the golang.org/x/oauth2
package to create an oauth2.TokenSource. Then pass option.WithTokenSource
to the NewService function:
go
tokenSource := ...
svc, err := sheets.NewService(ctx, option.WithTokenSource(tokenSource))
More information
For some more information related to all of the generated clients please read through our
package documentation.
-
dotfiles
dotfiles
Emacs Lisp ★ 25 13y agoExplain → -
Memorio
Issue tracker for iOS / Android app Memorio
★ 5 5y agoExplain → -
LanguageStudy
Exploring AmbientTalk and other programming languages.
Rust ★ 3 7y agoExplain → -
java-spanner ⑂
No description.
★ 1 4mo agoExplain → -
release-please ⑂
generate release PRs based on the conventionalcommits.org spec
TypeScript ★ 1 22d agoExplain → -
java-shared-config ⑂
Shared Maven build configuration for Google Cloud Java client libraries.
Java ★ 1 1mo agoExplain → -
classgraph
classgraph
Java ★ 1 5y agoExplain → -
maven ⑂
Apache Maven
Java ★ 1 3y agoExplain → -
protobuf ⑂
Protocol Buffers - Google's data interchange format
C++ ★ 1 2y agoExplain → -
googleapis ⑂
Public interface definitions of Google APIs.
Starlark ★ 1 2y agoExplain → -
java-bigqueryconnection ⑂
No description.
★ 1 2y agoExplain → -
gax-java ⑂
Google API Extensions for Java - shared runtime for clients generated by googleapis/gapic-generator
Java ★ 1 2y agoExplain → -
java-bigquerydatatransfer ⑂
No description.
★ 1 2y agoExplain → -
java-common-protos ⑂
No description.
★ 1 2y agoExplain → -
java-shared-dependencies ⑂
No description.
★ 1 2y agoExplain → -
beam ⑂
Apache Beam
Java ★ 1 2y agoExplain → -
java-bigqueryreservation ⑂
No description.
★ 1 2y agoExplain → -
guava_capability_error
To understand Guava's capability error
Java ★ 1 2y agoExplain → -
python-iot ⑂
No description.
★ 1 2y agoExplain → -
python-gke-backup ⑂
No description.
Python ★ 1 2y agoExplain → -
metrics-sample ⑂
No description.
★ 1 2y agoExplain → -
java-firestore ⑂
No description.
★ 1 4mo agoExplain → -
python-optimization ⑂
No description.
★ 1 2y agoExplain → -
python-network-services ⑂
No description.
★ 1 2y agoExplain → -
python-monitoring-dashboards ⑂
No description.
Python ★ 1 2y agoExplain → -
gax-batcher-impl-test-reproducer
A Maven project to reproduce GAX's flaky BatcherImplTest https://github.com/googleapis/sdk-platform-java/issues/1193
Java ★ 1 2y agoExplain → -
google-cloud-rust ⑂
Google Cloud Rust Client Libraries
Rust ★ 0 17d agoExplain → -
spring-cloud-sleuth ⑂
Distributed tracing for spring cloud
Java ★ 0 7y agoExplain → -
google-cloud-java ⑂
Google Cloud Client Library for Java
Java ★ 0 1mo agoExplain → -
mcp-toolbox-sdk-js ⑂
Javascript SDK for interacting with the MCP Toolbox for Databases.
TypeScript ★ 0 2mo agoExplain → -
dotnet-docs-samples ⑂
.NET code samples used on https://cloud.google.com
★ 0 4mo agoExplain → -
hello-nix
No description.
Nix ★ 0 4mo agoExplain → -
retry-request ⑂
**THIS REPOSITORY AND PACKAGE WILL BE DEPRECATED IN JULY 2024** Retry a request with built-in exponential backoff.
★ 0 4mo agoExplain → -
nodejs-storage ⑂
Node.js client for Google Cloud Storage: unified object storage for developers and enterprises, from live data serving to data analytics/ML to data archiving.
★ 0 4mo agoExplain → -
nodejs-pubsub ⑂
Node.js client for Google Cloud Pub/Sub: Ingest event streams from anywhere, at any scale, for simple, reliable, real-time stream analytics.
★ 0 4mo agoExplain → -
nodejs-promisify ⑂
A simple utility for promisifying functions and classes.
★ 0 4mo agoExplain → -
nodejs-projectify ⑂
A simple utility for replacing the projectId token in objects.
★ 0 4mo agoExplain → -
nodejs-precise-date ⑂
A simple utility for precise-dateing functions and classes.
★ 0 4mo agoExplain → -
nodejs-paginator ⑂
A result paging utility used by Google node.js modules
★ 0 4mo agoExplain → -
nodejs-firestore ⑂
Node.js client for Google Cloud Firestore: a NoSQL document database built for automatic scaling, high performance, and ease of application development.
★ 0 4mo agoExplain → -
nodejs-datastore ⑂
Node.js client for Google Cloud Datastore: a highly-scalable NoSQL database for your web and mobile applications.
★ 0 4mo agoExplain → -
nodejs-common ⑂
🚀🐢 A set of classes and utilities used in Google npm modules.
★ 0 4mo agoExplain → -
nodejs-cloud-rad ⑂
No description.
★ 0 4mo agoExplain → -
nodejs-bigtable ⑂
Node.js client for Google Cloud Bigtable: Google's NoSQL Big Data database service.
★ 0 4mo agoExplain → -
nodejs-bigquery-storage ⑂
BigQuery Storage Node.js client
★ 0 4mo agoExplain → -
nodejs-bigquery ⑂
Node.js client for Google Cloud BigQuery: A fast, economical and fully-managed enterprise data warehouse for large-scale data analytics.
★ 0 4mo agoExplain → -
google-cloud-node-core ⑂
No description.
★ 0 4mo agoExplain → -
cloud-profiler-nodejs ⑂
Node.js library for Google Cloud Profiler. Continuous CPU and heap profiling to improve performance and reduce costs.
★ 0 4mo agoExplain → -
sphinx-docfx-yaml ⑂
Forked sphinx-docfx-yaml repository for creating DocFX YAML for Python Client Libraries
★ 0 4mo agoExplain → -
python-test-utils ⑂
No description.
★ 0 4mo agoExplain → -
python-storage ⑂
Python SDK for GCS (Google Cloud Storage)
★ 0 4mo agoExplain → -
python-spanner ⑂
No description.
★ 0 4mo agoExplain → -
python-runtimeconfig ⑂
No description.
★ 0 4mo agoExplain → -
python-pubsublite ⑂
No description.
★ 0 4mo agoExplain → -
python-pubsub ⑂
No description.
★ 0 4mo agoExplain → -
python-ndb ⑂
No description.
★ 0 4mo agoExplain → -
python-logging ⑂
No description.
★ 0 4mo agoExplain → -
python-firestore ⑂
No description.
★ 0 4mo agoExplain → -
python-error-reporting ⑂
No description.
★ 0 4mo agoExplain → -
python-documentai-toolbox ⑂
Document AI Toolbox is an SDK for Python that provides utility functions for managing, manipulating, and extracting information from the document response. It creates a "wrapped" document object from JSON files in Cloud Storage, local JSON files, or output directly from the Document AI API.
★ 0 4mo agoExplain → -
python-dns ⑂
No description.
★ 0 4mo agoExplain → -
python-db-dtypes-pandas ⑂
Extension dtypes for pandas corresponding to GoogleSQL data types such as DATE, TIME, and JSON.
★ 0 4mo agoExplain → -
python-datastore ⑂
No description.
★ 0 4mo agoExplain → -
python-crc32c ⑂
No description.
★ 0 4mo agoExplain → -
python-cloud-core ⑂
No description.
★ 0 4mo agoExplain → -
python-bigtable ⑂
No description.
★ 0 4mo agoExplain → -
python-bigquery-sqlalchemy ⑂
SQLAlchemy dialect for BigQuery
★ 0 4mo agoExplain → -
python-bigquery-pandas ⑂
Google BigQuery connector for pandas
★ 0 4mo agoExplain → -
python-bigquery-magics ⑂
No description.
★ 0 4mo agoExplain → -
python-bigquery-dataframes ⑂
BigQuery DataFrames (also known as BigFrames)
★ 0 4mo agoExplain → -
python-bigquery ⑂
No description.
★ 0 4mo agoExplain → -
python-api-core ⑂
No description.
★ 0 4mo agoExplain → -
proto-plus-python ⑂
Beautiful, idiomatic protocol buffers in Python
★ 0 4mo agoExplain → -
google-resumable-media-python ⑂
No description.
★ 0 4mo agoExplain → -
google-auth-library-python-oauthlib ⑂
No description.
★ 0 4mo agoExplain → -
google-auth-library-python-httplib2 ⑂
No description.
★ 0 4mo agoExplain → -
google-auth-library-python ⑂
Google Auth Python Library
★ 0 4mo agoExplain → -
google-api-python-client ⑂
🐍 The official Python client library for Google's discovery based APIs.
★ 0 4mo agoExplain → -
docuploader ⑂
This tool uploads documentation for publishing to googleapis.dev.
★ 0 4mo agoExplain → -
gapic-generator-go ⑂
Generate Go API client libraries from Protocol Buffers.
★ 0 4mo agoExplain → -
go-genproto ⑂
Generated code for Google Cloud client libraries.
★ 0 4mo agoExplain → -
gax-go ⑂
Google API Extensions for Go.
★ 0 4mo agoExplain → -
suztomo ⑂
Auto-generated Google APIs for Go.
★ 0 4mo agoExplain → -
rules_gapic ⑂
No description.
★ 0 4mo agoExplain → -
java-pubsub-group-kafka-connector ⑂
No description.
★ 0 4mo agoExplain → -
java-logging-servlet-initializer ⑂
No description.
★ 0 4mo agoExplain → -
java-conformance-tests ⑂
No description.
★ 0 4mo agoExplain → -
gapic-showcase ⑂
An API that demonstrates Generated API Client (GAPIC) features and common API patterns used by Google.
★ 0 4mo agoExplain → -
disco-to-proto3-converter ⑂
No description.
★ 0 4mo agoExplain → -
nodejs-error-reporting ⑂
Node.js client for Stackdriver Error Reporting: Count, analyze and aggregate the crashes in your running cloud services.
★ 0 4mo agoExplain → -
nodejs-logging-bunyan ⑂
Node.js client integration between Stackdriver Logging and Bunyan.
★ 0 4mo agoExplain → -
nodejs-logging-winston ⑂
Node.js client integration between Stackdriver Logging and Winston.
★ 0 4mo agoExplain → -
nodejs-logging ⑂
Node.js client for Stackdriver Logging: Store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services (AWS).
★ 0 4mo agoExplain → -
python-docs-samples ⑂
Code samples used on cloud.google.com
★ 0 5mo agoExplain → -
mecab_dart ⑂
No description.
C++ ★ 0 1mo agoExplain → -
java-logging-logback ⑂
No description.
Java ★ 0 4mo agoExplain → -
sdk-platform-java ⑂
Tooling and shared libraries for Cloud SDK for Java
★ 0 6mo agoExplain → -
jib ⑂
🏗 Build container images for your Java applications.
Java ★ 0 7mo agoExplain → -
cloud-opensource-java ⑂
Tools for detecting and avoiding linkage errors in GCP open source projects
Java ★ 0 7mo agoExplain → -
wombat-dressing-room ⑂
proxy designed to reduce the attack surface of npm publish
TypeScript ★ 0 2d agoExplain → -
appengine-plugins ⑂
A client Java library to manage App Engine Java applications for any project that performs App Engine Java application management. For example, the Maven, Gradle and Eclipse App Engine plugins, custom user tools, etc.
★ 0 8mo agoExplain → -
gcloud-mcp ⑂
gcloud MCP server
TypeScript ★ 0 8mo agoExplain → -
librarian ⑂
CLI for managing SDK client library configuration, generation and releases
Go ★ 0 2d agoExplain → -
mulmocast-cli ⑂
AI-powered podcast & video generator.
★ 0 9mo agoExplain → -
start.spring.io ⑂
https://start.spring.io
★ 0 1y agoExplain → -
spring-cloud-gcp ⑂
Copy of Spring Cloud GCP
Java ★ 0 1y agoExplain → -
java-storage-nio ⑂
No description.
★ 0 4mo agoExplain → -
java-pubsublite ⑂
No description.
★ 0 4mo agoExplain → -
java-pubsub ⑂
No description.
★ 0 4mo agoExplain → -
java-spanner-jdbc ⑂
No description.
★ 0 4mo agoExplain → -
java-bigtable ⑂
No description.
Java ★ 0 4mo agoExplain → -
java-cloud-bom ⑂
No description.
Java ★ 0 4mo agoExplain → -
aether ⑂
Aether is a modern systems programming language with LLM-first design principles
★ 0 9mo agoExplain → -
MachineLearningStudy
Personal study note for Machine Learning
★ 0 11mo agoExplain → -
mcp-toolbox-sdk-python ⑂
Python SDK for interacting with the MCP Toolbox for Databases.
★ 0 1y agoExplain → -
google-cloud-python ⑂
Google Cloud Client Library for Python
★ 0 12d agoExplain → -
google-api-nodejs-client ⑂
Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
★ 0 4mo agoExplain → -
code-suggester ⑂
No description.
★ 0 4mo agoExplain → -
google-cloud-go ⑂
Google Cloud Client Libraries for Go.
★ 0 15d agoExplain → -
google-cloudevents-go ⑂
CloudEvent Types for Go
★ 0 1y agoExplain → -
nodejs-spanner ⑂
Node.js client for Google Cloud Spanner: the world’s first fully managed relational database service to offer both strong consistency and horizontal scalability.
★ 0 4mo agoExplain → -
gax-nodejs ⑂
Google API Extensions for Node.js
★ 0 1y agoExplain → -
goodmemory
With GoodMemory, take notes for persons around you.
HTML ★ 0 1y agoExplain → -
releasetool ⑂
A utility for release Google client libraries across a variety of languages.
★ 0 1y agoExplain → -
functions-framework-java ⑂
FaaS (Function as a service) framework for writing portable Java functions
★ 0 1y agoExplain → -
serverless-exec-ruby ⑂
No description.
★ 0 1y agoExplain → -
google-cloudevents-ruby ⑂
CloudEvent Types for Ruby
★ 0 1y agoExplain → -
signet ⑂
Signet is an OAuth 1.0 / OAuth 2.0 implementation.
★ 0 1y agoExplain → -
ruby-style ⑂
No description.
★ 0 1y agoExplain → -
ruby-spanner ⑂
No description.
★ 0 1y agoExplain → -
ruby-spanner-activerecord ⑂
Spanner<->ActiveRecord adapter for Ruby
★ 0 1y agoExplain → -
ruby-core-libraries ⑂
No description.
★ 0 1y agoExplain → -
ruby-common-tools ⑂
No description.
★ 0 1y agoExplain → -
ruby-cloud-env ⑂
No description.
★ 0 1y agoExplain → -
google-auth-library-ruby ⑂
Google Auth Library for Ruby
★ 0 1y agoExplain → -
google-api-ruby-client ⑂
REST client for Google APIs
★ 0 1y agoExplain → -
gapic-generator-ruby ⑂
Generate Ruby gRPC client libraries from Protocol Buffer definitions.
★ 0 1y agoExplain → -
common-protos-ruby ⑂
Ruby protocol buffer classes generated from https://github.com/googleapis/api-common-protos
★ 0 1y agoExplain → -
functions-framework-ruby ⑂
FaaS (Function as a service) framework for writing portable Ruby functions
★ 0 1y agoExplain → -
appengine-ruby ⑂
Optional integration library for the Ruby runtime for Google App Engine
★ 0 1y agoExplain → -
google-cloud-ruby ⑂
Google Cloud Client Library for Ruby
★ 0 1y agoExplain → -
repo-automation-bots ⑂
A collection of bots, based on probot, for performing common maintenance tasks across the open-source repos managed by Google on GitHub.
TypeScript ★ 0 11d agoExplain → -
bom-examples
Demonstration of how Maven BOM works
Java ★ 0 1y agoExplain → -
docker-ci-helper ⑂
No description.
★ 0 1y agoExplain → -
grpc-vs-rest
Measurement of GAPIC client libraries backed by gRPC and REST
Java ★ 0 2y agoExplain → -
alloydb-go-connector ⑂
A Go library for connecting securely to your AlloyDB instances
★ 0 1y agoExplain → -
opentelemetry-operations-ruby ⑂
No description.
★ 0 1y agoExplain → -
work_proto_lib
No description.
Starlark ★ 0 3y agoExplain → -
repo_tracker ⑂
Tracks the status of repositories (open issues, open pr's etc)
★ 0 3y agoExplain → -
troubleshoot-bazel-repo-rule
troubleshoot-bazel-repo-rule
Starlark ★ 0 2y agoExplain → -
gapic-generator-python ⑂
Generate Python API client libraries from Protocol Buffers.
★ 0 4mo agoExplain → -
hello-maps-routes
Test to use Maps Routes Java library
Java ★ 0 3y agoExplain → -
google-cloud-node ⑂
Google Cloud Client Library for Node.js
★ 0 2d agoExplain → -
flatten-maven-plugin ⑂
Flatten Maven Plugin
★ 0 3y agoExplain → -
google-api-java-client-services ⑂
Generated Java code for Google APIs
Java ★ 0 4mo agoExplain → -
gcp-serviceaccount-test
gcp-serviceaccount-test
Java ★ 0 3y agoExplain → -
java-batch ⑂
No description.
★ 0 4y agoExplain → -
java-apigee-registry ⑂
No description.
★ 0 4y agoExplain → -
java-gke-multi-cloud ⑂
No description.
★ 0 4y agoExplain → -
java-gke-backup ⑂
No description.
★ 0 4y agoExplain → -
google-api-java-client ⑂
Google APIs Client Library for Java
Java ★ 0 4mo agoExplain → -
pubsub-sample-graal22.1-failure
No description.
Java ★ 0 4y agoExplain → -
monorepo-experiments ⑂
No description.
★ 0 4y agoExplain → -
java8-library-and-graal-sdk
Experiment with a library supporting Java 8 and Graal SDK 21.1.0
Java ★ 0 4y agoExplain → -
java-bigquery-data-exchange ⑂
No description.
★ 0 4y agoExplain → -
java-video-live-stream ⑂
No description.
★ 0 4y agoExplain → -
java-bare-metal-solution ⑂
No description.
★ 0 4y agoExplain → -
java-run ⑂
No description.
★ 0 4y agoExplain → -
java-optimization ⑂
No description.
★ 0 4y agoExplain → -
java-video-stitcher ⑂
No description.
★ 0 4y agoExplain → -
native-image-support-java ⑂
Enables GraalVM Native Image support for Google Cloud Java Client Libraries.
★ 0 4y agoExplain → -
java-grafeas ⑂
No description.
Java ★ 0 4y agoExplain → -
java-dataplex ⑂
No description.
★ 0 4y agoExplain → -
java-eventarc-publishing ⑂
No description.
★ 0 4y agoExplain → -
native-image-system-properties ⑂
No description.
Java ★ 0 4y agoExplain → -
junit-experiment ⑂
Experiment with Junit annotations and tags for native image testing
★ 0 4y agoExplain → -
java-bigquery ⑂
No description.
Java ★ 0 4mo agoExplain → -
repo-downstream-csv
Checking compatibility of libraries using CSV file
Shell ★ 0 4y agoExplain → -
hello-gitsubmodule
Testing git submodule
★ 0 4y agoExplain → -
java-vmmigration ⑂
No description.
★ 0 4y agoExplain → -
java-deploy ⑂
No description.
★ 0 4y agoExplain → -
java-bigquerymigration ⑂
No description.
★ 0 2y agoExplain → -
firebase-admin-java ⑂
Firebase Admin Java SDK
★ 0 4y agoExplain → -
google-cloud-spanner-hibernate ⑂
The official Google Cloud Spanner Dialect for Hibernate ORM
★ 0 4y agoExplain → -
java-docfx-doclet ⑂
Custom doclet that generates YAML files from Javadoc output for DocFX consumption
★ 0 4mo agoExplain → -
java-iam-admin ⑂
No description.
★ 0 3y agoExplain → -
java-gcloud-maven-plugin ⑂
No description.
★ 0 4mo agoExplain → -
embedded-objects-java
Troubleshooting of https://github.com/GoogleCloudPlatform/spring-cloud-gcp/issues/774
Java ★ 0 4y agoExplain → -
cloud-spanner-r2dbc ⑂
R2DBC driver for Google Cloud Spanner
★ 0 4y agoExplain → -
java-ids ⑂
No description.
★ 0 4y agoExplain → -
hadoop-connectors ⑂
Libraries and tools for interoperability between Hadoop-related open-source software and Google Cloud Platform.
★ 0 1y agoExplain → -
testing-infra-docker ⑂
Docker images for testing Google client libraries.
★ 0 4mo agoExplain → -
google-http-java-client ⑂
Google HTTP Client Library for Java
Java ★ 0 4mo agoExplain → -
java-core ⑂
A set of classes and utilities used in Google Cloud Java libraries
Java ★ 0 3y agoExplain → -
java-workflows ⑂
No description.
★ 0 4y agoExplain → -
java-workflow-executions ⑂
No description.
★ 0 4y agoExplain → -
java-websecurityscanner ⑂
No description.
★ 0 4y agoExplain → -
java-webrisk ⑂
No description.
★ 0 4y agoExplain → -
java-vpcaccess ⑂
No description.
★ 0 4y agoExplain → -
java-vision ⑂
No description.
★ 0 4y agoExplain →
No repos match these filters.