Table of Contents
19 min read

Understanding the Instagram API: A Comprehensive Guide

Published 12 October 2023
Last updated 10 May 2024
Understanding the Instagram API: A Comprehensive Guide

Instagram isn’t just about sharing pictures anymore; it’s a global hub where businesses and professionals connect with their communities, especially with the API on Instagram.

Through the Instagram API, you can track hashtags, assess your Instagram Business account’s performance, gather mentions to understand what your audience thinks of your brand, embed Instagram photos on your website, seamlessly integrate it with your software, and much more.

So, how does this magic happen, how can you access it, and most importantly, how can you use it best? We’ve got you covered in this guide! Let’s dive in!

What is Instagram API?

According to Meta, the parent company of Instagram,

the Instagram API (Application Programming Interface) is a set of protocols that allows apps to interact with Instagram Professional accounts, which include both Business and Creator accounts.

It’s like a bridge that lets different apps and services talk to Instagram and access its features and data. The Instagram API opens up a world of possibilities for businesses and developers.

It enables them to post photos and videos, track user engagement, analyze data, and interact with Instagram users, all from their applications or websites. It’s a tool that helps businesses connect with Instagram’s platform in creative and valuable ways.

Instagram Graph API

Instagram Graph API is an API designed for businesses and creators who need to manage their presence on Instagram. And it’s built on the Facebook Graph API.

It allows you to get and publish media, manage and reply to comments on media, identify media where they have been @mentioned by other Instagram users, find hashtagged media, and get basic metadata and metrics about other Instagram Businesses and Creators.

How does Instagram Graph API Work?

The Instagram Graph API allows applications to interact with the Instagram platform programmatically. Here’s a step-by-step breakdown of how it works:

  1. Setup: To use the Instagram Graph API, you must first register your application with Facebook and set up an Instagram Business Account or Creator Account connected to a Facebook Page.
  2. Authentication: Once your app is set up, you must use the OAuth 2.0 protocol to authenticate your application and receive an access token. This access token is used in all requests to the API to identify your app.
  3. Making Requests: With your access token, you can now make HTTP requests to the API. Each endpoint in the API corresponds to a different type of data or action. For example, there are endpoints for getting a user’s media, posting a comment on a media object, and gaining insights about a user’s account.
  4. Handling Responses: The API will respond to your requests with the requested data or error messages if something goes wrong. You’ll need to take these responses in your application code.
  5. Rate Limiting: The Instagram Graph API uses rate limiting to control how many requests each app can make in a given period. You’ll need to design your app to stay within these limits.
  6. Webhooks: The Instagram Graph API also supports webhooks, which allow your app to receive real-time updates about specific events on Instagram, like when a user posts a new media object.

Remember that this is only an overview, and the actual implementation can get quite complex depending on your specific use case. For more detailed information, you can refer to the official documentation.

Key Features

Instagram Graph API provides an array of features that empower businesses and creators:

  • Media Management: Users can retrieve, post, and manage their media (photos and videos) on Instagram.
  • Interaction: It allows users to manage and reply to comments on their media, identify media where they’ve been mentioned, and find hashtagged media.
  • Insights: Users can access basic metadata and metrics about other Instagram businesses and creators, helping them gauge their performance.

How to Get Instagram Graph API

  1. Connect Instagram Account: Ensure you have an Instagram Business or Creator Account. Link it to a Facebook Page. Create a Facebook Developer account and set up a Facebook App with basic settings.
  2. Configure Facebook Login: Add Facebook Login to your app. You can use default settings or specify a redirect_uri if setting up Facebook Login manually.
  3. Implement Facebook Login: Follow Facebook Login documentation for your platform. Request permissions for “instagram_basic” and “pages_show_list.”
  4. Get User Access Token: Trigger your app’s Facebook Login and sign in to your Facebook Developer account. Grant necessary permissions and capture the User access token provided.
  5. Fetch User’s Pages: Use your access token to query the GET /me/accounts endpoint or GET /{user-id}/accounts. Capture the Page ID of the connected Facebook Page.
  6. Retrieve Page’s Instagram Account: Utilize the Page ID to query GET /{page-id}?fields=instagram_business_account. Capture the Instagram Business or Creator Account’s ID.
  7. Access Instagram Media: With the Instagram Account ID, query GET /{ig-user-id}/media to retrieve Instagram Media object IDs associated with the account.
  8. Start Using Instagram Graph API: You’re ready to utilize the Instagram Graph API for various purposes using the obtained access token.

For more details, you can access the Instagram Graph API documentation.

Instagram Basic Display API

The Instagram Basic Display API is an HTTP-based API that enables your app to let people import their media from Instagram, connect their Instagram profiles, and more. It can be used to access any type of Instagram account but only provides read access to basic data.

While it allows users to display Instagram content within their applications or websites, it lacks advanced features like content publishing, comment moderation, and in-depth analytics.

That’s why the Instagram Basic Display API is suitable for applications focused on showcasing Instagram content in a simplified manner.

How does Instagram Basic Display API Work?

Here’s a brief overview of how Instagram Basic Display API works:

  1. Access Tokens: The API uses Instagram User Access Tokens to handle authentication. These tokens conform to the OAuth 2.0 protocol and are unique to the app and user pair. They can be short-lived (valid for 1 hour) or long-lived (valid for 60 days). Short-lived tokens can be exchanged for long-lived tokens.
  2. Authorization Codes: Your app can get Authorization Codes and permissions from app users through the Authorization Window. These codes can be exchanged for Instagram User Access Tokens.
  3. Data Access: The API provides read access to basic data from any type of Instagram account. It lets your app get an Instagram user’s profile, images, videos, and albums.

For more detailed information, you can refer to the official documentation.

Key Features

Instagram Basic Display API offers specific functionalities for its user base:

  • Profile Information: Users can access primary profile data, such as username, profile picture, and bio.
  • Media Access: It allows users to retrieve their media, including images, videos, and albums.

How to Get Instagram Basic Display API

  1. Prepare Requirements: Have a Facebook Developer Account, Instagram account with media, and a public website.
  2. Create Facebook App: Visit, create an app (Consumer or None type).
  3. Configure Instagram Display: Add Instagram Basic Display to your app, providing the website URL.
  4. Add Test User: In Roles, add your Instagram username as a Tester and accept the invitation.
  5. Authenticate User: Build the Authorization Window URL and authenticate your Instagram test user.
  6. Get Access Token: Use cURL to exchange the code for a short-lived Instagram User Access Token.
  7. Query User Info: Use cURL to retrieve user ID and username.
  8. Use Instagram API: Start using Instagram Basic Display API with the obtained access token.

For more details, you can access the Instagram Basic Display API documentation.

Messenger API for Instagram

The Messenger API for Instagram is a powerful tool that enables businesses to use API to seamlessly integrate Instagram messaging with their applications or customer support systems.

By integrating with existing tools and data, the Messenger API for Instagram makes managing high volumes of customer messages easier, helping to turn conversations into business outcomes.

How does Messenger API work?

The Messenger API is an intermediary between your business and Facebook’s servers. It makes it possible for you to use a third-party app to serve as a bridge between your agents and your business presence on Messenger.

Here’s a breakdown of how it works:

  1. Messaging Integration: When a user sends a message to an Instagram Professional account, the message is delivered to the Instagram Inbox. Simultaneously, a webhook notification is sent to the business’s server.
  2. Server Interaction: The business’s messaging application or server receives this webhook notification. It has 24 hours to respond to the message directly.
  3. Escalation: If more time is needed, businesses can add a tag to their response to extend the conversation beyond the standard 24-hour messaging window, allowing a human agent to respond later.

Key features

The Messenger API for Instagram is packed with features designed to streamline customer interactions and improve the overall experience. Here are some of its functions:

  • Message Handling: Businesses can receive and respond to customer messages, including text, media files, and stories, all within their messaging platform.
  • Private Replies: Businesses can send private replies to users who have published public posts on their Instagram accounts or commented on their posts.
  • Inbox Organization: Instagram Professional accounts have an inbox with different categories, such as Primary, General, and Requests. Businesses can control notifications and manage messages in these folders.
  • Human-Agent Escalation: The API supports escalation paths to human agents, ensuring that real people can handle complex issues or inquiries.
  • Automated Experiences: Automated messaging experiences can be provided to users, with clear disclosure when interacting with automated services, in compliance with legal requirements.
  • Integration: The API can be integrated with CRM and Omnichannel to streamline communication, enhance engagement, and maintain a consistent brand experience across channels.

For more details, you can access the Messenger API for Instagram documentation.

How to Get Instagram API in 4 Easy Steps

Getting the Instagram API is not always difficult. An easy way to get it is by partnering with an official partner of the Messenger API for Instagram that connects your business with Instagram’s API services, such as Mekari Qontak.

Here’s an easy way to get the Instagram API in four steps:

Step 1. Contact Official Partner of Messenger API – Qontak

During this process, you will register your Instagram account with Mekari Qontak. This registration establishes you as an Instagram API user, enabling you to access and utilize Instagram’s data and features for your business needs.

You will also have the convenience of omnichannel, which can integrate all your business channels, including WhatsApp, Facebook, Telegram, email, and others into one integrated platform.

Step 2. Verify Your Facebook Business Manager Account

Before proceeding, it’s important to verify your Facebook Business Manager Account. Verification establishes your business’s authenticity and is often required for using Instagram’s API services.

Verification typically involves providing official business documents to Facebook for confirmation. Once your Facebook Business Manager Account is verified, you’ll be ready to proceed with the integration.

Step 3. Connect Your Facebook Page and Instagram Business Account

The next step involves linking your Facebook Page with your Instagram Business Account. This connection is pivotal, as it facilitates the seamless exchange of data and functionalities between the two platforms.

Through this linkage, you enable your Facebook Page to manage and access Instagram-related information, which is especially valuable for businesses looking to enhance their social media presence.

Step 4. Set Up Instagram API with Qontak

At this stage, you will receive support and guidance from Mekari Qontak in setting up the Instagram API. Qontak’s expertise and resources will assist you in configuring and optimizing the API to meet your specific business needs.

Qontak will provide you with the necessary instructions, tools, and access to Instagram’s API services. We will ensure your integration is seamless and aligned with your business objectives.

Instagram API: Best Practices

So, what should you do after getting access to the Instagram API? Some may still be confused about how to use the Instagram API.

But you don’t need to worry because you can try several strategies to maximize the use of the API on Instagram below.

  1. Customer Support Management: Use the Instagram API to efficiently handle all Instagram messages from a centralized dashboard, allowing you to manage customer inquiries alongside other communication channels.
  2. Auto-Response with ‘Away Messages’: Configure automatic responses, known as ‘Away messages,’ for instances when your support agents are offline. This ensures that customers always receive a prompt acknowledgment, even if it’s to inform them when they can expect a detailed reply.
  3. Effective Conversation Routing: Implement conversation routing mechanisms to direct customer queries to the most appropriate team members. This ensures that the right person on your team addresses each inquiry.
  4. Chatbot Automation: Set up chatbot automation to assist customers in tasks such as self-checkout, order tracking, and providing answers to common questions. This streamlines processes and enhances the customer experience.
  5. Integration with CRM Software: Seamlessly integrate Instagram customer data with your Customer Relationship Management (CRM) software. This integration consolidates customer information into a single location, simplifying data management and enhancing customer relationship management.
  6. Retrieve Customer Messages: Utilize the API to retrieve customer messages to your Instagram Professional Inbox. This feature ensures that you can access and review customer inquiries efficiently.
  7. Respond to Customer Messages: Leverage the API to receive and promptly respond to customer messages, whether they contain text, media files, stories, or other content. This capability facilitates real-time engagement with your audience.
  8. Send Private Replies: With the API, you can send private replies to individuals who have posted publicly on your Instagram account or commented on your posts. This private communication ensures a more personalized interaction when needed.
  9. Efficient Conversation Management: Instagram Professional accounts offer a dedicated messaging inbox that empowers you to manage notifications and organize messages effectively. This feature aids in maintaining a structured and responsive communication process.

Instagram API Endpoints

Instagram API endpoints are the specific paths or URLs to which your application can request access, create, update, or delete Instagram data.

Here are some of the key endpoints for the Instagram APIs:

1. Access Tokens

2. Authorization Window

3. Media

4. Users

Notes: these are just a few examples of the available endpoints. The actual endpoints you use will depend on what data you need to access and what actions you need to perform with your app. For more detailed information, you can refer to the official documentation.

Rate Limits for Instagram API

A rate limit restricts the number of API calls an application or user can make within a specific timeframe.

The application or user may be throttled when this limit is exceeded or particular CPU or total time limits are surpassed. Throttling means that API requests made by a throttled user or app will fail.

Types of Rate Limits

  1. Platform Rate Limits: These apply to Graph API and Instagram Basic Display API requests and are based on individual application or user levels, depending on the type of token used in the request.
  2. Business Use Case (BUC) Rate Limits: These apply to Marketing API and Instagram Graph API requests. Like Platform Rate Limits, they can also apply to Pages API requests, depending on the token used.

Rate Limit Tracking

Real-time rate limit usage statistics are provided in the headers of most API responses once a sufficient number of calls have been made to an endpoint. You can also monitor Platform Rate Limit usage statistics in the App Dashboard.

Once a rate limit is reached, any subsequent requests made by your app will fail, and the API will return an error code until enough time has passed for the call count to drop below the limit.

Platform Rate Limits for Applications

  • Graph API requests with an application access token are counted against the app’s rate limit.
  • The call count for an app is determined by multiplying 200 by the number of unique daily active users.
  • It’s important to note that this limit is not applied per user but limits your app’s total calls.
  • Users can make more than 200 calls per hour using your app if the total calls from your app do not exceed the app’s maximum.

Platform Rate Limits for Users

  • Graph API requests made with a user access token are counted against that specific user’s call count.
  • A user’s call count is the number of calls they can make during a rolling one-hour window.
  • Users’ actual call count values are not disclosed due to privacy concerns.
  • A user’s call count can be distributed across multiple apps, and exceeding the limit will result in rate limiting.

Instagram API Examples

How Kiehl’s Boosted Sales Leads with Messenger API for Instagram

The Challenge

Kiehl’s Malaysia, a prestigious skincare brand, wanted to connect with its Instagram-using customers more closely.

However, handling a large volume of customer messages and comments was a challenge. They needed a solution to manage incoming messages efficiently, answer customer questions, and convert leads.

The Solution

Kiehl’s in Malaysia uses Messenger API for Instagram to create an automated experience for their audience. Here’s how it works:

  • Quick and Personalized Communication: Kiehl’s used the digital assistant to engage with customers via Instagram direct messages. Automatic replies ensured that customers received immediate personalized messages.
  • Complex Conversations: A handover protocol seamlessly transferred the conversation to Kiehl’s customer support agents for product consultations and detailed queries.
  • After-Hours Support: If customers messaged Kiehl’s after office hours, they received an “away” message explaining that support would resume at 9 a.m. the next day.

The Results

The integration of Messenger API for Instagram led to significant improvements:

  • 30% More Qualified Leads: Kiehl’s saw a 30% increase in qualified leads compared to other channels.
  • 20% Conversion Rate: A remarkable 20% conversion rate from product consultations to sales.
  • Faster Registration: The time to complete beauty consultations is reduced to just two days.


Integrating Messenger API for Instagram allowed Kiehl’s Malaysia to enhance customer engagement, increase leads, and improve conversion rates on Instagram.

It showcases the power of Messenger API for businesses in efficiently managing customer interactions and driving positive outcomes.

Grab’s Faster Customer Service with Messenger API

The Challenge

Grab, a multinational technology company offering transportation, food delivery, and digital payment services, faced challenges in managing a high volume of customer care tickets and responding to comments and questions on their social media accounts.

They needed to reduce response times, clear backlog, and maintain high customer satisfaction scores.

The Solution

Grab turned to Messenger API to create an automated conversational experience, resulting in:

  • Automated Conversations: Grab developed workflows to address frequent customer queries using Messenger API, which responded to private messages on Facebook and Instagram.
  • Multilingual Support: Workflows were designed to handle multilingual markets, ensuring accurate responses to user questions.
  • Quick Escalation: If the bot couldn’t resolve a user’s query, they could escalate to a live agent.

The Results

The integration of Messenger API brought significant improvements:

  • 98% Reduction in Weekly Backlog: Grab saw a massive reduction in the weekly backlog of customer care tickets.
  • 51% Resolution via Messenger Automation: Over half of inbound messages were resolved through Messenger automation.
  • 37% Decrease in Cost Per Ticket: The cost per ticket decreased significantly from 2019 to 2022.
  • 6/5 Customer Satisfaction Score: Customer satisfaction remained high, with a score of 4.6 out of 5.


With Messenger API, Grab improved customer service and reduced operating costs, cleared backlogs, and maintained high customer satisfaction.

It’s a prime example of how automation through Messenger API can streamline customer interactions and bring positive business outcomes.

Tips for Using the Instagram API

Here are some tips for using the Instagram API effectively:

  1. Understand the Basics: Before you start, understand the basics of the Instagram API, including its endpoints and how to make requests.
  2. Use a Library or SDK: Many libraries and SDKs can simplify the interaction process with the Instagram API.
  3. Handle Errors Gracefully: Make sure your application can handle errors gracefully. This includes understanding HTTP status codes and error response structure.
  4. Respect Rate Limits: Instagram imposes rate limits on its API to prevent abuse. Make sure your application respects these limits to avoid being blocked.
  5. Secure Your Application: Instagram uses the OAuth 2.0 protocol to authenticate requests. Make sure your application is secure and handles user data responsibly.
  6. Stay Up-to-Date: Instagram regularly updates its API with new features and changes. Ensure you stay up-to-date with these changes to ensure your application works correctly.
  7. Use Webhooks: Webhooks allow your application to receive real-time updates from Instagram, reducing the need for polling.
  8. Test Thoroughly: Before deploying your application, test it thoroughly to ensure it works correctly with the Instagram API.
  9. Monitor Your Application: Once it is live, monitor it regularly to ensure it works correctly and identify potential issues early.
  10. Follow Instagram’s Platform Policy: When using the Instagram API, it’s important to adhere to Instagram’s Platform Policy to ensure a positive and respectful environment for the entire community.
Category : Uncategorized
WhatsApp Whatsapp sales