Users/lookup just returning 1 user, asked for 100


#1

We have not changed any of our code (it’s been running since 1.1 came out) and have employed a scale down system that tries to fetch 100 user details through “users/lookup”, if it times out, scales down to 50 users, if not, scales down to 1 user, etc. – Once things work again, it scales up back to 100.

Since a few days ago, we only receive 1 result, constantly. This completely burns our rate limit (180 users per window, instead of up to 100 x 180 users).

Is there something faulty with the endpoint, or has it changed? We also see a lot of invalid IDs … dead accounts… What’s up?

Please advise, we’re having thousands of paying customers on our end waiting for a fix.


#2

I’ve just verified this, it seems to relate to a change in Twitter’s response handler.

If I just process one account, and reduce the number of IDs requested to 50, then I’ll receive between 1 and 3 hydrated user objects. Requesting with 100 IDs, always delivers just 1 hydrated user object.

What’s going on guys? @episod any ideas?


#3

Can you provide some example requests that demonstrate this behaviour?


#4

I to can replicate this problem. To add to it, if any one of the list fails, no matter what order the accounts are in, I get an error returned and no actual data.

I am doing this looking up via screen_name


#5

Hello Andy, thanks for taking this on.

One user I am seeing this problem with has the ID: 57497901

I then call: https://api.twitter.com/1.1/users/lookup with include_entities=false and user_id set to the following:

44858628,1213292732,164863811,1336462814,39828444,122479487,564823586,110808787,357536516,84214803,21010309,705143240,149187945,268509363,194205193,315181390,19411096,1073425008,949878121,24117593,22382572,631912814,4539531,364661176,113970591,111030697,545981009,280918562,608386331,144672606,632946250,243547539,714789468,416055346,227928961,53000756,190763837,914509020,271991646,258597860,128404261,14816063,95082509,18408470,112364783,127010225,441864229,338760466,280802116,545755653

This responds with just 1 user object, with the ID: 545755653


#6

I was able to identify the bug on our end and now understand the issue better:

What happened was this:
When some of those IDs sent to users/lookup are invalid (dead accounts), you don’t receive details on them back. We ran into cases where we had large amounts of such IDs piling up, so each call had one follower in there that did work, the others were being carried forward. Up to a point where we were just sending calls that had no response.

I guess there isn’t anything Twitter can do about this, it’s just sad that a lot of those accounts might be there in the database from a scan yesterday and today, they’re burning up costly calls in the rate limits until we get through that to more valid IDs then.

Alright, I think you can close this, not sure why this has never been an issue in the past year, seeing it for the first time now.

Thanks.


#7

ok, this is useful feedback anyway - appreciate the level of detail!