How to get all followers of a user with a lot of followers?
See original GitHub issueForm
Put an [x]
if you meet the condition, else leave [ ]
.
- I’ve searched the Issues
- I’ve read the basic concepts
- I’m using the latest version
Question
I would like to get all the followers of a user, but as there are many, I think the only alternative would be to split requests between multiple accounts.
For example, one account would have followers from 0 to 10,000, while another would have followers between 10,000 and 20,000. But I couldn’t find any way to do this in the documentation, is it possible?
Code
async function getFollowers(
username: string,
ig: IgApiClient,
{ delay, limit, savePath }: GetFollowersOptions
): Promise<AccountFollowersFeedResponseUsersItem[]> {
const id = await ig.user.getIdByUsername(username);
const followersFeed = await ig.feed.accountFollowers(id);
let followers: AccountFollowersFeedResponseUsersItem[] = [];
let reqId = 0;
do {
reqId += 1;
const items = await followersFeed.items();
followers = [...followers, ...items];
if (limit && limit !== -1) {
if (followers.length >= limit) {
break;
}
}
await waitInSeconds(delay);
} while (followersFeed.isMoreAvailable());
return followers
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
How To Get More Followers On Instagram: 22 Tips To Try
Learn how to get more Instagram followers without having to pay by following our 22 tried and tested tips that work.
Read more >Get More Real Instagram Followers in 10 Steps | Sprout Social
Trying to figure out how to get more real followers on Instagram? This guide breaks down 10 tactics that can help boost your...
Read more >23 Ways to Get More Followers on Instagram [Updated for 2022]
There are three types of Instagram users that can help you to get more followers: influencers, your customers and followers, and your ...
Read more >How to Gain Your First (or Next) 1000 Instagram Followers
On Instagram, a hashtag ties conversations from different users who wouldn't already be connected into a single stream. If you use relevant ...
Read more >How To Get Followers On Instagram – Step By Step Guide To ...
The personal approach of the direct message in combination with regular engagement will increase is a great tactic to get followers on Instagram ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use recursion Like this @khanakhun
Duplicate #988