Search code examples
restapiinstagram-api

Instagram API response with users not in caption


I want to know what users are tagged in a photo on Instagram, who don't appear in the caption.

Anyone know if this is possible? That is, does the response contain users that are tagged, but that are not physically in the caption text?

https://www.instagram.com/developer/endpoints/tags/


Solution

  • The property you probably want is called users_in_photo. It is an array which contains an array of user objects who've been tagged in the photo. It also contains the geometric coordinates in the photo that the user has been "tagged" at.

    Here is an example response using the /media/MEDIA_ID endpoint:

    Endpoint Documentation -> https://www.instagram.com/developer/endpoints/media/#get_media

    {
        "data": {
            "users_in_photo": [{
                "user": {
                    "username": "kevin",
                    "full_name": "Kevin S",
                    "id": "3",
                    "profile_picture": "..."
                },
                "position": {
                    "x": 0.315,
                    "y": 0.9111
                }
            }],
            // rest of object...
        }
    }