Represents an Instagram album, photo, or video (uploaded video, live video, reel, or story).
If you are migrating from Marketing API Instagram Ads endpoints to Instagram Platform endpoints, be aware that some field names are different.
Introducing the following field:
legacy_instagram_media_id
The following Marketing API Instagram Ads endpoint fields are not supported:
filter_name
location
location_name
latitude
longitude
This operation is not supported.
GET /<IG_MEDIA_ID>
Gets fields and edges on Instagram media.
Instagram API with Instagram Login | Instagram API with Facebook Login | |
---|---|---|
Access Tokens |
| |
Host URL |
|
|
Login Type | Business Login for Instagram | Facebook Login for Business |
Permissions |
|
If the app user was granted a role via the Business Manager on the Page connected to your app user's Instagram professional account, your app will also need one of:
|
comments_count
returns the number of comments on a photo, but not comments on ads that contain that photo.@
symbol unless the app user is also able to perform admin-equivalent tasks on the app.permalink
, cannot be used on photos within albums (children).GET https://<HOST_URL>/<API_VERSION>/<IG_MEDIA_ID> \ ?fields=<LIST_OF_FIELDS> \ &access_token=<ACCESS_TOKEN>
Placeholder | Value |
---|---|
The latest version is: v22.0 | The API version your app is using. If not specified in your API calls this will be the latest version at the time you created your Meta app or, if that version is no longer available, the oldest version available.Learn more about versioning. |
| The host URL your app is using to query the endpoint. |
| Required. ID for the media to be published. |
Key | Placeholder | Value |
---|---|---|
|
| Required. The app user's Facebook or Instagram User access token. |
|
| Comma-separated list of fields you want returned. |
Public fields can be read via field expansion.
Field | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Offers an overview of all Instagram ad information associated with the organic media. It includes relative ad ID and ad delivery status. Available for Instagram API with Facebook Login only. | ||||||||||||||||
| The field provides information about boosting eligibility of a Instagram instagram media as an ad and additional details if not eligible. Available for Instagram API with Facebook Login only. | ||||||||||||||||
| Caption. Excludes album children. The | ||||||||||||||||
| Count of comments on the media. Excludes comments on album child media and the media's caption. Includes replies on comments. | ||||||||||||||||
| Returns
If a video is violating copyright, the
| ||||||||||||||||
| Media ID. | ||||||||||||||||
| Indicates if comments are enabled or disabled. Excludes album children. | ||||||||||||||||
| For Reels only. When Neither value determines whether the reel actually appears in the Reels tab because the reel may not meet eligibilty requirements or may not be selected by our algorithm. See reel specifications for eligibility critera. | ||||||||||||||||
| The ID for Instagram media that was created for Marketing API endpoints for v21.0 and older. | ||||||||||||||||
| Count of likes on the media, including replies on comments. Excludes likes on album child media and likes on promoted posts created from the media. If queried indirectly through another endpoint or field expansion the | ||||||||||||||||
| Surface where the media is published. Can be | ||||||||||||||||
| Media type. Can be | ||||||||||||||||
| The URL for the media. The | ||||||||||||||||
| Instagram user ID who created the media. Only returned if the app user making the query also created the media; otherwise, | ||||||||||||||||
| Permanent URL to the media. | ||||||||||||||||
| Shortcode to the media. | ||||||||||||||||
| Media thumbnail URL. Only available on | ||||||||||||||||
| ISO 8601-formatted creation date in UTC (default is UTC ±00:00). | ||||||||||||||||
| Username of user who created the media. |
Public edges can be returned through field expansion.
Edge | Description |
---|---|
| Represents a collection of Instagram Media objects on an album Instagram Media. |
Represents a list of users who are added as collaborators on an Instagram Media object. Available for Instagram API with Facebook Login only. | |
Represents a collection of Instagram Comments on an Instagram Media object. | |
Represents social interaction metrics on an Instagram Media object. |
curl -X GET \
'https://graph.instagram.com/v22.0
/17895695668004550?fields=id,media_type,media_url,owner,timestamp&access_token=IGQVJ...'
{ "id": "17918920912340654", "media_type": "IMAGE", "media_url": "https://sconten...", "owner": { "id": "17841405309211844" }, "timestamp": "2019-09-26T22:36:43+0000" }
POST /<IG_MEDIA_ID>
Enable or disable comments on an Instagram Media.
Instagram API with Instagram Login | Instagram API with Facebook Login | |
---|---|---|
Access Tokens |
| |
Host URL |
|
|
Login Type | Business Login for Instagram | Facebook Login for Business |
Permissions |
|
If the app user was granted a role via the Business Manager on the Page connected to the targeted IG User, you will also need one of:
|
Live video Instagram Media not supported.
POST https://<HOST_URL>/<API_VERSION>/<IG_MEDIA_ID> ?comment_enabled=<BOOL> &access_token=<ACCESS_TOKEN>
Placeholder | Value |
---|---|
The latest version is: v22.0 | The API version your app is using. If not specified in your API calls this will be the latest version at the time you created your Meta app or, if that version is no longer available, the oldest version available.Learn more about versioning. |
| The host URL your app is using to query the endpoint. |
| Required. ID for the media to be published. |
Key | Placeholder | Value |
---|---|---|
|
| Required. App user's user access token. |
|
| Required. Set to |
curl -i -X POST \
"https://graph.instagram.com/v22.0
/17918920912340654?comment_enabled=true&access_token=EAAOc..."
{ "success": true }
This operation is not supported.