Instagram Music Finder by Song Name avatar

Instagram Music Finder by Song Name

Pricing

Pay per usage

Go to Apify Store
Instagram Music Finder by Song Name

Instagram Music Finder by Song Name

Searches Instagram's music library by song name and returns the audio URL. Uses Instagram's internal music search API with your session cookie.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Kabbalistic Signal

Kabbalistic Signal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

2

Monthly active users

2 days ago

Last modified

Share

Instagram Music Finder 🎵

Searches Instagram's music library by song name using Instagram's internal music search API. Returns the Instagram audio URL.

How It Works

This actor uses the same API endpoint Instagram's web app uses when you search for music. With your session cookie, it can:

  • Search the full Instagram music catalog
  • Return exact audio_id matches
  • Bypass anonymous-search login walls
  1. Open Instagram in a browser and log in: https://www.instagram.com
  2. Open Developer Tools (Cmd+Option+I on Mac, F12 on Windows)
  3. Go to Application tabCookieshttps://www.instagram.com
  4. Find these two cookies and copy their values:
    • sessionid (required) — long string like 12345%3AabcXYZ...
    • csrftoken (optional but helpful) — shorter string

⚠️ Important:

  • Keep your sessionid private — it's like a password
  • Use a secondary Instagram account for safety (don't risk your main account)
  • Cookies last ~3 months before needing refresh
  • Don't log out of that account in a browser, it invalidates the cookie

Run It

Input

{
"songNames": [
"Beat It Michael Jackson",
"Espresso Sabrina Carpenter"
],
"sessionId": "your_sessionid_value_here",
"csrfToken": "your_csrftoken_value_here",
"delayBetweenSearchesMs": 2000
}

Output

{
"songName": "Beat It Michael Jackson",
"found": true,
"bestMatch": {
"audioId": "1234567890",
"title": "Beat It",
"artist": "Michael Jackson",
"audioUrl": "https://www.instagram.com/reels/audio/1234567890/"
},
"allMatches": [...]
}

Deploy

cd ig-music-finder
apify push

Use in n8n

After deploying, replace your "Search Instagram for Sound" + "Extract Instagram Audio URL" nodes with a single HTTP Request node:

Method: POST
URL: https://api.apify.com/v2/acts/YOUR_USERNAME~ig-music-finder/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN
Body (JSON):
{
"songNames": ["{{ $json.searchQuery }}"],
"sessionId": "your_sessionid",
"csrfToken": "your_csrftoken"
}

The output gives you bestMatch.audioUrl directly — feed that into your Reels scraper.