Mentions API

The Mentions API is a subset of Instagram Graph API endpoints and Webhooks that allow you to identify captions, comments, and media in which your Business Account 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 and Webhooks

The API consists of the following endpoints and webhooks:

Refer to each endpoint and webhook reference document for usage instructions.

Recommended Uses

Logging Comment & Caption @Mentions

We do not store Webhooks notification data. If you set up an Instagram Webhook that listens for mentions, you should store any received data if you plan on using it later.

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 /user/mentioned_comment edge to get more information about each comment.
  4. Analyze the returned results to identify any comments that meet your criteria.
  5. Use the /user/mentions edge to reply to those comments.

Your reply will appear as a sub-thread comment on the comment in which you were 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 /user/mentioned_media edge 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 /user/mentions edge to comment on those media objects.