SOAP Implementation for Multiple-SourceType Requests

Bing

This topic contains the following details of a Web 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 (Web SourceType).

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

<?xml version="1.0" encoding="utf-16"?>
<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>Microsoft Offic</Query>
        <AppId>Insert your AppId here</AppId>
        <Adult>Moderate</Adult>
        <Sources>
          <SourceType>Web</SourceType>
          <SourceType>Spell</SourceType>
        </Sources>
        <Web>
          <Count>2</Count>
          <FileType />
        </Web>
      </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-16"?>
<!--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>Microsoft Offic</SearchTerms>
          <AlteredQuery>microsoft office</AlteredQuery>
          <AlterationOverrideQuery>Microsoft +Offic</AlterationOverrideQuery>
        </Query>
        <Spell>
          <Total>1</Total>
          <Results>
            <SpellResult>
              <Value>Microsoft Office</Value>
            </SpellResult>
          </Results>
        </Spell>
        <Web>
          <Total>30900000</Total>
          <Offset>0</Offset>
          <Results>
            <WebResult>
              <Title>Office Online Home Page - Microsoft Office Online</Title>
              <Description>Offers how-to articles, downloads, templates, clip art, and training.</Description>
              <Url>http://office.microsoft.com/</Url>
              <DisplayUrl>http://office.microsoft.com/</DisplayUrl>
              <DateTime>2008-11-01T15:53:36Z</DateTime>
            </WebResult>
            <WebResult>
              <Title>Mactopia - Discover Office 2008 for Mac from Microsoft</Title>
              <Description>With Office 2008 for Mac, simplify your workday with great-looking documents. Unleash your creativity with powerful, easy-to-use and intuitive tools.</Description>
              <Url>http://www.microsoft.com/mac/</Url>
              <DisplayUrl>http://www.microsoft.com/mac/</DisplayUrl>
              <DateTime>2008-10-27T08:42:52Z</DateTime>
              <SearchTags>
                <WebSearchTag>
                  <Name>search.mnp.sitetitle</Name>
                  <Value>"Home"</Value>
                </WebSearchTag>
                <WebSearchTag>
                  <Name>search.mnp.masthead</Name>
                  <Value>"true"</Value>
                </WebSearchTag>
                <WebSearchTag>
                  <Name>search.mnp.toc</Name>
                  <Value>"none"</Value>
                </WebSearchTag>
              </SearchTags>
            </WebResult>
          </Results>
        </Web>
      </parameters>
    </SearchResponse>
  </soapenv:Body>
</soapenv:Envelope>

Show: