Yahoo has a search api with generous limits, BOSS. There are a few python apis around it. But we wanted a lighter api, and one which has the same interface as out Bing Python api. So here is the updated bingapi.(Now with bossapi.py as well). Or svn it from here
Usage
Usage is mostly compatible with bingapi
In [2]: from bingapi import bossapi
In [3]: api = bossapi.Boss('<appid>')
In [4]: api.do_web_search('Uswaretech')
Out[4]: ....
In [5]: api.do_news_search('salsa')
Out[5]: ...
In [6]: api.do_siteexplorer_search('http://uswaretech.com')
Out[6]: .....
Related posts:

{ 5 comments… read them below or add one }
This is great. Does anybody know how to offset the results in the same way as Bing?
Tom:
http://developer.yahoo.com/search/boss/boss_guide/ It accepts all options described here as keyword arguments.
I think there’s a bug in this code.
On line 24, the “query” parameter needs to be quoted. Add “from urllib import quote” somewhere, and then, on line 24, do: final_url = base_url%(type_, quote(query), payload) This bug is not normally manifest, because (as far as I can tell) urllib will escape those characters itself. However, if you (as I have) port the code to Google App Engine and use Google’s “urlfetch” instead, you may find yourself baffled by this for hours.
Thanks Dan, I was having some problems with the bossapi and I solved thanks to your comment!
I updated the code. So if you checkout from the source, you should not have this problem. Let me if you do.