Back

Instagram Ads API Essential Guide

Aug 3, 20246 minute read

What type of API does Instagram Ads provide?

The Instagram Graph API is based on GraphQL, a query language and runtime for APIs developed by Facebook. GraphQL APIs have several key characteristics:

  • They use a query language that allows clients to specify exactly what data they need.
  • They have a single endpoint, reducing API complexity.
  • They are schema-driven, making it easier for developers to understand and work with the API.
  • They are strongly typed, which helps with data validation and handling.

The Instagram Graph API allows developers to perform various actions, such as receiving and posting media, managing and responding to comments, determining media where users have mentioned a brand, searching for tags, and obtaining metadata and key metrics about companies and users.

GraphQL APIs use queries to request specific data from the server, and the server processes the query and returns the response in JSON format. GraphQL has a hierarchical structure where relationships between objects are defined graphically.

While GraphQL APIs may seem similar to REST APIs over HTTP, they are fundamentally different. GraphQL is a schema language, query language, and API system that isn't strictly constrained to HTTP. The closest approximation to a GraphQL API is actually SOAP (Simple Object Access Protocol), as both focus on exchanging structured information. GraphQL is particularly advantageous for modeling relational data and providing flexible access to relational nodes.

Does the Instagram Ads API have webhooks?

The official Instagram Ads API does not currently have webhooks for ad-related events. There are no webhooks available specifically for new followers on Instagram Business accounts. For Instagram Lead Ads, there is a way to send new leads to a webhook using third-party integration tools like Zapier, but this is not part of the official Instagram API. The recommended workaround for getting notified about new followers is to periodically fetch the follower list and compare it to the previously fetched list to identify new followers. There is no direct webhook or API event for comments on Instagram ad posts.

The lack of official webhooks for ad-related events and followers means real-time notifications for these events are not possible through the API. For lead generation ads, third-party tools can be used to send lead data to webhooks, but this is not a native Instagram API feature. Developers need to implement polling mechanisms to detect changes like new followers, rather than relying on push notifications via webhooks.

In summary, the official Instagram Ads API does not provide webhooks for most events that developers might be interested in. The available options are limited, and workarounds often involve periodic data fetching and comparison rather than real-time event notifications.

Rate Limits and other limitations

Here are the key points about the API rate limits for the Instagram Ads API:

General Rate Limit

  • The Instagram API uses the same general rate limit as the Facebook Graph API: 200 calls per user per hour.

Exception for Comments

  • There is one exception to the general limit: the /media/comments endpoint is limited to 60 writes per user per hour.

Recent Reduction in Limit

  • Instagram recently reduced its API rate limit from 5,000 to 200 requests per hour.

  • This reduction was implemented to align Instagram's API rate limits with Facebook's current rate limits.

Reasons for Reduction

  • The reduction in API limit was intended to limit the ability of unauthorized actors to acquire large volumes of user data over time.

  • It appears to be related to efforts to improve privacy and user data protection.

Impact on Applications

  • This significant decrease in allowed API requests has affected many third-party applications built on Instagram's platform.

  • Apps that help users analyze followers, audience interactions, or find relevant hashtags are now quickly hitting API limits.

Business Use Case (BUC) Rate Limits

  • All calls to the Instagram Graph API are also subject to Business Use Case rate limits.

  • These limits are unique for each combination of an app and its user pair.

  • The BUC rate limit resets every 24 hours.

Best Practices

  • To avoid hitting rate limits, developers should optimize API calls, implement caching strategies, and carefully monitor their usage.

  • It's important to stay updated on any platform changes or updates that might affect rate limit policies.

Key Consideration

When developing applications using the Instagram API, it's crucial to design them with these rate limits in mind to ensure smooth functionality and avoid disruptions due to exceeding API quotas.

Latest API Version

Based on the search results, here are the key points regarding the most recent version of the Instagram Ads API:

  1. The Instagram Ads API is part of the Facebook Marketing API [1]. There isn't a separate standalone Instagram Ads API.

  2. The most recent major update mentioned is the launch of a new Instagram API with Instagram Login [2]. This new API:

    • No longer requires a Facebook Page
    • Uses graph.instagram.com as the host URL
    • Introduces new permissions like instagram_business_basic, instagram_business_content_publishing, etc.
    • Allows adding the new "Instagram" product when creating a Meta app
  3. The latest version number is not explicitly stated, but the changelog mentions recent updates to v20.0+ and v18.0+ [2]. The most recent dated entry is for June 27, 2022.

  4. There have been ongoing updates and changes to various Instagram API features, including:

    • Support for Instagram Creator Accounts (May 22, 2019) [2]
    • Changes to IGTV video handling (October 5, 2021) [2]
    • Addition of product tagging capabilities (June 20, 2022) [2]
    • Support for publishing carousel posts (March 15, 2022) [2]
  5. The API continues to evolve, with upcoming changes mentioned for August 19, 2024 regarding user insights [2].

In summary, while there isn't a specific "Instagram Ads API" version number, the Instagram advertising capabilities are part of the Facebook Marketing API, which is continuously updated. The most recent major changes relate to the new Instagram API with Instagram Login, but specific advertising features have been updated throughout 2021 and 2022.

How to get a Instagram Ads developer account and API Keys?

Here are the key steps to get a developer account for Instagram Ads to create an API integration:

  1. Create a Facebook Developer account

You'll need to start by creating a Facebook Developer account if you don't already have one. This can be done at developers.facebook.com.

  1. Set up an Instagram Business account

Make sure your Instagram account is set up as a Business account and connected to a Facebook Page.

  1. Create a new app in the Facebook Developer Dashboard
  • Go to the Facebook Developer Dashboard
  • Navigate to the "Instagram Basic Display" tab
  • Create a new app for "Basic Display"
  1. Obtain necessary permissions and tokens
  • Go through the authentication process to obtain a User Token with the required permissions for Instagram access
  1. Connect to the Instagram API
  • If using a platform like Make.com, you would create a new scenario and add the Instagram module
  • Create a new connection using the User Token obtained earlier

What can you do with the Instagram Ads API?

Based on the search results provided, here is a list of data models you can interact with using the Instagram Ads API, along with what is possible for each:

Ad Campaign

  • Create ad campaigns for Instagram
  • Specify campaign objectives compatible with Instagram placements
  • Available objectives vary by placement but generally include:
    • Brand awareness
    • Reach
    • Link clicks
    • Post engagement
    • App installs
    • Video views
    • Lead generation
    • Messages
    • Conversions
    • Product catalog sales
    • Store traffic

Ad Set

  • Create ad sets targeting Instagram
  • Set optimization goals
  • Define targeting options (can use Facebook targeting capabilities)
  • Set budget and schedule
  • Choose billing event
  • Specify placements like Instagram feed, stories, explore, etc.
  • Create ads to run on Instagram
  • Link creative assets to ad sets
  • Set call-to-action buttons
  • Get ad previews

Creative Assets

  • Upload and use images and videos for Instagram ads
  • Create carousel ads
  • Customize creative for Instagram Stories

Instagram Account

  • Get Instagram account ID
  • Link Instagram account to Facebook ad account

Metrics and Insights

  • Access performance metrics for Instagram ads
  • View insights on reach, impressions, engagement etc.

Business Discovery

  • Get data on other business/creator accounts like follower count, media count, etc.
  • Access data on recent posts including like counts, comment counts

Media Publishing

  • Publish photos and videos to connected Instagram business accounts
  • Set location for media posts

Limitations

  • Cannot access direct messages or chat functionality through the main Instagram API
  • Limited access to data from non-business accounts
  • Restrictions on scraping public data outside of official APIs

The Instagram Ads API provides robust capabilities for creating and managing ad campaigns on the platform, with options to target various placements and objectives. However, there are some limitations around accessing certain types of user data and functionality outside of advertising purposes.