MentalCombination
MentalCombination

Reputation: 63

How can I check how many followers someone has on Instagram with Python?

So I want to be able to input a username into my Python program and then it checks how many followers that account has (if it's not private) and displays the number. I'm sure it has something to do with APIs.

Upvotes: 0

Views: 475

Answers (2)

hkonsti
hkonsti

Reputation: 85

You can use this API endpoint:

https://instagram.com/{username}/?__a=1

It returns a JSON representation of the account information.

Example: https://instagram.com/instagram/?__a=1

Upvotes: 2

Michel Libera
Michel Libera

Reputation: 65

first idea that came to my mind is to scrape it with beautifulsoup.

Upvotes: 1

Related Questions