Instagram API / media / search max timestamp issue

I am currently working with the endpoint / media / search API of Instagram. Since this endpoint does not return a pagination link, I used an algorithm to get more data using minimum and minimum timestamps. However, somehow the API does not respect max_timestamp, i.e. When I request messages for a certain period of time, I still get content that is larger than the maximum timestamp. I did an extensive web search for several days, and I also found some related posts on Stackoverflow, for example. it is about returning results outside of the time range and it is not related to the maximum timestamp parameter , but none of them provided a solution. Since these two examples are only a few months old, I think this is a fairly recent problem.

I have already tried a lot to understand and solve the problem, so I wonder if this is due to the fact that I do not use an access token? Or is this another problem? Or is this really a problem in the Instagram API?

I look forward to hearing.

Here is an example to reproduce the problem:

https://api.instagram.com/v1/media/search?lat=48.858351&lng=2.29444&distance=5000&min_timestamp=1407192003&max_timestamp=1407278403&client_id=<CLIENT-ID> 

The response contains the following timestamps:

  • 1407278455
  • 1407278453
  • 1407278448
  • 1407278446
  • 1407278439
  • 1407278423
  • 1407278418
  • 1407278416
  • 1407278410
  • 1407278407
  • 1407278404

Since the specified max_timestamp is 1407278403, all of the above are more ...

+7
instagram
source share
1 answer

It seems that the minimum pagination step is one minute. For max_timestamps: 1407278400 , 1407278460 , 1407278520 , etc. Everything works well. When you take a value greater than some boundary, it takes the next.

Remember that Instagram makes your life easier as you can. Perhaps in the future, the pagination step will be less.

0
source share

All Articles