Build and grow your business with Instagram
The Instagram Graph API allows businesses to manage their presence on Instagram. With the API, you can get access to and manage your Instagram Business or Creator Account, and publish content.
Note: The Instagram Graph API is only available for Instagram Business and Creator Accounts. Personal accounts are not supported.
The Instagram Graph API uses OAuth 2.0 for authentication. You'll need to obtain an access token to make API calls.
GET /oauth/access_token
?client_id={app-id}
&redirect_uri={redirect-uri}
&scope=instagram_basic,instagram_content_publish
&response_type=code
Once you have the code, exchange it for a long-lived access token:
GET /oauth/access_token
?client_id={app-id}
&client_secret={app-secret}
&grant_type=authorization_code
&redirect_uri={redirect-uri}
&code={code}
Retrieve information about an Instagram Business or Creator Account
GET /{ig-user-id}?fields=id,username,website,followers_count,media_count
Host: graph.facebook.com
Authorization: Bearer {access-token}
Retrieve a list of Instagram Media objects on an Instagram Business or Creator Account
GET /{ig-user-id}/media?fields=id,caption,media_type,media_url,permalink,thumbnail_url,timestamp,username
Host: graph.facebook.com
Authorization: Bearer {access-token}
Create a new Instagram Media object
POST /{ig-user-id}/media
Host: graph.facebook.com
Authorization: Bearer {access-token}
image_url={image-url}
caption={caption}
The Instagram Graph API has rate limits to ensure fair usage across all developers. These limits are subject to change.
API Call | Rate Limit |
---|---|
GET requests | 200 calls per user per hour |
POST requests | 25 calls per user per hour |
Business Discovery | 30 unique businesses per user per hour |
Note: Exceeding these rate limits will result in API errors. Implement proper error handling and respect these limits in your applications.
Instagram Graph API supports webhooks for real-time updates. You can subscribe to the following topics:
To set up webhooks, you need to configure your app in the Facebook Developers portal and implement a webhook endpoint in your server.