Libraries of Clients Explained
Although you can use Google Cloud APIs by making direct server HTTP requests (or RPC calls where available), we provide all of our Cloud APIs with client library code that makes it easier to access them from your preferred languages. The various types of client libraries we provide for Cloud APIs are explained in this document. You will find out more about the libraries available for your product or the language of choice in the documentation for the product or language.
Server Libraries on Google Cloud
Our new client library model is used by Google Cloud Client Libraries and is our recommended choice for programmatically accessing Cloud APIs where available. Libraries for Cloud Clients:
Provide each language with idiomatic, created or hand-written code, making it easy and intuitive to use the Cloud API.
Manage all low-level communication information, including authentication with Google, with the server.
Using familiar package management software such as npm and pip, you can install it.
In certain instances, using gRPC provides you with efficiency advantages. In the gRPC APIs section below, you will find out more.
Installation instructions and reference materials for the required Cloud Client Library can be found on the Client Libraries page of your chosen Cloud API. On our Cloud Client Libraries page, you can find links to get started with these and their reference documentation.
Server Libraries for Google API
In all languages, a number of Google Cloud APIs do not yet have Google Cloud Client Libraries available. You can also use an older version of our client library, called Google API Client Libraries, if you want to use one of these APIs and there is no Cloud Client Library for your chosen language. Such libraries:
Offer access to the REST interface of the API only; gRPC is not allowed.
Have interface code autogenerated that may not be as idiomatic as our newer libraries.
Manage all low-level communication information, including authentication with Google, with the server.
Using familiar package management software such as npm and pip, you can install it.
You can find links to these libraries, where appropriate, on the Client Libraries page of the related Cloud API.
Using the web platform Firebase
The Google-wide solution for developing applications on mobile devices is Firebase. It provides a client code SDK that allows you to directly access mobile-relevant Cloud APIs from iOS, Android, and Web apps. For more information on the Cloud APIs are supported and how to get started with Firebase, visit the Firebase documentation.
Using a client code of your own
Generally, in order to access Cloud APIs, we suggest using our client libraries. However, if you are an experienced developer and your unique requirements are not met by our client libraries, you can write your own custom code to directly access the lower-level service APIs of the service.
HTTP/REST APIs
A basic conventional JSON/REST interface is exposed by all Cloud APIs. You will find out more about how Cloud APIs operate with various HTTP versions and implementations in our HTTP Guides if you need to write your own custom code to access the REST API directly using a third-party HTTP client library of your choosing.
APIs from gRPC
Initially developed by Google, gRPC is a language-neutral, platform-neutral, open source, remote procedure call (RPC) system: you can find out much more at grpc.io. In general, gRPC-enabled Cloud APIs have both REST and RPC interfaces, so gRPC-enabled API clients can also use protocol buffers and gRPC over HTTP2 to speak to the RPC interface instead of only using JSON over HTTP to talk to the REST interface. By testing its APIs and Reference portion, you can find out if an API is gRPC-enabled.
You can create your own gRPC client libraries for it in any gRPC-supported language if the Cloud API is gRPC-enabled. You will need the protocol buffers service description of the API to do this (typically available from our repository on GitHub). To generate and use your client, you can then follow the instructions for your chosen language on grpc.io.
You can still benefit from gRPC if you don't want to create your own gRPC code: an increasing number of Cloud Client Libraries for gRPC-enabled APIs use gRPC to connect with Google servers under the hood. In terms of throughput and CPU use, this is significantly more efficient. Accessing an API using gRPC can increase the throughput per CPU by as much as a factor of 10 compared to the JSON REST API. We plan to update to gRPC as many Cloud Client Libraries as possible; you will still get all the other benefits of our client library code in the meantime.
Other ways to access APIs in the Cloud
You can access the same features using the resources in the Google Cloud SDK or via Google Cloud Console if you do not want to programmatically access an API.
Following are some examples of Google clients API: