When using the Media comments by media ID and shortcode endpoints, very few comments will be returned. there are 15 comments reurned on the first page, then If you give a “last_min_id” you will get maybe 5 new comments on the 2nd page & the rest are repeats.
If you give another “last_min_id” you will just get these same comments repeated in a different order.
Is it possible to access more comments? This cap of around 20 comments per post is very limiting!!
Also, i’m not sure how the comments are ordered? is it most recent or most popular?
Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:
Hello Tim,
We’ve added “sort_order” filter to the comments endpoint. Now you can sort comments by popular, recent and verified.
Thanks
Regarding comments order, currently its default but for some users comment sorting option is available because this feature is available for few users.
We are working on adding these filters.
Hello Tim,
Thanks for contacting us.
Please pass next_acc received from response to next request along with min_id.
Example
url = “https://instagram-api-20231.p.rapidapi.com/api/media_comments_from_shortcode/D”
querystring = {“min_id”:“example”,“next_acc”:“example”}
headers = {
“X-RapidAPI-Key”: “KEY”,
“X-RapidAPI-Host”: “instagram-api-20231.p.rapidapi.com”
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
For first request, min_id and next_acc should be empty then for each pagination requests, please pass next_min_id to min_id and next_acc to next_acc.
This will resolve your issue.
You can also refer this discussion for more info https://rapidapi.com/mrngstar/api/instagram-api-20231/discussions/113491
Please let us know if you have any questions.
Thanks