Mentions

The Mentions API is a subset of Instagram Graph API endpoints and Webhooks. They allow you to identify captions, comments, and media in which an Instagram Business or Creator Account's alias has been tagged or @mentioned.

Limitations

  • Mentions on Stories are not supported.
  • Commenting on photos in which you were tagged is not supported.

Endpoints

The API consists of the following endpoints:

Refer to each endpoint reference document for usage instructions.

Webhooks

Subscribe to the mentions field to recieve Instagram Webhooks notifications whenever an Instagram user mentions an Instagram Business or Creator Account. Note that we do not store Webhooks notification data, so if you set up a Webhook that listens for mentions, you should store any received data if you plan on using it later.

Examples

Listening for and Replying to Comment @Mentions

You can listen for comment @mentions and reply to any that meet your criteria:

  1. Set up an Instagram webhook that's subscribed to the mentions field.
  2. Set up a script that can parse the Webhooks notifications and identify comment IDs.
  3. Use the IDs to query the GET /{ig-user-id}/mentioned_comment endpoint to get more information about each comment.
  4. Analyze the returned results to identify any comments that meet your criteria.
  5. Use the POST /{ig-user-id}/mentions endpoint to reply to those comments.

The reply will appear as a sub-thread comment on the comment in which the Business or Creator Account was mentioned.

Listening for and Replying to Caption @Mentions

You can listen for caption @mentions and reply to any that meet your criteria:

  1. Set up an Instagram webhook that's subscribed to the mentions field.
  2. Set up a script that can parse the Webhooks notifications and identify media IDs.
  3. Use the IDs to query the GET /{ig-user-id}/mentioned_media endpoint to get more information about each media object.
  4. Analyze the returned results to identify media objects with captions that meet your criteria.
  5. Use the POST /{ig-user-id}/mentions endpoint to comment on those media objects.