> ## 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.

# Instagram-Audio-Metadaten abrufen

> Rufen Sie einen Instagram-Audiotrack per audioId mit Titel, Künstler, Dauer und Artwork ab. Erfordert Verknüpfung über Facebook Login, sonst Code 514.

Rufen Sie die Details eines einzelnen Audiotracks anhand seiner `audioId` ab. Verwenden Sie dies, um zu bestätigen, dass eine gespeicherte ID noch gültig ist, oder um Titel und Artwork eines Tracks vor dem Veröffentlichen anzuzeigen.

> [!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](https://www.ayrshare.com/docs/dashboard/connect-social-accounts/instagram.md#music-attach-eligibility-facebook-login-required).

## Header-Parameter

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

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

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## Pfadparameter

**audioId** `string` *required*

Die Track-ID, wie sie von der [Audio-Suche](https://www.ayrshare.com/docs/apis/media/search-instagram-audio.md) zurückgegeben wird. Eine ID, die Instagram
nicht erkennt, gibt `code: 517` zurück.

## Antwortfelder

Die Felder des Tracks werden flach auf dem Antwortobjekt zurückgegeben und nicht verschachtelt. Instagram gibt nicht für jeden Track jedes Feld zurück; behandeln Sie daher alle Felder außer `audioId` als optional.

**status** `string`

`success`, wenn der Track gefunden wurde.

**audioId** `string`

Die Track-ID, als Echo zurückgegeben.

**title** `string`

Track-Titel.

**displayArtist** `string`

Künstlername, wie Instagram ihn anzeigt.

**durationMs** `integer`

Track-Länge in Millisekunden.

**thumbnailUrl** `string`

Thumbnail-URL des Cover-Artworks.

**audioType** `string`

Entweder `music` oder `original_sound`.

**isAdsEligible** `boolean`

Ob der Track in einer Anzeige verwendet werden darf.

```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]
>
> **Die Verfügbarkeit ist regionsabhängig.** Meta gibt denselben Fehler für eine ID zurück, die nicht existiert,
> eine, die in der Region des Kontos nicht lizenziert ist, und eine, die nicht für diese Nutzung lizenziert ist. Alle
> drei melden `517`, sodass ein Track, der für ein Konto aufgelöst wird, für ein anderes berechtigterweise fehlschlagen kann.
> Schlagen Sie eine ID nach, statt anzunehmen, dass eine gespeicherte noch funktioniert.

## Fehler

| Code | Bedeutung |
| - | - |
| 156 | Instagram ist nicht mit diesem Profil verknüpft. |
| 161 | Instagrams Autorisierung ist abgelaufen oder wurde widerrufen. Verknüpfen Sie das Konto erneut. |
| 239 | Instagram hat die Anfrage aus einem kontobezogenen Grund abgelehnt. |
| 258 | Instagram hat eine fehlerhafte Antwort oder einen nicht zugeordneten Fehler zurückgegeben. |
| 425 | Der Verbindung fehlt eine erforderliche Instagram-Berechtigung. Verknüpfen Sie erneut und erteilen Sie alle Berechtigungen. |
| 435 | Instagrams Ratenlimit wurde erreicht. Warten Sie vor dem erneuten Versuch. |
| 514 | Instagram ist mit Instagram Login verknüpft. Die Audio API erfordert Facebook Login. |
| 516 | Die `audioId` fehlt oder ist leer. |
| 517 | Instagram erkennt die ID nicht, oder der Track ist für dieses Konto nicht verfügbar. |

Die Codes 514 bis 518 sind unter [Instagram-Reels-Audio-Fehler](https://www.ayrshare.com/docs/errors/errors-ayrshare.md#instagram-reels-audio-errors) beschrieben; die übrigen finden Sie in der [Ayrshare-Fehlerreferenz](https://www.ayrshare.com/docs/errors/errors-ayrshare.md).

## Nächste Schritte

> [card] [Nach einem Track suchen](https://www.ayrshare.com/docs/apis/media/search-instagram-audio.md)

> [card] [Den Track an einen Reel anhängen](https://www.ayrshare.com/docs/apis/post/social-networks/instagram.md#adding-music-to-a-reel)


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