Skip to content Paweł Grzybek

Generate RSS feed for Bandcamp artists using Deno Deploy

I mentioned multiple times how much I like RSS. I use them to read my favourite blogs, follow YouTube channels, stay up to date with GitHub releases and much more. But unfortunately, not every website I use generates feeds — Bandcamp is one of them.

Speaking of favourite bloggers, Jim Nielsen recently published “Creating Custom RSS Feeds For Following Others”, which inspired me to build an RSS feed for Bandcamp. I planned to play around with Deno Deploy for a while, which seemed to be a perfect fit.

A moment later, I came up with a fully working Bandcamp RSS feed that runs on the edge across 32 network locations. Not perfect, nor bulletproof, but it works just fine to fetch the most recent releases of my favourite artists! Also, working with Deno Deploy is a breeze, and their free tier gives me up to 100 000 requests per day which should be enough for me (as long as my readers are good people, which I believe they are).

curl --url ''
import { serve } from "";
import { DOMParser } from "";

serve(async (req: Request) => {
  const url = new URL(req.url);
  const artist = url.searchParams.get("artist");

  const res = await fetch(`https://${artist}`);

  if (!artist || !res.ok) {
    return Response.json(
          "Something is broken here. Did you add an artist search param? For example:",
        status: 404,

  const html = await res.text();
  const document = new DOMParser().parseFromString(html, "text/html");
  const items = Array.from(document.querySelectorAll("#music-grid li")).map(
    (item) => {
      const title = item
        .textContent.replace(/(\r\n|\n|\r)/gm, "")
      const url = `https://${artist}${

      return {
        content_html: title,

  return Response.json({
    version: "",
    title: `Bandcamp: ${artist}`,
    home_page_url: `https://${artist}`,
    feed_url: `${artist}`,
    favicon: "",

Hopefully, you like this idea. Until next time, stay curious, my friend 🤗

Leave a comment

👆 you can use Markdown here

Your comment is awaiting moderation. Thanks!