News for hackers. Stuff that matters.
Re:Querying Google/a search engine through my webapp? by simonw on Sunday June 08, 2008 @03:10PM (#212234)
Yahoo! have a great search API: http://developer.yahoo.com/search/

Google quietly re-introduced their search API a few months ago under the guise of the "Ajax Search API that doesn't require JavaScript" - it requires you to provide a referrer which is a bit weird, but it should work OK: http://code.google.com/apis/ajaxsearch/documentation/#fonje

Re:Querying Google/a search engine through my webapp? by schtog on Sunday June 08, 2008 @09:22PM (#212411)
Went with Yahoo's, you are right, it is very easy to use.

Just get a Yahoo-ID and download the API. The following code searches for Zlatan Ibrahimovic and prints the top 40 results:

  from yahoo.search.web import WebSearch
 
  srch = WebSearch(app_id="YahooDemo", query = "Zlatan  Ibrahimovic", results = 9)

  for res in srch.parse_results():
     print res.Url
Re:Querying Google/a search engine through my webapp? by schtog on Monday June 09, 2008 @09:43PM (#213417)
sorry top 9 results obv.