Finding a user’s first Instagram photo
by Peter.
My sister asked me how to find the first Instagram post by louboutinworld. Instagram’s website has one of those annoying paginated infinite scrolling interface, but luckily, they also have an API.
Here’s what I did:
- Opened the API Console on Instagram’s developer site and got an OAuth access token for it.
- Searched for
louboutinworld
using theusers/search
API method and got its user id (11285087
). - Used the
users/{user-id}/media/recent
API method with the max_timestamp parameter, generating timestamps using EpochConverter.
Then it became a simple binary search, Where I entered different timestamps until I had only one result.
This is the first photo posted:
It was posted on March 21, 2012 at 16:01:05 GMT.