Twython get followers count

1k Views Asked by At

Is there an easy way to get the number of followers an account has without having to loop through cursors? I'm looking for a simple function call which will return to me just the number of followers the use with a given Twitter ID has.

Just looking for the physical number not access to anything else

2

There are 2 best solutions below

0
On BEST ANSWER

What I ended up doing was .show_user(user_id=twitter_id) which returns (among other things) the followers count via ['followers_count']

0
On

You can use get users/lookup endopoint to query up to 100 of screen names or user ids, followers_count is included as well.

In twython it would be lookup_user api function.

Returns fully-hydrated user objects for up to 100 users per request, as specified by comma-separated values passed to the user_id and/or screen_name parameters.