can you tell me the end point to get users recent posts? i am trying to do the same too
Got it. Thank you.
If you only care about the most recent (12) posts, https://www.instagram.com/{username}/?__a=1 will do. In the JSON under [‘graphql’][‘user’][‘edge_owner_to_timeline_media’][‘edges’] will give you the last 12 posts’ info then you loop through them to get [‘node’][‘shortcode’]. https://www.instagram.com/p/[shortcode] will be the url of each post.
If you want more than 12, it will be slightly more complicated. You need to look at [‘graphql’][‘user’][‘edge_owner_to_timeline_media’][‘page_info’][‘end_cursor’] and add that end_cursor to the original end point url
https://www.instagram.com/{username}/?__a=1&after={end_cursor} which will return another 12 and give you another end cursor to request the next 12
We were discussing doing this but in a much more complicated way in a recent thread! Are there more threads to learn more about how to do this? Right now I don’t really understand everything said here.
I need to convert a txt file of user ids to usernames
how to do it?
You have to query with the appropriate user agent, you can do it even from the browser by setting it with the appropriate extension.
If you want to do it on a larger scale, you will need to do it through multiple IP addresses.
UserAgent was given in this thread, use it.