IG Media

Represents an Instagram Photo, Video, Story, Album, or IGTV media. Reels are not supported.

Creating

This operation is not supported.

Reading

GET /{ig-media-id}?fields={fields}

Gets Fields and Edges on an IG Media.

Limitations

  • Fields that return aggregated values will not include ads-driven data. For example, comments_count will count comments on a photo, but not comments on ads that contain that photo.
  • Captions will not include the (@) symbol unless the app user is also able to perform Admin-equivalent Tasks on the app.
  • Some Fields cannot be used on Photos within Albums (children).
  • The media_url field will be omitted from responses if the IG Media contains copyrighted material or has been flagged for a copyright violation.
  • Reels are not supported.
  • IGTV media must be shared to Instagram at the time of publish (Post a Preview or Share Preview to Feed enabled) in order to be accessible via the API.

Requirements

TypeDescription

Access Tokens

User

Permissions

instagram_basic
pages_read_engagement
pages_show_list


If the app user was granted a role on the Page via the Business Manager, you will also need one of:


ads_management
business_management

Request Syntax

GET https://graph.facebook.com/v11.0/{ig-media-id}
  ?fields={fields}
  &access_token={access-token}

Query String Parameters

ParameterValue

{access-token}
Required
String

The app user's User Access Token.

{fields}
Comma-separated list

A comma-separated list of Fields you want returned.

Fields

FieldDescription

caption
Public

Caption. Excludes album children. @ symbol excluded unless the app user can perform admin-equivalent tasks on the Facebook Page connected to the Instagram account used to create the caption.

comments_count
Public

Count of comments on the media. Excludes comments on album child media and the media's caption. Includes replies on comments.

id
Public

Media ID.

ig_id

Instagram media ID.

is_comment_enabled

Indicates if comments are enabled or disabled. Excludes album children.

like_count
String

Count of likes on the media. Excludes likes on album child media and likes on promoted posts created from the media. Includes replies on comments.


If queried indirectly through another endpoint or field expansion:


  • v10.0 and older calls: value will be 0 if the media owner has hidden like counts it.
  • v11.0+ calls: field will be omitted if media owner has hidden like counts in it Value will be 0 if the media owner has hidden like counts it.

media_product_type
Public

Surface where the media is published. Can be AD, FEED, IGTV, or STORY.

media_type

Media type. Can be CAROUSEL_ALBUM, IMAGE, or VIDEO.

media_url
Public

Media URL. Will be omitted from responses if the media contains copyrighted material, or has been flagged for a copyright violation.

owner

ID of Instagram user who created the media. Only returned if the app user making the query also created the media, otherwise username field will be returned instead.

permalink
Public

Permanent URL to the media.

shortcode

Shortcode to the media.

thumbnail_url

Media thumbnail URL. Only available on VIDEO media.

timestamp
Public

ISO 8601 formatted creation date in UTC (default is UTC ±00:00)

username
Public

Username of user who created the media.

video_title
Public

IGTV media title.

Public fields can be read via field expansion.

Edges

Edges marked with an asterisk (*) are public Edges, which means they can be returned through Field Expansion.

Sample Request

curl -X GET \
  'https://graph.facebook.com/v11.0/17895695668004550?fields=id,media_type,media_url,owner,timestamp&access_token=IGQVJ...'

Sample Response

{
  "id": "17895695668004550",
  "media_type": "IMAGE",
  "media_url": "https://fb-s-b-a.akamaihd.net/h-ak-fbx/t51.2885-9/21227247_1640962412602631_3222510491855224832_n.jpg?_nc_log=1",
  "owner": {
    "id": "17841405822304914"
  },
  "timestamp": "2017-08-31T18:10:00+0000"

Updating

Enabling/Disabling Comments

POST /{ig-media-id}?comment_enabled={comment_enabled}

Enables or disables comments on a media object.

Query String Parameters

Query string parameters are optional unless indicated as required.

  • {comment_enabled} (required) — Set to true to enable comments or false to disable comments.

Permissions

An access token from a User who created the media object, with the following permissions:

  • instagram_basic
  • instagram_manage_comments
  • pages_read_engagement or pages_show_list

If the token is from a User whose Page role was granted via the Business Manager, one of the following permissions is also required:

  • ads_management
  • pages_read_engagement
  • business_management

Sample Request

POST graph.facebook.com
  /17895695668004550?comment_enabled=false

Sample Response

{
  "success": true
}

Deleting

This operation is not supported.