Skip to content

FindThisSong is an Instagram bot that identifies songs used in Reels.

License

Notifications You must be signed in to change notification settings

simonkoeck/findthissong

Repository files navigation

🎵 FindThisSong

FindThisSong is an Instagram bot that identifies songs used in Reels — just send the Reel to @findthissong on Instagram, and the bot will detect the track for you within seconds.

🚀 Getting Started

FindThisSong automates song recognition for Instagram Reels using Meta’s webhook system, a BullMQ-based task queue, and a Python audio detector powered by shazamio.

The project runs under the Instagram username @findthissong @findthissong and deployed from a single Nx monorepo.

🧩 Architecture

/apps
  ├── api               → Express app handling Instagram webhooks
  ├── task-processor    → BullMQ worker processing queued detection jobs
/ig                     → Instagram utilities (Graph API, DM/reply, media download)
detect.py               → Python song detection script (shazamio)

Workflow

  1. Webhook event

Instagram calls GET <API_URL>/webhook when someone sends a messageto the bot.

  1. Queueing

The API then validates if the message was a DM, and if so, adds the job to the BullMQ queue.

  1. Processing

The task-processor worker pulls the job from the queue, downloads the reel, and extracts the audio.

  1. Detection

The detect.py script is called with the audio file as an argument, and the output is parsed to identify the song.

  1. Reply

If the song is identified, the bot replies with the song name, artist and an attached image.

⚙️ Tech Stack

Component Technology
API Layer Node.js + Express
Queue BullMQ + Redis
Song Detection Python + shazamio
Audio Extraction FFmpeg
Monorepo Nx
Deployment Docker and Nixpacks

🧰 Local Development

  1. Prerequisites
  • Node.js 20+
  • Python 3.9+
  • Redis 7+
  • FFmpeg in your $PATH
  • Working Instagram Account with Instagram Graph API access (see developers.facebook.com)
  • Some kind of tunnel for webhooks (ngrok, localtunnel, etc.)
  1. Fork & Clone & Install
git clone https://github.com/yourusername/findthissong.git
cd findthissong
npm install
  1. Environment Variables

Create a .env file in the root directory.

cp .env.example .env
  1. Run Services
nx serve api
nx serve task-processor

🛡️ Privacy & Data Policy

FindThisSong only processes media sent directly to the bot.

No user data or media files are stored permanently — temporary files are deleted after processing.

📬 Contact

Reach out to me on Twitter or Email.

🖤 License

MIT License — feel free to fork, improve, and credit..

About

FindThisSong is an Instagram bot that identifies songs used in Reels.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published