Show follower count from multiple channels on website

Can someone help me with a simple request that can show a follower count for multiple channels on my website. I am thinking something like this: , just with followers instead where I put a html tag the place the count should show up.

I have tried this but it doesn’t seem to work:

$('.followers').each(function () {
    var tnick = $(this).data('tnick');
    var span = $(this).next();
    $.getJSON('' + tnick + '.json?callback=?', function (data) {
           var followers = data.followers;

p>i data-tnick=“GamerHuset” class=“fa fa-eye views”> span>0/span>/p>

The syntax errors (missing “<”) in the HTML is made on purpose as it wouldn’t show the code.

The follower count is within the channel object inside the stream object, not the data object. You would use to access it.

Additionally, do not append Twitch API endpoints with .json as it’s unnecessary.

I still can’t get it to work after tweaking for a long time:

$(’.followers’).each(function () {
var tnick = $(this).data(‘tnick’);
var span = $(this).next();
$.get(‘’ + tnick , function (data) {
var followers =;

You were missing a / in the URL, and the example HTML you gave didn’t contain the followers class anywhere.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.