# Instagram Audio API

> Get an Instagram song or original audio, the reels that use it, trending audio, and search sounds, as JSON. 1 credit per call.

**Get a song or original audio from Instagram Reels**, **the reels that use it**, **what is trending**, and **search sounds** by name.

```
GET https://api.klupt.io/v1/audio/{audio}
GET https://api.klupt.io/v1/audio/{audio}/reels
GET https://api.klupt.io/v1/audio/trending
GET https://api.klupt.io/v1/search/audio?q=
```

- `GET /v1/audio/{audio}`: A song or original audio
- `GET /v1/audio/{audio}/reels`: Reels that use it
- `GET /v1/audio/trending`: Trending audio
- `GET /v1/search/audio?q=`: Find audio

**Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free.

## Parameters

| Parameter | In | Description |
|---|---|---|
| `audio` | path | Numeric audio id (from a reel's `audio.id` or an audio URL). |
| `q` | query | search: a song, artist or sound name. |
| `cursor` | query | `pagination.next_cursor` from the previous page. |
| `fresh` | query | `true` skips the cache (full price). |

## Response

```json
{{SAMPLE_audio_trending}}
```

## Examples

```bash
curl "https://api.klupt.io/v1/audio/trending" -H "X-Api-Key: $KLUPT_API_KEY"
```

```python
import os, requests
r = requests.get("https://api.klupt.io/v1/audio/trending",
                 headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30)
r.raise_for_status()
for a in r.json()["data"]:
    print(a["title"], a["artist"], a["reel_count"])
```

```javascript
const res = await fetch("https://api.klupt.io/v1/audio/trending", {
  headers: { "X-Api-Key": process.env.KLUPT_API_KEY },
});
const { data: trending } = await res.json();
```

## FAQ

### How do I find trending Instagram sounds with an API?
Call `GET /v1/audio/trending`. Each audio has a title, artist, duration and `reel_count`; use `GET /v1/audio/{id}/reels` to see the reels using it.
