Recent Media

This edge allows you to get the most recently published photos and videos that have been tagged with a hashtag.

Creating

This operation is not supported.

Reading

Getting Hashtagged Media

To get the most recently published photos and videos published with a specific hashtag, send a GET request to the {hashtag-id}/recent_media edge and include the Instagram Business User ID using the user_id parameter.

Limitations

  • This edge only returns public photos and videos.
  • This edge only returns media objects published within 24 hours of query execution.
  • Responses are paginated with a maximum limit of 50 results per page.
  • You can query a maximum of 30 unique hashtags within a 7 day period.
  • You cannot request the username field on returned media objects.
  • Responses will not include any personally identifiable information.

Requirements

TypeDescription

Features

Instagram Public Content Access

Permissions

instagram_basic

Page Connection

A Facebook Page must be connected to the Instagram Business User whose ID you are including in your query.

Tokens

An access token of a Facebook User who has been approved for tasks on the connected Facebook Page.

Response

An array of media objects. Excess results will be paginated.

Returnable Fields

You can use the fields parameter to request the following fields on returned media objects:

  • caption
  • comments_count
  • id
  • like_count
  • media_type
  • media_url
  • permalink

Sample Request

GET graph.facebook.com/17873440459141021/recent_media
  ?user_id=17841405309211844
  &fields=id,media_type,comments_count,like_count

Sample Response

{
  "data": [
    {
      "id": "17880997618081620",
      "media_type": "IMAGE",
      "comments_count": 84,
      "like_count": 177
    },
    {
      "id": "17871527143187462"
      "media_type": "IMAGE",
      "comments_count": 24,
      "like_count": 57
    },
    {       
      "id": "17896450804038745"
      "media_type": "IMAGE",
      "comments_count": 19,
      "like_count": 36
    }
  ],
  "paging":
    {
      "cursors":
        {
          "after": "NTAyYmE4..."
        },
      "next": "https://graph.facebook.com/..."
    }
}

Updating

This operation is not supported.

Deleting

This operation is not supported.