Tutorial · Instagram · cURL, Python, Node.js, PHP, Go, Ruby

Get an Instagram song or original audio

A song or original audio. Complete code for GET /v1/instagram/audio/{audio} in six languages and both official SDKs, each tested against the documented response.

Short answer. One call returns one song or original audio by numeric id: title, artist, is_original, duration_seconds, reel_count and cover_url.

Facts checked 2 December 2026. Prices change: follow the links before you decide.

Why call it

  • Track how many reels use a campaign sound by storing reel_count on a schedule.
  • Show song details next to reels in creator-analytics and clipping apps.

The request

GET https://api.handlehaul.com/v1/instagram/audio/{audio} with your key in the X-Api-Key header. A song or original audio. A song or original audio. 1 credit. Docs: https://api.handlehaul.com/docs/instagram-audio-api

Parameters for A song or original audio
ParameterInDescription
audio requiredpathNumeric audio id.
freshquerytrue skips the cache (full price).

Code in 6 languages

Each sample is a complete program: it reads the key from HANDLEHAUL_API_KEY, waits and retries when the API answers 429 (using Retry-After), stops with the error code on anything else. The SDK versions do the retries for you.

instagram-audio.sh

# A song or original audio. --retry waits out a 429 using its Retry-After header;
# --fail exits with code 22 on any other error (drop it to read the error JSON).
curl -sS --fail --retry 3 "https://api.handlehaul.com/v1/instagram/audio/1899325052268228" \
  -H "X-Api-Key: $HANDLEHAUL_API_KEY"
Generated from the OpenAPI spec (2026-12-02); every sample was syntax-checked and run against a local mock serving the response below. Language guides: Python, Node.js, PHP, Go, Ruby, cURL.

Response

One object in data and meta with what the call cost. Example values; one audio object, as in the audio search rows, from the API docs. Lists are cut to two rows here.

200 · application/json
{
  "data": {
    "id": "1899325052268228",
    "title": "Cedar Leo",
    "artist": "Cedar River",
    "is_original": false,
    "duration_seconds": 179,
    "reel_count": 703000,
    "cover_url": "https://scontent.cdninstagram.com/…/audio-audio_trending:coffee:0.jpg"
  },
  "meta": {
    "request_id": "req_…",
    "cached": false,
    "cache_age_seconds": 0,
    "credits_charged": 1,
    "credits_remaining": 26943
  }
}

Cost, cache and limits

  • 1 credit per call. At $1.40 to $0.80 per 1,000 calls. Cache hits, failed calls and 429 answers are free; meta.credits_charged says what each call cost.
  • Cache. Answers are cached for 15 minutes. Add fresh=true to force a live call (billed).
  • Speed. Over your plan's requests-per-second limit the API answers 429 rate_limited with Retry-After; the samples wait that long and retry.
  • Testing. A kd_test_ key returns sample data in this exact shape at no cost, so you can run the code before you spend anything.

Things to know

  • audio is the numeric audio id, from a reel's audio.id or an audio URL.
  • reel_count is the number of reels that use the audio. The reels themselves come from /audio/{audio}/reels.

Next steps

Instagram audio API: questions

How do I get the number of reels using an Instagram sound?
Call GET /v1/instagram/audio/{audio} and read reel_count.
Where do I get an Instagram audio id?
From a reel's audio.id, from audio search or trending audio, or by passing an audio link to the free URL resolver.

Run it on real data

One key for Instagram and TikTok. $1.40 to $0.80 per 1,000 calls; failed calls and cache hits are free.

Want to test first? Sandbox keys are free and unlimited, with sample data in the live schema.