Reputation: 2923
I'm trying to use the search by tag API to return the JSON result, but it returned a blank result.
This is the API request format from their website. I only set the tag-name & access token parameters. https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
I already set my access token's scope as public_content so that I can use this particular API.
However, the result I got is:
{
"pagination": {
"deprecation_warning": "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"
},
"meta": {
"code": 200
},
"data": []
}
Which was basically nothing. I read that I should be expecting max & min ids. I had already checked that the hashtag I'm searching has more than 200 entries, so there should be more than one page.
No issues with other insta APIs when searching by userids, just can't get it to work on this and searching by recent media.
Really appreciate any help. Thank you!
Upvotes: 2
Views: 1035
Reputation: 634
By the looks of things, you're getting a deprecation warning because you are passing the next_max_id
and min_id
parameters in your request.
As mentioned in the result you got, you should use min_tag_id
and max_tag_id
instead (if you want these parameters in your request). This is mentioned in the Instagram Developer documentation
ACCESS_TOKEN A valid access token.
COUNT Count of tagged media to return.
MIN_TAG_ID Return media before this min_tag_id.
MAX_TAG_ID Return media after this max_tag_id.
Sorry, I'm not sure what you mean by "expecting max & min ids". If you mean you're expecting them in the response, then this is a wrong expectation.
Also, another possible cause for your problem is the recent Instagram Platform update, which has forced all clients created after November 17th, 2015 to be in Sandbox mode and go through a review process. If you are affected by this, note that your results will be "filtered" depending on the Sandbox users you have (in which case, you might not have the number of results you were expecting).
Upvotes: 2