Skip to content

MSN Live Search python API access

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

5 responses to “MSN Live Search python API access

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

Comments are closed.