Yahoo’s new API BOSS

Tuesday, 29th July, 2008 // 7:26 p.m.

Tagged: api , boss , bossarray , django , google , python , search and yahoo

For about an year I was wondering if google provided any API's for the 3rd party players to utilize google search. In fact google has supported the Soap API for few years. The Soap API provided a lot of freedom for the developers to utilize the Google search remotely. The main advantage was that we could hide the backend queries from the presentation. In simple terms the results do not have the brand name google. Although google limited the queries to 1000 per day it was worth while. As of December 5, 2006, google is no longer issuing any new API keys to the developers and instead started promoting the AJAX search API which does not give the developers the freedom to manipulate the presentation of search results.

Now it is Yahoo which has come up with the BOSS api which is used to launch search products. The first obvious question is how is it different from the previous Yahoo API.

  1. Unlimited queries per day.
  2. No restriction on presentation.
  3. Search Web, Images & News.
  4. Get Spelling sugestions.
  5. Reorder the search results & many other.

So let's get started with a small exercise to know how Y! BOSS API works. Sign up for an BOSS Application ID. For this excercise I am using Y! BOSS mashup python library. You can download the library here. Unzip the library. Open config.json file in code editor and edit the application id with yours. Fire up your terminal (if on mac or command prompt on windows).

#!/bin/sh
$ cd Desktop/boss_mashup_framework_0.1
$ export PYTHONPATH=$PYTHONPATH:$PWD
$ python
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
>>> from yos.boss import ysearch
>>> data = ysearch.search('python', count=10)
>>> data
# You find all the top search results for the keyword 'python' 
in a dictionary format. Voila you are able to search the web from your    
terminal.

Will Larson developed a python wrapper for the Yahoo BOSS boss_array.py. This eases our development by a large amount. Here is a good tutorial using the wrapper. Here is the link to the documentation where you can certainly find more features.

Conclusion: Yahoo BOSS api is certainly a boon for third party apps and developers. All it needs to improve is the speed and accuracy. It will take some time for the developers to accustom to it and develop new API's over BOSS.

Comment Form

MarkDown syntax enabled

9 comments:

  1. 001// Praveen// Tuesday, 29th July, 2008, 7:51 p.m.

    Is it legal to use BOSS without YAHOO! brand?

  2. 002// Yashh// Tuesday, 29th July, 2008, 8 p.m.

    Hey Praveen, its up to you to deciede on that point. You can end up not mentioning Yahoo's brand. But a small line of applause in privacy /about page would be an ethical thing. Anyway its up to you.

  3. 003// Eldon// Tuesday, 29th July, 2008, 8:44 p.m.

    Great writeup!

  4. 004// Jimit// Thursday, 14th August, 2008, 9:22 p.m.

    Also check Yahoo!'s new APT called SearchMonkey

    It looks pretty cool to customize search :)

  5. 005// Jimit// Thursday, 14th August, 2008, 9:23 p.m.

    @Praveen

    It's public API's. You can use it for whatever you want and there is no Yahoo! brand involved in it.

  6. 006// yashh// Friday, 15th August, 2008, 9:45 a.m.

    @Jimit
    well put. Its a public API, so you have complete control over it. Never heard of the SearchMonkey. I'll check it out. Thanks for the info.

  7. 007// Dave// Sunday, 31st August, 2008, 3:30 a.m.

    Hi.

    During BOSS App Id registration, I'm not able to select the checkbox "BOSS Search" because it's disabled unless I enable the "Browser Based Authentication"-BBAuth, am I correct?

    So there is no way to use BOSS without BBAuth? I'd rather avoiding it.

  8. 008// Yashh// Sunday, 31st August, 2008, 9:25 a.m.

    Hey @Dave

    Yes it is required to select BBAuth if you want to select the BOSS search exclusively. I tried with "No Authentication" and acquired an app id. I was still able to search YAHOO with it.

    The only concern of Yahoo is that if you can authenticate you are given the freedom to search news/regular web etc. If there is no authentication you will be able to get all the results which is a combination. Let me know if you have any issues.

  9. 009// Motercalo// Friday, 18th June, 2010, 4:11 a.m.

    Hi,

    I want to create my website too, could you help me ?

    ++

thnknsblvng