问题
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