Number of followers API


#1

Two main questions:-

  1. How do I go about creating a very simple API which can tell me how many followers a given username would have? ie A user types in a username into my site, then a figure comes up saying how many followers they have?

  2. Does making this sort of query have any limitations in the amount of times I can do it? ie How many queries on this basis would I be permitted to do in an hour and how do I go about increasing this number to as high as it goes?

I really hope someone can help me, you’d be a star! Many thanks,

Josh


#2

As far as i know there is not any filed of Follower_count in tweets . :confused:
there is only field with name following that is always null.


#3

I was looking at follower IDs in the Friends and Followers section of the API (https://dev.twitter.com/docs/api/1/get/followers/ids). Could this not be utilised?

Thanks!


#4

Hi @Justjamit,

  1. If you’re looking up the follower count of a single user at a time, [node:66] returns the follower count as part of its response. – The field you’re looking for is: followers_count

  2. If you’re not authenticating with OAuth, you can make 150 GET-based requests per hour to the Twitter REST API, so you would need a caching/timed persistence and throttling strategy of some kind and would likely prefer [node:63], which allows you to do bulk user lookups. More about [node:121]


#5

Thank you, that has been very helpful. I will look through this now and report back if I have any problems. :slight_smile:


#6

Hello,

I’m looking for a Google Docs or Excel spreadsheet that will populate a cell with a follower count based on the Twitter username in the adjacent cell.

In other words, if cell A1 contained my username (davehaber), B1 would show my current follower count.

Does this exist or can you provide a formula for this that will work in Excel / Google Docs?

Thanks,

Dave


#7

@Dave - guessing you already found a solution but if not you might try using the XpathonURL function in the SeoTools plugins… works great for me!

Ex. Formula:
=XPathOnUrl(https://api.twitter.com/1/users/show.xml?screen_name=coreyac&include_entities=true,"statuses/status/user/followers_count")


#8

This approach will stop working very soon – you’re using a deprecated version of the API (v1) and a no longer supported format (XML).


#9

is there a viable method to achieve it in the new API ?


#10

Would also appreciate a solution for this.


#11

This is still feasible in the new API, using either users/show (to get followers of one user) or users/lookup (to get followers of many users) endpoints.
cf. https://dev.twitter.com/docs/api/1.1#112 for technical details

The difference with previous solution is that you can probably not do it anymore directly from within the spreadsheet, but you should use a separate (small) software process (can be hosted on your own computer, not necessarily on a server).


#15