SOAP Implementation for Video SourceType (Bing, Version 2.1

Bing

This topic contains the following details of a Video 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 (Video 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>
        <UILanguage />
        <Query>xbox site:microsoft.com</Query>
        <AppId>Insert your AppId here</AppId>
        <Adult>Moderate</Adult>
        <Options>
          <SearchOption>DisableLocationDetection</SearchOption>
        </Options>
        <Sources>
          <SourceType>Video</SourceType>
        </Sources>
        <Video>
          <Offset>0</Offset>
          <Count>2</Count>
          <Filters>
            <string />
          </Filters>
        </Video>
      </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.1</Version>
        <Query>
          <SearchTerms>xbox site:microsoft.com</SearchTerms>
        </Query>
        <Video>
          <Total>46</Total>
          <Offset>0</Offset>
          <Results>
            <VideoResult>
              <Title>Whiteboard Videos </Title>
              <PlayUrl>http://msdn.microsoft.com/en-us/testing/bb734786.aspx</PlayUrl>
              <RunTime>550954</RunTime>
              <ClickThroughPageUrl>http://bing.com/video/results.aspx?q=xbox&amp;scope=video&amp;docid=562234982542&amp;FORM=SOAPGN</ClickThroughPageUrl>
              <StaticThumbnail>
                <Url>http://ts3.images.live.com/video/thumbnail.aspx?q=562234982542&amp;id=df47eb1200d69d0a60ca7e3dfe63116a</Url>
                <ContentType>image/jpeg</ContentType>
                <Width>160</Width>
                <Height>120</Height>
                <FileSize>3540</FileSize>
              </StaticThumbnail>
            </VideoResult>
            <VideoResult>
              <Title>Media &amp; Entertainment Film</Title>
              <PlayUrl>http://www.microsoft.com/resources/mediaandentertainment/film.mspx</PlayUrl>
              <RunTime>307240</RunTime>
              <ClickThroughPageUrl>http://bing.com/video/results.aspx?q=xbox&amp;scope=video&amp;docid=639512871064&amp;FORM=SOAPGN</ClickThroughPageUrl>
              <StaticThumbnail>
                <Url>http://ts1.images.live.com/video/thumbnail.aspx?q=639512871064&amp;id=36b2e5c5b027d8f1bb1b262fdda6d0a8</Url>
                <ContentType>image/jpeg</ContentType>
                <Width>160</Width>
                <Height>120</Height>
                <FileSize>3402</FileSize>
              </StaticThumbnail>
            </VideoResult>
          </Results>
        </Video>
      </parameters>
    </SearchResponse>
  </soapenv:Body>
</soapenv:Envelope>
Show: