Represents an Instagram album, photo, or video (uploaded video, live video, video created with the Instagram TV app, reel, or story).
Beginning June 3, 2024, you can use the boost_eligibility_info
field as a convenient and efficient way to determine whether media is eligible to be boosted as an ad and boost_ads_list
to trace past boost Instagram ad information related to the ad. See the blog for more information. Available for the Instagram Graph API only.
This operation is not supported.
GET /<IG_MEDIA_ID>
Gets fields and edges on IG media.
comments_count
counts 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://graph.facebook.com/<API_VERSION>/<IG_MEDIA_ID> ?fields=<LIST_OF_FIELDS> &access_token=<ACCESS_TOKEN>
Placeholder | Value |
---|---|
| API version. |
| Required. ID for the media to be published. |
Key | Placeholder | Value |
---|---|---|
|
| Required. App user's 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 Graph API only. | ||||||||||||||||
| The field provides information about boosting eligibility of a IG instagram media as an ad and additional details if not eligible. Available for Instagram Graph API 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. | ||||||||||||||||
| 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 IG Media objects on an album IG Media. |
Represents a list of users who are added as collaborators on an IG Media object. Available for Instagram Graph API only. | |
Represents a collection of IG Comments on an IG Media object. | |
Represents social interaction metrics on an IG Media object. Available for Instagram Graph API only. |
curl -X GET \
'https://graph.instagram.com/v21.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 IG Media.
Live video IG Media not supported.
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:
|
POST https://graph.facebook.com/<API_VERSION>/<IG_MEDIA_ID> ?comment_enabled=<BOOL> &access_token=<ACCESS_TOKEN>
Placeholder | Value |
---|---|
| API version. |
| Required. IG Media ID. |
Key | Placeholder | Value |
---|---|---|
|
| Required. App user's user access token. |
|
| Required. Set to |
curl -i -X POST \
"https://graph.instagram.com/v21.0
/17918920912340654?comment_enabled=true&access_token=EAAOc..."
{ "success": true }
This operation is not supported.