> ## 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 खोजें

> Reel में अटैच करने के लिए track ढूँढने हेतु Instagram के लाइसेंस-प्राप्त audio catalog में खोजें

export const InstagramAudioNotice = () => <Warning>
  <strong>Requires Instagram linked through Facebook Login.</strong> Instagram's Audio API is only available to accounts connected via <strong>Facebook Login</strong>, which needs a Facebook Page connected to the Instagram account. Accounts connected with <strong>Instagram Login</strong> (the Ayrshare default) cannot search, look up, or attach audio, and every audio request returns <code>code: 514</code>.
  <br /><br />
  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.
  <br /><br />
  <strong>Three things are required:</strong>
  <br />
  1. An Instagram <strong>Business</strong> or <strong>Creator</strong> account<br />
  2. A <strong>Facebook Page connected</strong> to that Instagram account<br />
  3. Instagram linked to Ayrshare with <strong>Instagram Login disabled</strong>, so the Facebook Login flow is used
  <br /><br />
  See the <a href="/docs/dashboard/connect-social-accounts/instagram#music-attach-eligibility-facebook-login-required">step-by-step setup guide</a>.
</Warning>;

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "business") {
      displayPlans = ["Launch", "Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Launch", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

export const HeaderAPI = ({noProfileKey, profileKeyRequired}) => <>
    <ParamField header="Authorization" type="string" required>
      <a href="/docs/apis/overview#authorization">API Key</a> of the Primary Profile.
      <br />
      <br />
      Format: <code>Authorization: Bearer API_KEY</code>
    </ParamField>
    {!noProfileKey && (profileKeyRequired ? <ParamField header="Profile-Key" type="string" required>
          <a href="/docs/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField> : <ParamField header="Profile-Key" type="string">
          <a href="/docs/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField>)}
  </>;

<PlansAvailable plans={["premium"]} maxPackRequired={false} />

Instagram के audio catalog में keyword से खोजें। Reel publish करते समय track अटैच करने के लिए लौटाए गए `audioId` का उपयोग [`instagramOptions.audioConfiguration`](/docs/apis/post/social-networks/instagram#adding-music-to-a-reel) के साथ करें।

<InstagramAudioNotice />

## Header Parameters

<HeaderAPI />

## Query Parameters

<ParamField query="query" type="string" required>
  खोजने के लिए keyword, जैसे artist या track का नाम। खाली या केवल-whitespace मान `code: 101` लौटाता है।
</ParamField>

<ParamField query="audioType" type="string" default="music">
  कौन-सा catalog खोजना है। या तो लाइसेंस-प्राप्त commercial tracks के लिए `music` या अन्य creators की
  Reels से लिए गए audio के लिए `original_sound`। कोई भी अन्य मान `code: 101` लौटाता है।
</ParamField>

<ParamField query="limit" type="integer">
  लौटाए जाने वाले tracks की अधिकतम संख्या, `1` से `100` तक। Non-integer या सीमा से बाहर के मान
  `code: 101` लौटाते हैं। छोड़े जाने पर, Instagram का अपना डिफ़ॉल्ट लागू होता है।
</ParamField>

## Response Fields

Instagram हर track के लिए हर फ़ील्ड नहीं लौटाता, इसलिए `audioId` को छोड़कर सभी track फ़ील्ड को वैकल्पिक मानें।

<ResponseField name="status" type="string">
  `success` जब खोज पूरी हो गई। खाली catalog match भी success ही है।
</ResponseField>

<ResponseField name="query" type="string">
  खोजा गया keyword, वापस echo किया गया।
</ResponseField>

<ResponseField name="audio" type="array">
  मेल खाने वाले tracks। खाली array का अर्थ है कि खोज चली और कुछ भी मेल नहीं खाया।

  <Expandable title="Track फ़ील्ड">
    <ResponseField name="audioId" type="string">
      वह id जिसे Reel publish करते समय `audioConfiguration.audioId` के रूप में पास करना है।
    </ResponseField>

    <ResponseField name="title" type="string">Track का शीर्षक।</ResponseField>
    <ResponseField name="displayArtist" type="string">Artist का नाम, जैसा Instagram दिखाता है।</ResponseField>
    <ResponseField name="durationMs" type="integer">मिलीसेकंड में track की लंबाई।</ResponseField>
    <ResponseField name="thumbnailUrl" type="string">Cover artwork thumbnail URL।</ResponseField>
    <ResponseField name="audioType" type="string">या तो `music` या `original_sound`।</ResponseField>

    <ResponseField name="isAdsEligible" type="boolean">
      क्या track किसी ad में उपयोग किया जा सकता है। लाइसेंस-प्राप्त music अक्सर ads के लिए अनुपलब्ध होता है,
      भले ही वह organic Reel के लिए उपलब्ध हो।
    </ResponseField>
  </Expandable>
</ResponseField>

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

  ```json 200: No matches theme={"system"}
  {
    "status": "success",
    "query": "asdfghjkl",
    "audio": []
  }
  ```

  ```json 400: Instagram Login account theme={"system"}
  {
    "status": "error",
    "code": 514,
    "action": "post",
    "message": "Adding music to a Reel requires an Instagram account connected via Facebook Login. This profile is connected with Instagram Login, which Meta does not permit for music attach, search, or lookup. Please relink Instagram using Facebook Login and grant the instagram_content_publish permission, then try again.",
    "platform": "instagram"
  }
  ```
</ResponseExample>

## त्रुटियाँ

| Code | अर्थ |
| - | - |
| 101 | गुम या खाली `query`, अपरिचित `audioType`, या 1 से 100 के बाहर का `limit`। |
| 156 | Instagram इस profile से लिंक नहीं है। |
| 161 | Instagram का authorization समाप्त हो गया या रद्द कर दिया गया। खाते को रिलिंक करें। |
| 239 | Instagram ने account-स्तरीय कारण से अनुरोध अस्वीकार किया, जिसमें अनुपलब्ध track शामिल है। खोज पर यह 239 रिपोर्ट करता है, न कि वह 517 जो लुकअप एंडपॉइंट लौटाता है। |
| 258 | Instagram ने malformed प्रतिक्रिया या unmapped विफलता लौटाई। |
| 425 | कनेक्शन में एक आवश्यक Instagram permission गुम है। रिलिंक करें और सभी permissions दें। |
| 435 | Instagram की rate limit तक पहुँच गई। पुनः प्रयास से पहले प्रतीक्षा करें। |
| 514 | Instagram, Instagram Login से लिंक है। Audio API के लिए Facebook Login आवश्यक है। |

Code 514 से 518 का वर्णन [Instagram Reels audio त्रुटियों](/docs/errors/errors-ayrshare#instagram-reels-audio-errors) में किया गया है; बाकी [Ayrshare त्रुटि संदर्भ](/docs/errors/errors-ayrshare) में हैं।

## अगले चरण

<Card title="Track को Reel में अटैच करें" icon="music" href="/docs/apis/post/social-networks/instagram#adding-music-to-a-reel" horizontal />

<Card title="किसी एक track को लुकअप करें" icon="magnifying-glass" href="/docs/apis/media/get-instagram-audio" horizontal />


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