This question is going to seem like a duplicate of all the previous ones around this issue, specifically this question PHP Instagram API - How to get MIN_TAG_ID and MAX_TAG_ID. But with the new API changes the previous answers no longer work.
Goal
I want to request media for a specific tag.
The Documentation
Instagrams documentation on getting tagged media specifies you need to have the public_content
scope and that there are 4 available parameters; ACCESS_TOKEN
, COUNT
, MIN_TAG_ID
, and MAX_TAG_ID
.
My API Request
https://api.instagram.com/v1/tags/cats/media/recent?access_token=TOKEN&max_tag_id=123
Which gives me this API response.
{
"data": [],
"meta": {
"code": 200
},
"pagination": {
"deprecation_warning": "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"
}
}
The Issue
As you can see from the request I am not specifying either of the deprecated parameters; next_max_id
or min_id
.
I have tried these alternate requests with the same result:
- https://api.instagram.com/v1/tags/cats/media/recent?access_token=TOKEN
- https://api.instagram.com/v1/tags/cats/media/recent?access_token=TOKEN&max_tag_id=123
- https://api.instagram.com/v1/tags/cats/media/recent?access_token=TOKEN&min_tag_id=123
- https://api.instagram.com/v1/tags/cats/media/recent?access_token=TOKEN&min_id=123
- https://api.instagram.com/v1/tags/cats/media/recent?access_token=TOKEN&max_id=123
- https://api.instagram.com/v1/tags/cats/media/recent?access_token=TOKEN&next_max_id=123
- https://api.instagram.com/v1/tags/cats/media/recent?access_token=TOKEN&next_min_id=123
Things I Have Looked At
My app approval: I have a sandboxed app which I'm using the same account for authenticating with. If I understand the documentation properly I should have access to all the APIs with my setup.
Available media: I'm using the "cat" tag to test, which should have plenty of media to request.
My access_token
: I don't think this is an issue because I'm using the same access token to make authenticated public_content
scope requests to the /users/user-id/media/recent endpoint successfully.
The official python-instagram repo: I couldn't quite parse how they were making the requests but it's last commit was in July so I'm not even sure it works with the latest API.