With access to the Instagram API, you can track hashtags, see how your Instagram Business account performs, collect mention data to gauge your audience's attitude toward your brand, publish Instagram photos on your website, and more.
In this guide, I’ll walk you through the definition of the Instagram API, examples of common uses, and how to use the API to benefit your business.
What is the Instagram API?
The Instagram Graph API allows you to connect your app to Instagram’s features and functionalities. Instagram Businesses and Creators can use this API to fully manage their presence on Instagram, including finding mentions, getting basic data on other Businesses, and finding hashtagged photos.
To protect data privacy, Instagram shut down its public API and replaced it with the more controlled and restrictive Graph API. One of the major changes to note is that you need an Instagram Business account to use the new API to collect data.
If you're a developer who wants to build on top of the Graph API, you'll find a range of features available to you. Once approved by Instagram, you can create apps that make users' lives easier and more interesting. You can also consider integrating the API with your website.
With this REST API, social media managers still need third-party apps that allow them to post and engage using their business account, as well as analyze their posts’ performance. So, if you ever wanted to build an Instagram app, this is your moment.
Instagram Basic Display API
The Instagram Basic Display API gives you simple access to Instagram’s data. You can use it to pull basic Instagram user information and associated data (like comments, media, tags, and Stories). It is different from the Instagram Graph API in that it’s not designed to be used by businesses to manage their presence on Instagram.
Instagram API Key
Like most open APIs, the Instagram API requires you to have a unique key that you can then use to the access the APIs features and capabilities on your website or app.
The Instagram Graph API calls its key a “User access token.” You can create a user access token when you’re going through the process of accessing the API. We’ll go over the process below.
How to Access the Instagram Graph API
Accessing the Instagram API requires you to have a few things handy:
- An Instagram Business or Creator account
- A Facebook page that you own and run that’s connected to that account
- A Facebook Developer account (here’s how to register)
- A registered Facebook App that you own and run with Basic settings in place (here’s how to set up a Facebook app)
If you already have these, it’s time to access the Instagram Graph API.
1. Head to the App Dashboard of your Facebook App.
2. On your sidebar, click the button that says Products with a plus sign next to it.
3. Click Set Up on the Facebook Login product card
4. Enter the Facebook Login settings. Make sure that all options are set to default.
6. In your implementation, configure it to request these permissions:
7. Return to your app and log into it using your Facebook account. Make sure you’re also logged into your Facebook Developer account.
8. Click OK to give your app the instagram_basic and pages_show_list permissions you’d set up earlier.
9. All done! You should see a User access token on the screen.
You can then use this access key to retrieve users’ pages, your Instagram Business account, and your Media Objects. For more detail, check out Facebook’s Instagram Graph API tutorial.
Instagram API Sandbox Mode
Sandbox mode is a testing environment where you can test API calls before publishing your website or app.
As you go through the process of connecting your app or website to the Instagram API, you’ll first need to enter sandbox mode. It’s a required step of using the Instagram API. It will give you the opportunity to do the following:
- Ensure the API calls are working correctly.
- Give Instagram an opportunity to review your app or website integration.
Sandbox mode is a great place to find bugs and glitches in your integration.
Instagram API Console
A console is an environment where developers can type in sample commands to test them and see what the results are.
One such example is Any API’s Instagram API console. You can use this tool to make live API calls to the Instagram API and test them out.
Next, let’s take a look at some Instagram API examples.
Instagram API Examples
The following are some examples of Instagram APIs in use.
1. Instagram Stories API Example: Insta-Stories.online
Insta-Stories.online uses the Instagram API to pull Stories from public Instagram accounts. You can browse anonymously without needing to sign in.
Insta-Stories.Online uses the following functionalities of the Instagram Basic Display API:
2. Instagram Analytics API Example: Minter.io Instagram Analytics
Minter.io’s Instagram Analytics tool provides data about your Instagram performance metrics. You can use it to output analytics data to various interfaces for convenient reporting.
Minter.io uses the following functionalities of the Instagram Graph API:
3. Instagram Media API Example: Inflact Instagram Media Downloader
Inflact’s Instagram Media Downloader is a media downloader for Instagram, Facebook, Twitter, and Twitch. It uses the Instagram API to let you download content assets from Instagram.
Inflact Instagram Media Downloader uses the following functionality of the Instagram Basic Display API:
4. Instagram Hashtag API Example: Inflict Hashtag Generator for Instagram
Inflact’s Hashtag Generator lets you easily and quickly generate hashtags for your social media posts. It can help you come up with thousands of relevant ideas based on data pulled from the API.
Inflact Hashtag Generator uses the following functionalities of the Instagram Graph API:
5. Instagram Feed API Example: App for Instagram
App for Instagram is a Chrome extension that uses the Instagram API to let you browse your feed, DM other users, and view other users’ profiles directly from your browser.
App for Instagram uses the following functionalities of the Instagram Basic Display API:
How to Use the Instagram API
- Get insights into your business.
- Pull data from specific hashtags.
- Build your following.
- See what’s trending globally and in specific locations.
- Create promotional campaigns.
- Add Instagram photos to your website.
- Monitor event or campaign performance.
- Create a live feed.
- Auto-print photos.
- Decorate items with Instagram photos.
- Moderate comments.
Now that you have access to the API, there's a lot you can do with it based on the goals of your business. Below are several ways to use Instagram’s API — the Graph API.
1. Get insights into your business.
If you want to know how to market your business, you need to know where you’re succeeding and where you need improvement. The Instagram API will allow you to pull any mention of your business across the platform — good or bad.
If you own a restaurant, you can see which dishes people rave about, take the most photos of, or tag with the puke emoji. If you run an event space, you can see how your clients innovate within the space. Then, you can market the specific flexibility of your venue and give your potential renters better ideas about how to use it.
If you offer a product, you can see how people use it in real life. You can also see patterns in user error that impact their experience negatively. It will help you come up with solutions to educate users or make the next version goof-proof.
2. Pull data from specific hashtags.
Use the Instagram API to find data from specific hashtags, pull images from certain hashtags, and publish them on your site in real-time. This can be useful in promoting your social media accounts to your website visitors.
Similarly, you can use this functionality to showcase a large following or high levels of engagement. This is an element of social proof, which is essential for business success.
You can also use the Instagram API to find your own or competitors’ hashtags and evaluate their performance.
For instance, if you ran a successful holiday campaign last year, you may want to remind your team what people were saying at the time. Wading through a competitor’s social media can also provide useful insights to use in your own campaigns.
3. Build your following.
Do what the bots do manually. But, use your human powers of deduction to take special note of Instagrammers who can become your unofficial brand ambassadors. They should be the users most engaged with your brand, in the right location, and have their own following. They can promote your brand to their followers and in turn increase your following and your brand’s reach.
4. See what’s trending globally and in specific locations.
The Instagram API lets users pull the most popular content, which you can use to conduct research, glean marketing insights, or publish related content on your website.
You can also pull content based on where it was posted geographically. When you search with geotags, you can see trending content in a particular location and continue getting live updates.
This is very useful if you’re targeting a specific location with your marketing campaign. If you want to follow what’s happening around the globe, simply search for locations you’re interested in.
For example, TagFinder.com uses the Instagram API to show you the most used hashtags by city or country. One of the top hashtags in Las Vegas is #LosAngeles, meaning that if you wanted to start an LA travel company, Las Vegas could be an excellent market to expand to.
5. Create promotional campaigns.
You can set up a contest that encourages people to take photos of your business in action and use the Instagram API to pull every photo based on the hashtag you set. You can feature the best pictures on your Instagram and website as finalists. Let your audience “vote” for the winner through likes.
You’ll simultaneously increase engagement and get a hoard of fabulous photos to post on your website and social media platforms throughout the rest of the year.
6. Add Instagram photos to your website.
Whether part of a contest or not, if you’d like to add the photos you post on Instagram to your website, the Instagram API can facilitate that. You can post existing photos or set up a photo stream that will add them automatically as they are uploaded to the platform.
These photos can come from a specific user’s account or hashtags. You can use this feature to create a gallery of photos from your Instagram business account. This not only has the potential to improve your website aesthetic, but it also promotes your products and encourages website visitors to follow your social media accounts.
Consider also using the Instagram API to add images from all of your marketing campaigns, including photos of fans and other participants.
7. Monitor event or campaign performance.
Since you can pull content based on hashtags and geotags, you can also use the Instagram API to monitor campaigns or events. By looking at the photos, you can get an idea of how users are responding to a particular product, service, or topic. If it’s an event that attendees are sharing about, you can gauge how well it’s received by what they are saying.
8. Create a live feed.
The level of access offered by the Instagram API also allows you to showcase your event or campaign. If you’re a venue owner, you can use it to show off your guests having a good time during an event, encouraging others to book with you.
If you’re running a marketing campaign, you can create a live feed of user-generated content to encourage more to participate and ultimately improve awareness of your brand.
9. Auto-print photos.
If you ever need to print Instagram photos from an event or hashtag, the Instagram API can help you do so. Configure the API to auto-print any photo you upload or those posted with a particular hashtag.
You can use the Instagram API to create a fun collage of pictures taken and uploaded at a specific time of the day for a period of time or put together a mosaic of photos captioned with a particular hashtag at the end of a campaign.
10. Decorate items with Instagram photos.
Go a step further in bringing Instagram photos offline by printing them on items such as phone cases, postcards, and mugs. This can be a nice way to put a smile on your customers’ faces. For instance, give your Instagram contest winner a certificate with a collage of photos from all those who participated.
11. Moderate comments.
The Instagram Graph API gives you advanced abilities to moderate comments on your Instagram Business profile. Use it to hide or unhide comments, delete comments, retrieve replies to a comment (especially useful for understanding a long back-to-back argument about your brand or campaign), reply to comments, and disable or enable comments. you no longer have to go through the Instagram consumer app to make sure your comments represent your brand.
Use the Instagram API to Grow Better
The Instagram Graph API gives you a level of access that everyday Instagram users don’t otherwise get. As a creative business owner or marketer, there are many ways to use it to grow a brand. Use this guide to make the most out of your efforts and grow your brand exponentially.
Editor's note: This post was originally published in April 2020 and has been updated for comprehensiveness.