> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Instagram audio metadata

> Look up the details of a single Instagram audio track by its id

Retrieve the details of one audio track by its `audioId`. Use this to confirm a stored id is still valid, or to show a track's title and artwork before publishing.

> [!WARNING]
>
> **Requires Instagram linked through Facebook Login.** Instagram's Audio API is only available to accounts connected via **Facebook Login**, which needs a Facebook Page connected to the Instagram account. Accounts connected with **Instagram Login** (the Ayrshare default) cannot search, look up, or attach audio, and every audio request returns `code: 514`.
>
> This is a Meta restriction, not an Ayrshare one. Meta's documentation states the Audio API "is only available on the Instagram API with Facebook Login. It is not supported on the Instagram API with Instagram Login." No permission or plan upgrade changes it.
>
> **Three things are required:**
>
> 1. An Instagram **Business** or **Creator** account
>
> 2. A **Facebook Page connected** to that Instagram account
>
> 3. Instagram linked to Ayrshare with **Instagram Login disabled**, so the Facebook Login flow is used
>
> See the [step-by-step setup guide](/docs/dashboard/connect-social-accounts/instagram#music-attach-eligibility-facebook-login-required).

## Header Parameters

**Authorization** `string` *required*

[API Key](/docs/apis/overview#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](/docs/apis/overview#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## Path Parameters

**audioId** `string` *required*

The track id, as returned by [audio search](/docs/apis/media/search-instagram-audio). An id Instagram
does not recognize returns `code: 517`.

## Response Fields

The track's fields are returned flat on the response object rather than nested. Instagram does not return every field for every track, so treat all fields except `audioId` as optional.

**status** `string`

`success` when the track was found.

**audioId** `string`

The track id, echoed back.

**title** `string`

Track title.

**displayArtist** `string`

Artist name as Instagram displays it.

**durationMs** `integer`

Track length in milliseconds.

**thumbnailUrl** `string`

Cover artwork thumbnail URL.

**audioType** `string`

Either `music` or `original_sound`.

**isAdsEligible** `boolean`

Whether the track may be used in an ad.

```json 200: Success theme={"system"}
{
  "status": "success",
  "audioId": "17901234567890123",
  "title": "Summer Nights",
  "displayArtist": "The Example Band",
  "durationMs": 32000,
  "thumbnailUrl": "https://scontent.example.com/cover.jpg",
  "audioType": "music",
  "isAdsEligible": true
}
```

```json 400: Track unavailable theme={"system"}
{
  "status": "error",
  "code": 517,
  "action": "post",
  "message": "The selected audio track is unavailable. It may be an invalid audio id, restricted in your region, or not licensed for this use. Please choose a different track using the Instagram audio search endpoint and try again.",
  "platform": "instagram"
}
```

> [!NOTE]
>
> **Availability is region-dependent.** Meta returns the same error for an id that does not exist,
> one that is not licensed in the account's region, and one that is not licensed for this use. All
> three report `517`, so a track that resolves for one account can legitimately fail for another.
> Look up an id rather than assuming a stored one still works.

## Errors

| Code | Meaning |
| - | - |
| 156 | Instagram is not linked to this profile. |
| 161 | Instagram's authorization expired or was revoked. Relink the account. |
| 239 | Instagram rejected the request for an account-level reason. |
| 258 | Instagram returned a malformed response or an unmapped failure. |
| 425 | The connection is missing a required Instagram permission. Relink and grant all permissions. |
| 435 | Instagram's rate limit was reached. Wait before retrying. |
| 514 | Instagram is linked with Instagram Login. The Audio API requires Facebook Login. |
| 516 | The `audioId` is missing or empty. |
| 517 | Instagram does not recognize the id, or the track is unavailable to this account. |

Codes 514 to 518 are described in [Instagram Reels audio errors](/docs/errors/errors-ayrshare#instagram-reels-audio-errors); the rest are in the [Ayrshare error reference](/docs/errors/errors-ayrshare).

## Next Steps

> **[Search for a track](/docs/apis/media/search-instagram-audio)**

> **[Attach the track to a Reel](/docs/apis/post/social-networks/instagram#adding-music-to-a-reel)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.