Dieses Dokument wurde aktualisiert.
Die Übersetzung ins Deutsche ist noch nicht fertig.
Englisch aktualisiert: 4. Sept.
Deutsch aktualisiert: 05.01.2022

User 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 a collection of Media on a User.

Creating

This operation is not supported.

Reading

GET /{user-id}/media

Get a collection of Media on a User.

Limitations

  • Stories are not supported.
  • Media in promoted posts are not supported.
  • Returns a maximum of 10K of the most recently created media.

Requirements

TypeRequirement

Access Tokens

Instagram User

Permissions

instagram_graph_user_media, instagram_graph_user_profile

Request Syntax

GET https://graph.instagram.com/{api-version}/{user-id}/media
  ?access_token={access-token}

Path Parameters

PlaceholderValue

{api-version}
String

API version.

{user-id}
Required
String

App user's app-scoped user ID (version 11.0+) or raw user ID (all versions).

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 Media fields you want returned by field expansion for each Media node in the result set.

since
timestamp

A Unix timestamp or strtotime data value that points to the start of a range of time-based data. See time-based pagination.

until
timestamp

A Unix timestamp or strtotime data value that points to the end of a range of time-based data. See time-based pagination.

Response

A JSON-formatted object containing the data you requested.

{
  "data": [],
  "paging": {}
}

Response Contents

PropertyValue

data

An array of Media on the User.

paging

An object containing paging cursors and next/previous data set retrievial URLs.

cURL Example

Request

curl -X GET \
  'https://graph.instagram.com/v21.0/10218560180051171/media?access_token=IGQVJ...'

Response

{
  "data": [
    {
      "id": "17895695668004550"
    },
    {
      "id": "17899305451014820"
    },
    {
      "id": "17896450804038745"
    },
    {
      "id": "17881042411086627"
    }
  ],
  "paging": {
    "cursors": {
      "after": "MTAxN...",
      "before": "NDMyN..."
      },
    "next": "https://graph.faceb..."
  }
}

Updating

This operation is not supported.

Deleting

This operation is not supported.