Media

On September 4, 2024, we announced the deprecation of the Instagram Basic Display API.

Starting December 4, 2024, all requests to the Instagram Basic Display API will return an error message. We recommend that you migrate your app to the Instagram API to avoid any disruption to your services.

Visit our News for Developers blog post to learn more.

Represents an image, video, or album.

Creating

This operation is not supported.

Reading

GET /{media-id}

Get Fields and Edges on an image, video, or album.

Requirements

TypeRequirement

Access Tokens

Instagram User

Permissions

instagram_graph_user_media

Request Syntax

GET https://graph.instagram.com/{media-id}
  ?fields={fields}
  &access_token={access-token}

Query String Parameters

Include the following query string parameters to augment the request.

KeyValue

access_token
Required
String

The app user's Instagram User Access Token.

fields
Comma-separated list

A comma-separated list of fields and edges you want returned. If omitted, default fields will be returned.

Fields

You can use the fields query string parameter to request the following fields on a Media.

Field NameDescription

caption

The Media's caption text. Not returnable for Media in albums. Note: When using emojis in captions, the encoding format should be UTF-8 and character length may be affected depending on the emoji used.

id

The Media's ID.

is_shared_to_feed

For Reels only. When true, indicates that the reel can appear in both the Feed and Reels tabs. When false, indicates the reel can only appear in the Reels tab.

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.

media_type

The Media's type. Can be IMAGE, VIDEO, or CAROUSEL_ALBUM.

media_url

The Media's URL.

permalink

The Media's permanent URL. Will be omitted if the Media contains copyrighted material, or has been flagged for a copyright violation.

thumbnail_url

The Media's thumbnail image URL. Only available on VIDEO Media.

timestamp

The Media's publish date in ISO 8601 format.

username

The Media owner's username.

Edges

You can request the following edges as path parameters or by using the fields query string parameter.

EdgeDescription

children

Get a list of Media on the Media album. Only available on CAROUSEL_ALBUM Media.

Response

A JSON-formatted object containing default and requested fields and edges.

{
  "{field}":"{value}",
  ...
}

cURL Example

Request

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

Response

{
  "id": "17895695668004550",
  "media_type": "IMAGE",
  "media_url": "https://fb-s-b-a.akamaihd.net/...",
  "username": "jayposiris"
  "timestamp": "2017-08-31T18:10:00+0000"
}

Updating

This operation is not supported.

Deleting

This operation is not supported.