Overview of APIs, client libraries, and ORM drivers
Stay organized with collections
Save and categorize content based on your preferences.
Available interfaces
You can use one of several programmatic interfaces when interacting with
Spanner. These are the available interfaces, in the order that we
recommend using them:
Client libraries: The Spanner client libraries are
available in multiple languages and are built on gRPC. These client
libraries provide a layer of abstraction on top of gRPC and handle the details
of session management, transaction execution, retries, and more.
ORM and framework drivers: Google supports open-source Spanner
drivers for several popular object-relational mapping libraries (ORMs) and
frameworks, such as JDBC. These drivers allow the use of Spanner databases through
APIs defined by those frameworks.
RPC API: If a client library or ORM driver is not available for your programming
language of choice, use the RPC API, which is built on gRPC. gRPC
offers a number of performance benefits compared with using the REST API,
including representing objects in protocol buffer format (which are faster to
produce and consume compared with JSON) and persistent connections (which
result in less per-request overhead). Read more about these and other benefits
in gRPC Concepts.
REST API: If you're unable to use Spanner's client libraries
or the RPC API, use the REST API. Note that some features that are available
in the RPC API are not supported in the REST API, as documented below.
RPC versus REST API
This table compares Spanner features available through its RPC and REST API interfaces.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Overview of APIs, client libraries, and ORM drivers\n\nAvailable interfaces\n--------------------\n\nYou can use one of several programmatic interfaces when interacting with\nSpanner. These are the available interfaces, in the order that we\nrecommend using them:\n\n- [Client libraries](/spanner/docs/reference/libraries): The Spanner client libraries are available in multiple languages and are built on [gRPC](https://grpc.io/). These client libraries provide a layer of abstraction on top of gRPC and handle the details of session management, transaction execution, retries, and more.\n- [ORM and framework drivers](/spanner/docs/drivers-overview): Google supports open-source Spanner drivers for several popular object-relational mapping libraries (ORMs) and frameworks, such as JDBC. These drivers allow the use of Spanner databases through APIs defined by those frameworks.\n- [RPC API](/spanner/docs/reference/rpc): If a client library or ORM driver is not available for your programming language of choice, use the RPC API, which is built on [gRPC](https://grpc.io/). gRPC offers a number of performance benefits compared with using the REST API, including representing objects in protocol buffer format (which are faster to produce and consume compared with JSON) and persistent connections (which result in less per-request overhead). Read more about these and other benefits in [gRPC Concepts](https://grpc.io/docs/guides/concepts/).\n- [REST API](/spanner/docs/reference/rest): If you're unable to use Spanner's client libraries or the RPC API, use the REST API. Note that some features that are available in the RPC API are not supported in the REST API, as documented below.\n\nRPC versus REST API\n-------------------\n\nThis table compares Spanner features available through its RPC and REST API interfaces.\n\nClient libraries features support\n---------------------------------\n\nThe following table lists the client libraries, noting the major Spanner features that each one supports."]]