A Complete Guide To the Instagram Reels API

In this blog, we will explore the Instagram API for Reels, its features, and its use cases, and enlighten you on how to post Reels videos to Instagram using the Instagram API. 

Table of Content

Social media users cannot get enough of video content, which is probably why Instagram Reels is the fastest-growing feature worldwide. Search interest for Reels videos peaked around the first week of 2022, with users actively searching for Reels and wanting to educate themselves about its features. Brands like Nike even garnered 4.6 million views using Reels videos. This served as a signal for both creators and marketers to adopt Reels as a vital part of their content-creation strategies.

However, when it comes to growing on social media, consistency is the name of the game. In light of this, the need for an API allowing users to post, share, and extract insights from Reels videos became an imperative. Creators and marketers needed a way to integrate third-party software with the Instagram Graph API to reap the benefits of posting Instagram Reels videos — and the Instagram platform has finally expanded its API to support the Reels function. 

Related Read:

In this blog, we will explore the Instagram API for Reels, its features, and its use cases, and enlighten you on how to post Reels videos to Instagram using the Instagram API. 

What is the Instagram Reels API?

The Instagram Reels API is an extension of the Graph API that helps creators and brands manage their presence on Instagram. It was launched on June 28, 2022, and access was initially rolled out to 25% of Instagram user accounts. The feature of Instagram API for reels was finally made available to everyone by July 6, 2022. 

The Instagram API for Reels was a long-standing demand of the Meta Developer community. It enhanced the Graph API's capabilities, which influencers and businesses used to extract insights and interact with followers. Developers can use the Instagram Reels API to publish content, track engagement metrics, moderate comments, search hashtags, discover business mentions, and much more.

This API enhancement will allow developers to schedule Reels and obtain the social engagement stats on Reels videos. It also enables them to publish Reels on Instagram Business accounts. Developers can even respond to comments, delete them, hide or reveal them, and allow or deactivate comments on Reels using the APIs. Additionally, they can see Reels where an Instagram Business or Creator's pseudonym has been discussed or tagged.

Now, let's check out some features of the Instagram Reels API.

Features of Instagram Reels API

Here are some of the common features of Instagram Reels API:

1. Fetching Reel Content: 

You can fetch reel content from a particular Instagram profile using the field query string parameter, media_type, and media_url. The first specifies the media type being fetched; here, it will be REEL. The second highlights the reel's URL link. You need to have the user's access token and relevant permissions for the purpose.

2. Parameters for Reel Content: 

Here are the specifications for Reels content on the Instagram platform:

  • Container: MOV or MP4 (MPEG-4 Part 14), no edit lists, moov atom at the front of the file
  • Maximum frame rate: 23–60 FPS
  • File size: 100MB maximum
  • Maximum columns (horizontal pixels): 1920
  • The required aspect ratio is between 0.01:1 and 10:1, but 9:16 is the recommended ratio to avoid cropping or blank spaces.
  • Audio codec: AAC, 48khz sample rate maximum, 1 or 2 channels (mono or stereo)
  • Video codec: HEVC or H264, progressive scan, closed GOP, 4:2:0 chroma sub-sampling
  • Video bitrate: VBR, 5Mbps maximum
  • Audio bitrate: 128kbps

For a reel thumbnail photo, here are the requirements:

  • Format: JPEG
  • Maximum file size: 8 MB.
  • Color Space: sRGB. Other color spaces can be converted to sRGB for images in Reels videos.
  • Aspect ratio: To prevent cropping or empty space, it is advised to use a 9:16 ratio. If the image does not have the proper aspect ratio, it is cropped, and the middlemost 9:16 rectangle is used as the reel's cover photo. Similarly, when you share a reel, the middlemost 1:1 square of the cover shot is used for your feed post.

3. Limits Specifications for Reels: 

Here are the limits to Instagram Reels API:

  • Reels cannot be shown in album carousels.
  • Account privacy settings are respected upon publication. If "allow remixing" is enabled, published reels will have remixing enabled upon publication, but remixing can be turned off on published reels manually through the Instagram app.

4. Posting to Reels Through the API: 

Recent updates indicate that the maximum Reels video length that can be posted using the Graph API is 90 seconds. However, some accounts still face the 60-second limit.

Related Read:

5. Commenting and Engagement Features:

Using the API, you can incorporate commenting, sharing, and liking functionalities to increase user engagement with Instagram Reels content. This encourages user interaction and engagement and provides information about what is and is not working. 

6. User Profile and Reels Insights: 

The API endpoint, GET /{ig-media-id}/insights, allows you to access social interaction metrics on all Instagram media, including Reels. This feature does not work for accounts with less than 1,000 followers, and the API only informs on organic engagement metrics, which do not include user interactions with ads.

7. Hashtag Search: 

The API endpoint, GET /{ig-hashtag-id}, can get you data about a certain hashtag, while the GET /{ig-hashtag-id}/top_media and the GET /{ig-hashtag-id}/recent_media requests help you gain insights into the top-performing and must recently-updated Instagram posts with the specific hashtag. This feature allows developers to supply marketers with data that they can use to optimize content for user experience.

Next, we will explore some common use cases of the Instagram Reels API.

Use Cases of the Instagram Reels API

Before we get into the use cases of Reels APIs, you need to enable Instagram Graph API on your third-party application. Once you have done that, you can then work out which functionalities you need the Reels API for.

To make the Graph API work for Instagram Reels, the Instagram POST endpoint POST/{ig-user-id}/media has been configured to accept media_type REELS. This marks the video as a Reel, and you can then use the Reels API for the use cases highlighted below:

Boost Instagram Influencer Success with Phyllo API. Learn More

1. Fetching the Latest Reels From a Profile

To get started, you need the user’s Instagram access token and authorization to access their content, which you can get using the Meta guide for access tokens and permissions. Once the user authorizes access, you will need to query the instagram_graph_user_profile and the instagram_graph_media_profile permissions. Following this, you have to query the media node using the command: GET /me/media?fields={fields}&access_token={access-token}. Once you replace {media-id} with the ID of the Reel video you want to query, the {fields} with a comma-separated list of Media fields you want to be returned, and {access-token} with the user’s access token, you can successfully fetch your Reel video.

Here is a sample request:

Here is the sample response:

2. Posting a Reel with Custom Metadata

You can use the IG User Media Publish API, POST /{ig-user-id}/media_publish, to post your Reel video with custom metadata. 

Here is the sample request:

Curl -i -X POST \

"https://graph.facebook.com/v18.0/90010177253934/
media_publish?creation_id=17969578066508312&access_token=EAAOc
"

Here is the sample response:

{

  "id": "90010778325754"

}

If you are successful, the Reels API will return an IG Media ID.

3. Analyzing Engagement on a Specific Reel

To use the Instagram Graph API for Reels and uncover social engagement metrics (such as likes, comments, and shares), you can use the GET /{ig-media-id}/insights request.

Here is a sample request:

Here is the sample response:

How To Post a Reels Video To Instagram Using the Instagram Graph API?

One of the major reasons the Instagram API for Reels was created was to enable creators and businesses to consistently post Reels videos to Instagram, possibly using third-party applications. Here is how you can do it:

You need to use the POST endpoint POST/{ig-user-id}/media and set the media_type to REELS. It is not very different from posting a normal video on Instagram, and the code is as illustrated below:

Besides marking the video you publish as a Reel on Instagram, you must also set the share_to_feed parameter as true if you want the video to appear in your Instagram feed and under your Reels tab. You would, however, need to meet Meta’s requirements for video length, duration, and encoding. Similar to videos, you also have the thumb_offset field. This lets you choose which frame in the video to use as the thumbnail's location (in milliseconds).

Developers can easily invoke the REST API and choose any programming language, such as PHP, JavaScript, Ruby, Python, or C# to make these calls. Here is an example using JavaScript language and the fetch command to post a reel to Instagram.

const access_token = "Js82ks92jald"; // The access token given from FB 

const instagram_user_id = "12345"; // The IG user's ID 

const reelUrl = "https://www.website.com/reel.mp4"; 

const caption = "This is the best real ever #Reels4Real"; 

const postUrl = `https://graph.facebook.com/${instagram_user_id}/media?

video_url=${encodeURIComponent(reelUrl)}

&caption=${encodeURIComponent(caption)}&access_

token=${access_token}&media_type=REELS&share_to_feed=true&thumb_offset=2000`

const postOptions = { 

method: "POST", 

headers: { 

"Content-Type": "application/JSON," 

}, 

}; 

fetch(postUrl, postOptions) 

.then((res) => res.json()) 

.then(json => console.log(json)) 

.catch(console.error);

This JavaScript code issues a fetch command to the Facebook Graph media endpoint for your specific (Instagram user ID). It then enables you to post your Reel to Instagram via the Graph API.

How To Use the Instagram Reels API Integration with Phyllo?

Phyllo offers creator data solutions to enable users to access account data directly from the source platforms using their universal API. You can use their proprietary API to:

  • Gain access to extensive yet comprehensive creator data, including profile information, content feeds, audience demographics, engagement metrics, and Instagram Stories and Reels;  
  • ensure creators that the information being extracted from their accounts is being done ethically and will not be misused, promoting transparency and consent;
  • enable cross-platform integration with other platforms like Facebook, YouTube, etc.

Phyllo is one of the best options for retrieving Instagram account data about Reels and much more, owing to the following reasons:

  • Phyllo Connect SDK: It informs creators about Phyllo's policies and walks them through the connection process. Users can also disconnect their connected accounts whenever they want to, thus giving them the right to consent and promoting transparency;
  • Seamless Instagram Login: It guides Instagram creators through the process of linking their account with their Facebook page with zero hassles; 
  • Data Accuracy: Unlike other third-party aggregators, Phyllo provides access to creator data directly from the source, making sure that the information is updated and of premium quality;
  • Quicker Data Refresh Frequencies: It ensures that all creator data is refreshed in 24 hours or earlier. This provides developers with access to recent data for their purposes.
  • Webhooks: It notifies developers of changes in creator data for real-time accuracy. This further upholds the precision and authenticity of the insights. 

Businesses can, therefore, use Phyllo to acquire detailed information about various influencers, including audience demographics and post-, story-, and now reel-level engagement rates. This makes it easier to select the ideal influencers by hand for a marketing campaign and to monitor their effectiveness with up-to-date and accurate data. 

Experts at Phyllo can assist developers in adjusting to new API modifications without sacrificing the functionality of their apps. Set up a free demo with Phyllo right now to learn more about how to get the most out of your using the Instagram Graph API for posting Instagram Reels.

Download our detailed guide on how to leverage Instagram Stories for influencer marketing

Download Now
Sreshtha Das
Content Lead @ Phyllo

Be the first to get insights and updates from Phyllo. Subscribe to our blog.

Ready to get started?

Sign up to get API keys or request us for a demo