SOAP Implementation for RelatedSearch SourceType

Bing

This topic contains the following details of a RelatedSearch SourceType query sent to the SOAP interface:

  • Request Example

  • Response Example

For an example of code that might generate the request in this topic, see SOAP Code Samples (RelatedSearch SourceType).

This section contains an example of an HTTP query string that the aforementioned code might generate.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <SearchRequest xmlns="http://schemas.microsoft.com/LiveSearch/2008/03/Search">
         <parameters>
            <Market>en-us</Market>
            <Query>free</Query>
            <AppId>Insert your AppId</AppId>
            <Options>
               <SearchOption>EnableHighlighting</SearchOption>
            </Options>
            <Sources>
               <SourceType>RelatedSearch</SourceType>
            </Sources>
         </parameters>
      </SearchRequest>
   </soap:Body>
</soap:Envelope>

This section contains an example of a response that Bing might return when sent the query string in the previous section:

<?xml version="1.0" encoding="utf-8"?>
<!--pageview_candidate-->
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <SearchResponse xmlns="http://schemas.microsoft.com/LiveSearch/2008/03/Search">
         <parameters>
            <Version>2.0</Version>
            <Query>
               <SearchTerms>free</SearchTerms>
            </Query>
            <RelatedSearch>
               <Results>
                  <RelatedSearchResult>
                     <Title>Free Stuff</Title>
                     <Url>http://bing.com/results.aspx?q=Free+Stuff</Url>
                  </RelatedSearchResult>
                  <RelatedSearchResult>
                     <Title>Free Games</Title>
                     <Url>http://bing.com/results.aspx?q=Free+Games</Url>
                  </RelatedSearchResult>
                  <RelatedSearchResult>
                     <Title>Free Music Downloads</Title>
                     <Url>http://bing.com/results.aspx?q=Free+Music+Downloads</Url>
                  </RelatedSearchResult>
                  <RelatedSearchResult>
                     <Title>Freebox</Title>
                     <Url>http://bing.com/results.aspx?q=Freebox</Url>
                  </RelatedSearchResult>
                  <RelatedSearchResult>
                     <Title>Free Internet</Title>
                     <Url>http://bing.com/results.aspx?q=Free+Internet</Url>
                  </RelatedSearchResult>
                  <RelatedSearchResult>
                     <Title>Free Clip Art</Title>
                     <Url>http://bing.com/results.aspx?q=Free+Clip+Art</Url>
                  </RelatedSearchResult>
                  <RelatedSearchResult>
                     <Title>Free Screensavers</Title>
                     <Url>http://bing.com/results.aspx?q=Free+Screensavers</Url>
                  </RelatedSearchResult>
                  <RelatedSearchResult>
                     <Title>Free Ringtones</Title>
                     <Url>http://bing.com/results.aspx?q=Free+Ringtones</Url>
                  </RelatedSearchResult>
               </Results>
            </RelatedSearch>
         </parameters>
      </SearchResponse>
   </soapenv:Body>
</soapenv:Envelope>

Show: