# Client libraries

You have the choice between multiple different client libraries. See also
[Client libraries explained](https://cloud.google.com/apis/docs/client-libraries-explained)
for more details.

## Cloud Client Libraries

We recommend using a client library, because they provide improved security and
language integration, and support user authorization. The CSS API client
libraries use gRPC and are designed to work with our [code
samples](https://developers.google.com/comparison-shopping-services/api/code-samples) in the same language.

Here are our most recent client libraries and code samples:

| Client libraries | Code samples |
|---|---|
| [Java](https://central.sonatype.com/artifact/com.google.shopping/google-shopping-css) | [Java](https://github.com/googleads/comparison-shopping-service-api-samples/tree/main/java) |
| [PHP](https://packagist.org/packages/google/shopping-css) |   |
| [Go](https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/css/apiv1/) |   |
| [Ruby](https://rubygems.org/gems/google-shopping-css-v1/) |   |
| [.NET](https://www.nuget.org/packages/Google.Shopping.Css.V1/) |   |
| [Python](https://pypi.org/project/google-shopping-css/) |   |
| [Node.js](https://www.npmjs.com/package/@google-shopping/css) |   |

To set up a client library, download and run one of our code samples.

## Google API Client Libraries

You can also access the CSS API through the [Google API Client
Libraries](https://developers.google.com/api-client-library/).
This lets you to connect to the
[REST](https://developers.google.com/comparison-shopping-services/api/reference/rest) interface directly.

### Advantages over the Cloud Client Libraries

- Supports additional languages: Java, Python, PHP, .NET, JavaScript, Objective-C, Dart, Ruby, Node.js, Go
- Supports batching: see the client library specific documentation for details (examples: [Python](https://github.com/googleapis/google-api-python-client/blob/main/docs/batch.md "Batching in Python"), [Java](https://googleapis.github.io/google-api-java-client/batching.html "Batching in Java")). That said, most of the Cloud Client libraries implement language specific optimizations that make batching unnecessary (example explanation for go is in [issue
  675](https://github.com/googleapis/google-cloud-go/issues/675)).
- Available in the default package directories of most programming languages.

### Disadvantages over the Cloud Client Libraries

- Need to manage calls and data types yourself

### Sample Code

We have [Sample code for Google API
clients](https://developers.google.com/comparison-shopping-services/api/code-samples/gapi) available.

## No client library

You can also connect to the CSS API without any client library, using the HTTP
capabilities of your programming language directly. Refer to the
[REST API](https://developers.google.com/comparison-shopping-services/api/reference/rest) reference.