Search code examples
phpinstagraminstagram-api

Tag endpoint combined with user endpoint with Instagram API


I was wondering if it is possible to select an instagram feed from a user and at the same time filter for a certain tag (so inside the specific user's feed). I've been looking in the documentation (http://instagram.com/developer/endpoints/tags/) but to me it doesn't seem to be able to combine.

This is my current url for selecting the user's feed:

$pictureURL = 'https://api.instagram.com/v1/users/'.$arr['user']['id'].'/media/recent?access_token='.$arr['access_token']';

Thanks in advance!


Solution

  • You're right that you cannot combine these two. Instagram's API has a limited number of endpoints and their functionality is often narrow.

    To achieve what you're looking for you'll need to call the endpoint you're calling and filter them yourself (or call the tag endpoint and filter by user). This may prove to be prohibitive if the overlap is small and you're unwilling to make a large number of calls to the API.