Jure Cuhalev

26 Aug, 2006

MSN Live Search python API access

Posted by: Jure Cuhalev In: Planet Kiberpipa|Planet LiveCD|python|Tech

Here is a little code snippet that will allow your python script to access MSN Search.

I’m posting it here in hope that google picks it up and that next person who wants to just google it won’t have to start from scratch.

(I’m not sure how to post it to retain formatting, but since it’s a simple script anyway it doesn’t matter much)


from SOAPpy import WSDL

wsdl_url = 'http://soap.search.msn.com/webservices.asmx?wsdl'
server = WSDL.Proxy(wsdl_url)

params = {'AppID': '***!!!YOUR_API_KEY_HERE!!!***',
'Query': query,
'CultureInfo': 'en-US',
'SafeSearch': 'Off',
'Requests': {
'SourceRequest':{
'Source': 'Web',
'Offset': 0,
'Count': 10,
'ResultFields': 'All',
}}
}

server_results = server.Search(Request=params)
results = server_results.Responses[0].Results[0]

return results

Related posts:

  1. Listing all keys in S3 bucket using python boto
  2. Usability reflections: The failure of search in online stores
  3. Python SMTP sink server
  4. Double bind() for better `this` experience
  5. Python MySpace API proxy

5 Responses to "MSN Live Search python API access"

1 | paul

October 23rd, 2006 at 4:09 pm

Avatar

thank you, whoever you are

2 | al

December 10th, 2006 at 3:36 pm

Avatar

Thank you very much. You have really saved my time.

3 | Ben McRedmond

December 27th, 2006 at 11:49 pm

Avatar

thanks so much your the best!!!

4 | boyter

January 4th, 2007 at 10:55 am

Avatar

Thank you. I was looking for somthing to do that. Didnt feel like figuring it out on my own.

5 | sleek

March 28th, 2007 at 2:18 pm

Avatar

Can anyone give an example of how to translate this particular request into a ZSI example?