Reputation: 143
How to pull Instagram posts for a public account for certain account however the account is not mine, but I need to pull its feed and its recent media.
I saw there's a way using the user_id, but how could I get the user_id from a username? OR doing it directly with the username?
Upvotes: 0
Views: 571
Reputation: 984
Sending a GET
request to https://www.instagram.com/katyperry/?__a=1 returns a JSON packed with account information including user id, recent media, feed, etc.
user_id = responseAsJSON.graphql.user.id
You can replace katyperry
with any public username.
Upvotes: 1