Pull Data From The Web & Display In Home Assistant - Working with APIs - Display YouTube Sub Count

Опубликовано: 01 Март 2026
на канале: This Smart House
50,110
827

* Update - it looks like they removed the Social Blade integration, so this looks like the only way to get YouTube Data into Home Assistant now*

Hey everyone!! As I said in the video this is part 1 of a series on communicating with APIs and displaying data in Home Assistant. Now in this video, I show you how to explore an API and set up the calls to retrieve data and place it in a sensor in Home Assistant. In this example, I am pulling from the YouTube API and displaying the subscriber and view count from a YouTube channel.

Let me know if there is an API you need help with. Part 2 should be coming next week.

❓What future topics would you like me to cover??❓

▶ Buy Me A Beer 🍻: [https://www.buymeacoffee.com/ThisSmar...](https://www.buymeacoffee.com/ThisSmar...)

▶ Timestamps
00:00 - Opening
00:17 - Introduction
02:45 - Part 1 - Requirements
03:09 - Part 2 - Get API Key
03:24 - Part 2.1 - Sign into Console
03:39 - Part 2.2 - Create Project
04:04 - Part 2.3 - Add YouTube API
04:33 - Part 2.4 - Grab API Key
05:14 - Part 2.5 - Note on Quotas
05:54 - Part 3: API Data
06:08 - Part 3.1 - Creating Sensors.yaml
06:56 - Part 3.2 - Exploring YouTube API
07:53 - Part 3.3 - Build API Call
09:17 - Part 3.4 - Find Chanel ID
10:15 - Part 3.5 - Testing API on your machine
11:31 - Part 4 - Create HA Sensor
12:05 - Part 4.1 - Building Rest Sensor
12:50 - Part 4.2 - Note on Refreshing Data
13:31 - Part 4.3 - Working with JSON
14:01 - Part 4.4 - Building Value Template
17:31 - Part 4.5 - Building Multiple Sensors
18:07 - Part 5 - Verify Sensors
19:31 - Outro

▶ Links in Video:
(I use [Rebrand.ly](http://rebrand.ly/) for my URL shortening)
Fun APIs - https://tshouse.link/apis
Blog Post for Video - https://tshouse.link/yt15post
G dev console - https://tshouse.link/gdev
YouTube API Console - https://tshouse.link/ytapi
Home Assistant Rest Sensor Docs - https://tshouse.link/harest

▶ Product Links:
(When available, we use affiliate links and may earn a commission!)
My Main Home Automation Gear (Kit.co): https://tshouse.link/homekit
My Z-Wave Home Automation Gear (Kit.co): https://tshouse.link/zwave

▶ Get a One-Month Trial of Great Music for Creators (I use this on my photography channel): [https://tshouse.link/sound](https://tshouse.link/sound)

▶ Website: https://thissmart.house