Back in the day, Disqus used to be great, offering more freedom and features. It is still great except that the old Disqus had awesome features like the “channel” feature and no ads, but now ads are a big part of it. Channels recently came back, but users can’t create their own channels anymore.
But this post isn’t about that; it’s about the Disqus RSS feed.
A while back, when I was building this notification icon, I wanted to add a feature to show recent Disqus discussions. But I didn’t know how to fetch the Disqus comments because I didn’t know the feed URL. I searched all over my Disqus dashboard, but found nothing related to it. I even saw on Stack Overflow that this feature was removed from Disqus.
The truth is, Disqus didn’t actually remove their RSS feeds, they just took away the links to them. Maybe they forgot how important it is to some of us.
Thanks to an old post by Laurel Green (https://forfuturereference.laurelgreen.com/post/183653531622/disqus-rss-feeds), I found out the Disqus RSS feed is pretty simple.
Disqus Forum Feed
Here’s the format for the entire forum’s comments:
https://{short-name}.disqus.com/latest.rss
Example: https://sdavidprince.disqus.com/latest.rss
Disqus Single Discussion (post) Feed
And if you want a single discussion’s RSS feed, here’s the format:
https://{short-name}.disqus.com/DISCUSSION-POST_SLUG/latest.rss
Example: https://sdavidprince.disqus.com/the-disqus-rss-feed/latest.rss
This works if your post permalink is the same as the Disqus slug. But, most times, they might not match up.
Luckily, Laurel Green shared a script that helps you confirm or grab the correct auto-generated feed. To make it work, though, you need an API key, which you can get from your Disqus dashboard.
<a href="https://placeholderurl.com" id="latestdisqus">Discussion RSS</a>
<script>
$.getJSON(‘https://disqus.com/api/3.0/threads/list.json?api_key={YOUR API KEY}&forum={FORUM NAME}&thread:link={URL OF THE DISCUSSION PAGE}’, function(data) {
document.getElementById(“latestdisqus”).href = (data.response[0].feed);
});
</script>
If it’s a recent discussion, you can go to the Community tab and find the discussion slug in the comment count URL.
Disqus Channel RSS Feed:
Format:
https://channel-CHANNEL_NAME.disqus.com/latest.rss
Example: https://channel-starwars.disqus.com/latest.rss
Disqus User RSS Feed:
Format:
https://disqus.com/USERNAME/latest.rss
Example: https://disqus.com/sdavidprince/latest.rss
Note: If the user has their activity set to private, this won’t work.
Those are the main RSS feeds. I’ll update this post if I get hold of any others.
Here is the code that shows recent disqus comments via API which i used on the notification panel.