Get search internal error code, 131



I am learning to using the search API. I am using to get the tweets from a week ago. I am getting the following error after a requests:
{‘errors’: [{‘message’: ‘Internal error’, ‘code’: 131}]}
I am using python-twitter library. I am running my code on Mac OSX. I built the base URL corresponding to 1.1 version with the parameters ‘q’ and ‘count’ set. In ‘q’ I am setting the date limit to a week ago from today. I put FetchURL in try and in exception I put - except twitter.TwitterError, e:
print ‘Error %s’ % str(e) which is printing the above error.

I haven’t yet coded to check for the rate limit.

Can you please let me know what could the reason be?



This indicates a server-side issue processing your query. Can you share the types of queries you were executing? What kind of rates were you executing on? Were you using since_id and max_id?


Even with Although it seems there are more pressing issues with twitter at the moment (It’s currently displaying technical error) & also the API is showing a few errors:

I guess i’ll sit this one out and wait for it to get fixed on twitters end.


Taylor, I am having the same issue. About 2.5 hours ago, I got the “‘code’ => 131” when checking the array returned by the following line:

$twit_connect->get(“statuses/user_timeline”, array(‘exclude_replies’ => true, ‘screen_name’ => $twit_user, ‘since_id’ => $last_id));

This had been working fine up until then. We only pull data for one timeline every 15 minutes.

Since then, every data pull results in NULL for the returned variable.

The old RSS feed version of the script is giving “‘error’ => ‘Internal error’,”.

Oops, never mind. The scripts just returned updates. Must have been a Twitter internal temp problem.


I have been seeing this issue for months and have reported it here a few times.

I have tested and found a temporary fix. When you receive a 131 error, simply repeat the request. The request appears to always go through the second time.