Google Nest API: control your thermostat from code
Published November 2, 2026 · By Port OS Team
Yes, there is an official Google Nest API. Google calls it the Smart Device Management (SDM) API, and you reach it through a program called Device Access. You register once, create an OAuth client and a Device Access project, link your own Google account, and then call the API over HTTPS to read a thermostat's temperature or set its target. As of November 2026, Google's registration page lists a one-time US$5 fee.
Port OS publishes this article, so read the Port OS section with that interest in mind. The Google facts come from Google's own pages linked below. We did not benchmark the direct route against Port OS, and we make no claim that either is faster or more reliable.
What the Nest API covers
| Question | Answer, as of November 2026 |
|---|---|
| What is it called? | Smart Device Management (SDM) API, enabled through Device Access |
| What does it cost? | A one-time US$5 registration fee per account, per Google |
| Which account? | A consumer Google Account such as gmail.com. Google Workspace accounts are not allowed to register |
| Which devices? | Google's supported devices page lists Nest thermostats, several Nest Cam models, Nest Doorbells and Nest Hub Max |
| Can I change the registering account later? | Google says the account tied to the project cannot be changed |
Two other names cause confusion:
- Works with Nest was the older program. Google's help page says Works with Nest connections stopped working on September 29, 2023. Device Access is the replacement.
- Google Home APIs are a different product. Google's Home APIs site describes them as APIs for apps on Android (Kotlin) and iOS (Swift) that work with Google Home devices. If you want a script, a server or a browser tool, the SDM API is the route to read about first.
The direct route in five steps
- Register. Open the Device Access Console, accept the terms and pay the fee. Wait for the confirmation email.
- Set up Google Cloud. Enable the Smart Device Management API in a Google Cloud project you own.
- Create an OAuth client. Google's get started guide describes a Web Server client ID.
- Create a Device Access project. Paste the OAuth client ID in the console. The console shows a Project ID. It is a different value from your Google Cloud project ID.
- Link your account and call the API. Run the OAuth consent flow so Google lets your project see your home, store the refresh token, and send requests with a bearer token.
Setting a heat target looks like this in Google's thermostat docs:
curl -X POST "https://smartdevicemanagement.googleapis.com/v1/enterprises/PROJECT_ID/devices/DEVICE_ID:executeCommand" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"command": "sdm.devices.commands.ThermostatTemperatureSetpoint.SetHeat",
"params": { "heatCelsius": 22.0 }
}'
Google's page says setpoints are in Celsius, the thermostat must already be in the matching mode, and a successful call returns {}. The access token expires, so your code has to refresh it. The host name in the example is the standard SDM host; check it against Google's API reference before you rely on it.
Where Port OS fits
Port OS does not replace the Google setup. You still create your own Device Access project and OAuth client, and Port OS asks for the OAuth client ID, the client secret and the Device Access project ID. The Google Nest setup guide walks through each screen.
After that, Port OS handles the OAuth consent and token refresh, and your Nest devices appear next to devices from your other linked brands:
- One REST API. The same
POST /endpoint-queryandPOST /message-requestscalls work across providers. The smart home REST API article covers authentication and the request model. - An MCP connector. Your AI assistant can ask for a room's temperature or set a thermostat. See connect your AI.
- A browser dashboard. You can view and control the thermostat from your devices page without writing code. The browser control article shows that route.
The Google Nest integration page lists what the connection supports. To start, connect Google Nest.
Read your thermostat through Port OS
List thermostats with POST /endpoint-query. Expanding interfaces.attributes returns each device's reported state, such as the current temperature and target setpoint, and forceDeviceQuery asks the provider for a fresh reading:
curl -s https://api.portoperatingsystem.com/endpoint-query \
-H "Authorization: Bearer $PORTOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": { "match": { "key": "type", "value": "THERMOSTAT" } },
"expand": ["interfaces.attributes"],
"forceDeviceQuery": true,
"paginationContext": { "maxResults": 10 }
}'
Set the target temperature
Send the thermostat capability's set-target-temperature message with POST /message-requests. The Idempotency-Key header is required. The endpoint id is a placeholder; copy a real one from the query response:
curl -s https://api.portoperatingsystem.com/message-requests \
-H "Authorization: Bearer $PORTOS_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"target": {
"type": "ENDPOINT",
"id": "port1/systems/home/endpoints/downstairs-thermostat"
},
"message": {
"header": {
"namespace": "port1/systems/zero/capability-interfaces/thermostat",
"name": "set-target-temperature",
"version": "1.0"
},
"body": { "targetSetpoint": { "value": 21, "scale": "CELSIUS" } }
},
"responseType": "SYNC"
}'
A thermostat that works to a range takes lowerSetpoint and upperSetpoint instead. scale is CELSIUS or FAHRENHEIT. Check what a given device declares before sending, and see the HTTP reference for every path and schema. A success response means the request was accepted. Read the state again if you need to confirm the device changed.
Limits to know about
- No event feed. The Port OS Nest connection does not subscribe to Google's event feed. You get no motion, person or doorbell events, no event images, and no Pub/Sub setup is involved. If you need push events from Nest, use the SDM API directly with events enabled.
- Camera views. Supported cameras and doorbells can open live views through your own Device Access project.
- Your own project is required. Changing the OAuth client or Device Access project means deleting the connection and connecting again.
- Scope. This is the Nest connection. It does not import every device in Google Home.
- Alpha. Port OS is in alpha. Contact the team for compatibility or pricing questions.
When to go direct
Call the SDM API yourself when you only use Nest, when you need events through Pub/Sub, or when you do not want another hosted service in the path. Use Port OS when your devices span several brands and you want one API, an AI connector and a dashboard.
FAQ
Is there a free Google Nest API? Google charges a one-time US$5 Device Access registration fee, as listed on its registration page. We do not know of any other Google charge for personal use. Check Google Cloud pricing for your own project.
Can I use a Google Workspace account? No. Google says registration needs a consumer Google Account.
Is the "Google device access project ID" the same as my Google Cloud project ID? No. Google says the Device Access Project ID is unrelated to the Google Cloud project ID. It is the UUID shown on your project page in the Device Access Console.
Is the Google Home API the same thing? No. Google Home APIs are for Android and iOS app developers. The SDM API is the one for server-side access to Nest devices.
Can I reach my Nest from a browser? Yes. Link Nest to Port OS and use your devices page, or call the SDM API from your own web app.
Does it work with an AI assistant? Yes, through the Port OS MCP connector. See connect your AI.