This page provides links to convenient ways to access the
Home Graph API.

## Home Graph API client libraries

The Home Graph API is built on HTTP and JSON, so any standard HTTP client can
send requests to it and parse the responses.

However, instead of creating HTTP requests and parsing responses manually, you
may want to use the Google APIs client libraries. The client libraries provide
better language integration, improved security, and support for making calls
that require user authorization.

### Dart

Get the latest [Home Graph API client library for Dart](https://pub.dev/packages/googleapis). Read the
client library's [developer's guide](https://pub.dev/documentation/googleapis/latest/).

### Go

Get the latest [Home Graph API client library for Go](https://github.com/google/google-api-go-client). Read the
client library's [developer's guide](https://github.com/google/google-api-go-client).

### Java

<br />


This page contains information about getting started with the HomeGraph API by using
the Google API Client Library for Java. For more information, see the following documentation:

- Browse the [Javadoc reference for the HomeGraph API](https://googleapis.dev/java/google-api-services-homegraph/latest/).
- Read the [Developer's Guide for the Google API Client Library for Java](https://github.com/googleapis/google-api-java-client/).
- Interact with this API in your browser using the [APIs Explorer for the HomeGraph API](https://developers.google.com/apis-explorer/#p/homegraph/v1/).

## Add the client library to your project

Select your build environment (Maven or Gradle) from the following tabs:


Maven

Add the following to your `pom.xml` file:
<iframe src="https:///frame/cloud-to-cloud/libraries_0f1c7853958a7c5d409e6e9cdcc1840f50872627f5cea8f199f32e011c3157b0.frame" class="framebox inherit-locale " allow="clipboard-write https://" allowfullscreen is-upgraded></iframe>

See [all versions available on the Maven Central Repository](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.google.apis%22%20AND%20a%3A%22google-api-services-homegraph%22).
Gradle

Add the following to your `build.gradle` file:
<iframe src="https:///frame/cloud-to-cloud/libraries_9449acc400ef3cdee8cdd99d8472df75f644532737a6db629c58e180c03b562e.frame" class="framebox inherit-locale " allow="clipboard-write https://" allowfullscreen is-upgraded></iframe>

See [all versions available on the Maven Central Repository](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.google.apis%22%20AND%20a%3A%22google-api-services-homegraph%22).

### JavaScript

Read the client library's [developer's guide](https://developers.home.google.com/api-client-library/javascript/start/start-js).

### .NET


This page contains information about getting started with the HomeGraph API by using
the Google API Client Library for .NET. For more information, see the following documentation:

- Browse the [.NET reference documentation for the HomeGraph API](https://googleapis.dev/dotnet/Google.Apis/latest/api/Google.Apis.html).
- Read the [Developer's guide for the Google API Client Library for .NET](https://developers.home.google.com/api-client-library/dotnet/get_started).
- Interact with this API in your browser using the [APIs Explorer for the HomeGraph API](https://developers.google.com/apis-explorer/#p/homegraph/v1/).

## Downloading the library

Install the NuGet package:
[Google.Apis](https://www.nuget.org/packages/Google.Apis).

### Node.js

Get the latest [Home Graph API client library for Node.js](https://github.com/google/google-api-nodejs-client/). Read the
client library's [developer's guide](https://github.com/google/google-api-nodejs-client/).

### Obj-C

Get the latest [Home Graph API client library for Objective-C](https://github.com/google/google-api-objectivec-client-for-rest). Read the
client library's [developer's guide](https://github.com/google/google-api-objectivec-client-for-rest/wiki).

### PHP

Get the latest [Home Graph API client library for PHP](https://github.com/google/google-api-php-client). Read the
client library's [developer's guide](https://developers.home.google.com/api-client-library/php).

### Python


This page contains information about getting started with the HomeGraph API by using
the Google API Client Library for Python (v1/v2). For more information, see the following documentation:

- Browse the [PyDoc reference for the HomeGraph API](https://googleapis.github.io/google-api-python-client/docs/dyn/homegraph_v1.html).
- Read the [Developer's guide for the Google API Client Library for Python (v1/v2)](https://developers.home.google.com/api-client-library/python).
- Interact with this API in your browser using the [APIs Explorer for the HomeGraph API](https://developers.google.com/apis-explorer/#p/homegraph/v1/).

## System requirements

- Operating systems:
  - Linux
  - macOS X
  - Windows
- [The v1 client library requires Python 2.7 or higher. The v2 client library requires 3.7 or higher.](http://python.org/download/)

## Install the client library

You can either use a package manager or manually download and install the Python client library:

### Managed install

Use pip or setuptools to manage your installation. You might
need to run `sudo` first.

- [pip](http://pypi.python.org/pypi/pip) (preferred):

  ```
  pip install --upgrade google-api-python-client
  ```
- [Setuptools](http://pypi.python.org/pypi/setuptools):

  ```
  easy_install --upgrade google-api-python-client
  ```

### Manual install

1. [Download the latest client
   library for Python](https://pypi.python.org/pypi/google-api-python-client/).
2. Unpack the code.
3. Install:

   ```
   python setup.py install
   ```

### App Engine

Because the Python client libraries aren't installed in the
[App Engine Python runtime environment](https://cloud.google.com/appengine/docs/python/),
you must [copy them into your application](https://cloud.google.com/appengine/docs/python/tools/libraries27#vendoring) just like third-party libraries.

<br />

### Ruby


This page contains information about getting started with the HomeGraph API by using
the Google API Client Library for Ruby. For more information, see the following documentation:

- Read the [Get started guide for the Google API Client Library for Ruby](https://developers.home.google.com/api-client-library/ruby/start/get_started).
- Interact with this API in your browser using the [APIs Explorer for the HomeGraph API](https://developers.google.com/apis-explorer/#p/homegraph/v1/).

## Install the `google-api-client` gem


Depending on your system, you might need to prepend these commands with `sudo`.


If you haven't installed the Google API Client Library for Ruby before, install by using `RubyGems`:

```
gem install google-api-client
```

<br />


If you already have the gem installed, update to the latest version:

```
gem update -y google-api-client
```

<br />

## Get started with the Google API Client Library for Ruby


To learn how to make your first request, see the
[Get started guide](https://developers.home.google.com/api-client-library/ruby/start/get_started).

<br />

## Other ways to access the Home Graph API

The following table lists other ways to access the Home Graph API:

| Access method | Description |
| [APIs Explorer](https://developers.google.com/apis-explorer/#p/homegraph/v1/) | An interactive tool that lets you try out Google APIs right from your browser. |
|---|---|

## Other libraries

Other libraries and repositories that can assist with your smart home
integrations.

| Library | Description |
|---|---|
| [Actions on Google Node.js library](https://www.npmjs.com/package/actions-on-google) | This is the Node.js library for implementing Google smart home fulfillment. For more information about Smart Home integrations, see the [smart home module](https://actions-on-google.github.io/actions-on-google-nodejs/modules/smarthome.html). |
| [Google smart home Java library](https://github.com/google-home/smart-home-java) | This is the Java library for implementing Google smart home fulfillment. For more information about Google smart home integrations, see the [smart home module](https://actions-on-google.github.io/actions-on-google-java/com/google/actions/api/smarthome/package-summary.html). |
| [Google smart home JSON schemas](https://github.com/google-home/smart-home-schema) | Repositories of JSON schemas definitions for Google smart home intents and traits interfaces. See [JSON schemas generators](https://json-schema.org/implementations.html#generators-from-schemas) options to generate libraries artifact for supported languages. |
| [Local Home SDK typings library](https://www.npmjs.com/package/@google/local-home-sdk) | This is the TypeScript library for implementing Local Home SDK fulfillment. For more information, see the [local fulfillment guide](https://developers.home.google.com/local-home/overview.md.txt). |