{"id":61,"date":"2006-08-26T23:28:21","date_gmt":"2006-08-26T22:28:21","guid":{"rendered":"http:\/\/www.kiberpipa.org\/~gandalf\/blog\/?p=61"},"modified":"2006-08-26T23:28:21","modified_gmt":"2006-08-26T22:28:21","slug":"msn-live-search-python-api-access","status":"publish","type":"post","link":"https:\/\/www.jurecuhalev.com\/blog\/msn-live-search-python-api-access\/","title":{"rendered":"MSN Live Search python API access"},"content":{"rendered":"<p>Here is a little code snippet that will allow your python script to access <a href=\"http:\/\/search.msn.com\/\">MSN Search<\/a>. <\/p>\n<p>I&#8217;m posting it here in hope that google picks it up and that next person who wants to just google it won&#8217;t have to start from scratch.<\/p>\n<p>(I&#8217;m not sure how to post it to retain formatting, but since it&#8217;s a simple script anyway it doesn&#8217;t matter much)<\/p>\n<p><code><br \/>\n       from SOAPpy import WSDL<\/p>\n<p>       wsdl_url = 'http:\/\/soap.search.msn.com\/webservices.asmx?wsdl'<br \/>\n       server = WSDL.Proxy(wsdl_url)<\/p>\n<p>       params = {'AppID': '***!!!YOUR_API_KEY_HERE!!!***',<br \/>\n                 'Query': query,<br \/>\n                 'CultureInfo': 'en-US',<br \/>\n                 'SafeSearch': 'Off',<br \/>\n                 'Requests': {<br \/>\n                  'SourceRequest':{<br \/>\n                  'Source': 'Web',<br \/>\n                  'Offset': 0,<br \/>\n                  'Count': 10,<br \/>\n                  'ResultFields': 'All',<br \/>\n                 }}<br \/>\n                }<\/p>\n<p>       server_results = server.Search(Request=params)<br \/>\n       results = server_results.Responses[0].Results[0]<\/p>\n<p>       return results<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a little code snippet that will allow your python script to access MSN Search. I&#8217;m posting it here in hope that google picks it up and that next person who wants to just google it won&#8217;t have to start from scratch. (I&#8217;m not sure how to post it to retain formatting, but since [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[15,14],"tags":[],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","category-python","category-tech"],"acf":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/comments?post=61"}],"version-history":[{"count":0,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/posts\/61\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/media?parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/categories?post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/tags?post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}