Twitter Follower Count sensor (no API integration required)

With a bit of googling I found a Twitter API that returns a json file with the follower count for a user. It seems Twitter use it for widget buttons so I repurposed it as a HA Rest Sensor. Hopefully Twitter won’t remove it any time soon.
Just add the sensor to your configuration.yaml and replace the username at the end of the URL with your own to get your follower count.

  - platform: rest
    name: Twitter Followers
    value_template: '{{ value_json[0].followers_count }}'
    scan_interval: 43200 # Every 12 hours in seconds

Thanks! This was super helpful and exactly what I was looking for!

1 Like

Awesome, thanks for sharing! It will be interesting to see a graph of my Twitter follower count over time.

Is this still the best/right way of doing this?
I too would like a graph of my followers :slight_smile: