Instagram API /media/search maximum count parameter?

亡梦爱人 提交于 2019-12-22 10:31:40

问题


When using Python to make a GET request to the Instagram API, passing the required variables as shown below

photos = api.media_search(lat=latitude, lng=longitude, distance=distance, count=count)

I have attempted to set the count parameter to over 100, but the API returns a maximum of 100 results.

Is this a limitation set for the API or am I doing something wrong?


回答1:


The Instagram API documentation says there is a max value for count for each endpoint, from the docs:

On views where pagination is present, we also support the "count" parameter. Simply set this to the number of items you'd like to receive. Note that the default values should be fine for most applications - but if you decide to increase this number there is a maximum value defined on each endpoint.

However, I couldn't find any indication for that number in the documentation, neither for the media request nor for other requests. So I would assume that they don't guarantee any specific number.

They do specify that if the application is in sandbox mode, the data is restricted to 20 most recent media.



来源:https://stackoverflow.com/questions/36228087/instagram-api-media-search-maximum-count-parameter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!