Video Search API v5 reference

Note

A new version of this API is available. See Video Search API v7. For information about upgrading, see the upgrade guide.

The Video Search API lets you send a search query to Bing and get back a list of videos that are relevant to the search query. This section provides technical details about the query parameters and headers that you use to request videos and the JSON response objects that contain them. For examples that show how to make requests, see Searching the Web for Videos.

For information about the headers that requests should include, see Request Headers.

For information about the query parameters that requests should include, see Query Parameters.

For information about the JSON objects that the response may include, see Response Objects.

For information about permitted use and display of results, see Bing Search API Use and Display requirements.

Endpoints

To request videos, send a GET request to one of the following URLs:

Endpoint Description
https://api.cognitive.microsoft.com/bing/v5.0/videos/search Returns videos that are relevant to the users search query.
https://api.cognitive.microsoft.com/bing/v5.0/videos/details Returns insights about a video, such as related videos.
https://api.cognitive.microsoft.com/bing/v5.0/videos/trending Returns videos that are trending based on search requests made by others. The videos are broken out into different categories. For example, Top Music Videos.

For a list of markets that support trending videos, see Trending Videos.

The request must use the HTTPS protocol.

Note

The maximum URL length is 2,048 characters. To ensure that your URL length does not exceed the limit, the maximum length of your query parameters should be less than 1,500 characters. If the URL exceeds 2,048 characters, the server returns 404 Not found.

Headers

The following are the headers that a request and response may include.

Header Description
Accept Optional request header.

The default media type is application/json. To specify that the response use JSON-LD, set the Accept header to application/ld+json.
Accept-Language Optional request header.

A comma-delimited list of languages to use for user interface strings. The list is in decreasing order of preference. For more information, including expected format, see RFC2616.

This header and the setLang query parameter are mutually exclusive—do not specify both.

If you set this header, you must also specify the cc query parameter. To to determine the market to return results for, Bing uses the first supported language it finds from the list and combines it with the cc parameter value. If the list does not include a supported language, Bing finds the closest language and market that supports the request or it uses an aggregated or default market for the results. To determine the market that Bing used, see the BingAPIs-Market header.

Use this header and the cc query parameter only if you specify multiple languages. Otherwise, use the mkt and setLang query parameters.

A user interface string is a string that's used as a label in a user interface. There are few user interface strings in the JSON response objects. Any links to Bing.com properties in the response objects apply the specified language.
BingAPIs-Market Response header.

The market used by the request. The form is <languageCode>-<countryCode>. For example, en-US.

If you specify a market that is not listed in Market Codes, this value may differ from the market you specified in the mkt query parameter. The same is true if you specify values for cc and Accept-Language that can't be reconciled.
BingAPIs-TraceId Response header.

The ID of the log entry that contains the details of the request. When an error occurs, capture this ID. If you are not able to determine and resolve the issue, include this ID along with the other information that you provide the Support team.
Ocp-Apim-Subscription-Key Required request header.

The subscription key that you received when you signed up for this service in Cognitive Services.
Pragma Optional request header

By default, Bing returns cached content, if available. To prevent cached content, set the Pragma header to no-cache (for example, Pragma: no-cache).
Retry-After Response header.

The response includes this header if you exceed the number of queries allowed per second (QPS) or per month (QPM). The header contains the number of seconds that you must wait before sending another request.
User-Agent Optional request header.

The user agent originating the request. Bing uses the user agent to provide mobile users with an optimized experience. Although optional, you are encouraged to always specify this header.

The user-agent should be the same string that any commonly used browser sends. For information about user agents, see RFC 2616.

The following are examples of user-agent strings.
  • Windows Phone—Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 822)

  • Android—Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; SCH-I500 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML; like Gecko) Version/4.0 Mobile Safari/533.1

  • iPhone—Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/536.26 (KHTML; like Gecko) Mobile/10B142 iPhone4;1 BingWeb/3.03.1428.20120423

  • PC—Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko

  • iPad—Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53
X-MSEdge-ClientID Optional request and response header.

Bing uses this header to provide users with consistent behavior across Bing API calls. Bing often flights new features and improvements, and it uses the client ID as a key for assigning traffic on different flights. If you do not use the same client ID for a user across multiple requests, then Bing may assign the user to multiple conflicting flights. Being assigned to multiple conflicting flights can lead to an inconsistent user experience. For example, if the second request has a different flight assignment than the first, the experience may be unexpected. Also, Bing can use the client ID to tailor web results to that client ID’s search history, providing a richer experience for the user.

Bing also uses this header to help improve result rankings by analyzing the activity generated by a client ID. The relevance improvements help with better quality of results delivered by Bing APIs and in turn enables higher click-through rates for the API consumer.

IMPORTANT: Although optional, you should consider this header required. Persisting the client ID across multiple requests for the same end user and device combination enables 1) the API consumer to receive a consistent user experience, and 2) higher click-through rates via better quality of results from the Bing APIs.

The following are the basic usage rules that apply to this header.
  • Each user that uses your application on the device must have a unique, Bing generated client ID.

    If you do not include this header in the request, Bing generates an ID and returns it in the X-MSEdge-ClientID response header. The only time that you should NOT include this header in a request is the first time the user uses your app on that device.

  • ATTENTION: You must ensure that this Client ID is not linkable to any authenticatable user account information.

  • Use the client ID for each Bing API request that your app makes for this user on the device.

  • Persist the client ID. To persist the ID in a browser app, use a persistent HTTP cookie to ensure the ID is used across all sessions. Do not use a session cookie. For other apps such as mobile apps, use the device's persistent storage to persist the ID.

    The next time the user uses your app on that device, get the client ID that you persisted.

NOTE: Bing responses may or may not include this header. If the response includes this header, capture the client ID and use it for all subsequent Bing requests for the user on that device.

NOTE If you include the X-MSEdge-ClientID, you must not include cookies in the request.
X-Search-ClientIP Optional request header.

The IPv4 or IPv6 address of the client device. The IP address is used to discover the user's location. Bing uses the location information to determine safe search behavior.

NOTE: Although optional, you are encouraged to always specify this header and the X-Search-Location header.

Do not obfuscate the address (for example, by changing the last octet to 0). Obfuscating the address results in the location not being anywhere near the device's actual location, which may result in Bing serving erroneous results.
X-Search-Location Optional request header.

A semicolon-delimited list of key/value pairs that describe the client's geographical location. Bing uses the location information to determine safe search behavior and to return relevant local content. Specify the key/value pair as <key>:<value>. The following are the keys that you use to specify the user's location.

  • lat—Required. The latitude of the client's location, in degrees. The latitude must be greater than or equal to -90.0 and less than or equal to +90.0. Negative values indicate southern latitudes and positive values indicate northern latitudes.

  • long—Required. The longitude of the client's location, in degrees. The longitude must be greater than or equal to -180.0 and less than or equal to +180.0. Negative values indicate western longitudes and positive values indicate eastern longitudes.

  • re—Required. The radius, in meters, which specifies the horizontal accuracy of the coordinates. Pass the value returned by the device's location service. Typical values might be 22m for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP lookup.

  • ts—Optional. The UTC UNIX timestamp of when the client was at the location. (The UNIX timestamp is the number of seconds since January 1, 1970.)

  • head—Optional. The client's relative heading or direction of travel. Specify the direction of travel as degrees from 0 through 360, counting clockwise relative to true north. Specify this key only if the sp key is nonzero.

  • sp—Optional. The horizontal velocity (speed), in meters per second, that the client device is traveling.

  • alt—Optional. The altitude of the client device, in meters.

  • are—Optional. The radius, in meters, that specifies the vertical accuracy of the coordinates. Specify this key only if you specify the alt key.

NOTE: Although many of the keys are optional, the more information that you provide, the more accurate the location results are.

NOTE: Although optional, you are encouraged to always specify the user's geographical location. Providing the location is especially important if the client's IP address does not accurately reflect the user's physical location (for example, if the client uses VPN). For optimal results, you should include this header and the X-Search-ClientIP header, but at a minimum, you should include this header.

Note

Remember that the Terms of Use require compliance with all applicable laws, including regarding use of these headers. For example, in certain jurisdictions, such as Europe, there are requirements to obtain user consent before placing certain tracking devices on user devices.

Query parameters

The following is the list of query parameters that a request may specify. See the Required column for required parameters. The query parameter values must be URL encoded. For information about query parameters used to filter the videos that Bing returns, see Filter Query Parameters.

Name Value Type Required
cc A 2-character country code of the country where the results come from. For a list of possible values, see Market Codes.

If you set this parameter, you must also specify the Accept-Language header. Bing uses the first supported language it finds in the specified languages and combines it with the country code to determine the market to return results for. If the languages list does not include a supported language, Bing finds the closest language and market that supports the request. Or, Bing may use an aggregated or default market for the results.

Use this query parameter and the Accept-Language header only if you specify multiple languages. Otherwise, you should use the mkt and setLang query parameters.

This parameter and the mkt query parameter are mutually exclusive—do not specify both.
String No
count The number of videos to return in the response. The actual number delivered may be less than requested. The default is 35. The maximum is 105.

Use this parameter along with the offset parameter to page results. For example, if your user interface presents 20 videos per page, you would set count to 20 and offset to 0 to get the first page of results. For each subsequent page, you would increment offset by 20 (for example, 0, 20, 40).

This parameter is supported only by the Video API; do not specify this parameter when calling the Trending Videos API or the Search API.
UnsignedShort No
freshness Filter videos by age. Age refers to the date and time that the video was discovered by Bing. The following are the possible filter values.
  • Day—Return videos discovered within the last 24 hours
  • Week—Return videos discovered within the last 7 days

  • Month—Return videos discovered within the last 30 days
  • Year—Return images discovered within the last year
String No
id An ID that uniquely identifies a video. The Video object's videoId field contains the ID that you set this parameter to.

For the /videos/search endpoint, you can use this parameter to ensure that the specified video is the first video in the videos list.

For the /videos/details endpoint, you use this parameter to identify the video that you want to get insights of.
String No
modulesRequested A comma-delimited list of one or more insights to request. (When you URL encode the query string, the commas change to %2C.) The following are the possible case-insensitive values.
  • All—Return all available insights.

  • RelatedVideos—Return a list of videos that are similar to the video specified by the id query parameter.

  • VideoResult—Return the video that you're requesting insights of (this video is the video that you set the id query parameter to in your insights request).

If you specify an insight and there is no data for it, the response object does not include the related field. For example, if you specify RelatedVideos and none exist, the response does not include the relatedVideos field.

Although the user's query string is not required, you should always include it because it helps to improve relevance and the results.

This parameter is supported only by the /videos/details endpoint; do not specify this parameter when calling the /videos endpoint or the Search API.
String Yes
mkt The market where the results come from. Typically, mkt is the country where the user is making the request from. However, it could be a different country if the user is not located in a country where Bing delivers results. The market must be in the form <language code>-<country code>. For example, en-US. The string is case insensitive. For a list of possible market values, see Market Codes.

NOTE: If known, you are encouraged to always specify the market. Specifying the market helps Bing route the request and return an appropriate and optimal response. If you specify a market that is not listed in Market Codes, Bing uses a best fit market code based on an internal mapping that is subject to change.

This parameter and the cc query parameter are mutually exclusive—do not specify both.
String No
offset The zero-based offset that indicates the number of videos to skip before returning videos. The default is 0. The offset should be less than (totalEstimatedMatches - count).

Use this parameter along with the count parameter to page results. For example, if your user interface presents 20 videos per page, you would set count to 20 and offset to 0 to get the first page of results. For each subsequent page, you would increment offset by 20 (for example, 0, 20, 40).

It is possible for multiple pages to include some overlap in results. To prevent duplicates, see nextOffsetAddCount.

This parameter is supported only by the Video API; do not specify this parameter when calling the Trending Videos API or the Search API.
Unsigned Short No
q The user's search query string. The query string cannot be empty.

The query string may contain Bing Advanced Operators. For example, to limit videos to a specific domain, use the site: operator.

This parameter is supported only by the Video API; do not specify this parameter when calling the Trending Videos API.
String Yes
safeSearch Filter videos for adult content. The following are the possible filter values.
  • Off—If the request is through the Video Search API, the response includes adult videos, and the thumbnail images of the videos are clear (non-fuzzy). If the request is through the Web Search API, the response includes adult videos, and the thumbnail images of the videos are pixelated (fuzzy).

  • Moderate—If the request is through the Video Search API, the response won't include videos with adult content. If the request is through the Web Search API, the response may include videos with adult content but the thumbnail images of the videos are pixelated (fuzzy).

  • Strict—Do not return videos with adult content.

    If not specified, the default is Moderate.

NOTE: If the request comes from a market that Bing's adult policy requires safeSearch be set to Strict, Bing ignores the safeSearch value and uses Strict.

NOTE: If you use the site: query operator, there is the chance that the response may contain adult content regardless of what the safeSearch query parameter is set to. Use site: only if you are aware of the content on the site and your scenario supports the possibility of adult content.
String No
setLang The language to use for user interface strings. Specify the language using the ISO 639-1 2-letter language code. For example, the language code for English is EN. The default is EN (English).

Although optional, you should always specify the language. Typically, you set setLang to the same language specified by mkt unless the user wants the user interface strings displayed in a different language.

This parameter and the Accept-Language header are mutually exclusive—do not specify both.

A user interface string is a string that's used as a label in a user interface. There are few user interface strings in the JSON response objects. Also, any links to Bing.com properties in the response objects apply the specified language.
String No

Filter query parameters

The following are the optional filter query parameters that you can use to filter the videos that Bing returns. The query parameter values must be URL encoded.

These query parameters are supported only by the Video Search API; do not specify these parameters when calling the Trending Videos API and the Web Search API.

Name Value Type
pricing Filter videos by price. The following are the possible filter values.

  • Free—Return videos that are free to view
  • Paid—Return videos that require a subscription or payment to view
  • All—Do not filter by pricing. Specifying this value is the same as not specifying the pricing parameter.
String
resolution Filter videos by resolution. The following are the possible filter values.

  • 480p—Return videos with a 480p or higher resolution
  • 720p—Return videos with a 720p or higher resolution
  • 1080p—Return videos with a 1080p or higher resolution
  • All—Do not filter by resolution. Specifying this value is the same as not specifying the resolution parameter.
String
videoLength Filter videos by length. The following are the possible filter values.

  • Short—Return videos that are less than 5 minutes
  • Medium—Return videos that are between 5 and 20 minutes, inclusive
  • Long—Return videos that are longer than 20 minutes
  • All—Do not filter by length. Specifying this value is the same as not specifying the videoLength parameter.
  • String

    Response objects

    The following are the JSON response objects that the response may include. If the request succeeds, the top-level object in the response is the Videos object if the endpoint is /videos/search, VideoDetails if the endpoint is /videos/details, and TrendingVideos if the endpoint is /videos/trending. If the request fails, the top-level object is the ErrorResponse object.

    Object Description
    Category Defines the category of trending videos.
    Error Defines an error that occurred.
    ErrorResponse The top-level object that the response includes when the request fails.
    Image Defines a thumbnail image.
    MediaSize Defines the size of the media content.
    Pivot Defines the pivot segment.
    Publisher Defines a publisher or creator.
    Query Defines a search query string.
    Subcategory Defines a subcategory of videos.
    Thing Defines the name of the main entity shown in the video.
    Thumbnail Defines a thumbnail image.
    Tile Defines a video tile.
    TrendingVideos The top-level object that the response includes when a trending videos request succeeds.
    Video Defines a video that is relevant to the query.
    VideoDetails The top-level object that the response includes when a video insights request succeeds.
    Videos The top-level object that the response includes when the video request succeeds.

    Category

    Defines the category of trending videos.

    Element Description Type
    subcategories An array of subcategories. For example, Top Music Videos. Subcategory[]
    title The name of the video category. For example, Music Videos. String

    Error

    Defines the reason why the request failed.

    Element Description Type
    code The error code that identifies the error. For a list of possible codes, see Error Codes. String
    message A description of the error. String
    parameter The query parameter in the request that caused the error. String
    value The query parameter's value that was not valid. String

    ErrorResponse

    The top-level object that the response includes when the request fails.

    Name Value Type
    _type Type hint. String
    errors A list of errors that describe the reasons why the request failed. Error[]

    Image

    Defines a thumbnail image.

    Name Value Type
    contentUrl The URL to the image on the source website. String
    description An attribution. String
    headline A description of the video. String
    thumbnailUrl The URL to a thumbnail of the image. For information about resizing the image, see Resize and crop thumbnail images. String

    MediaSize

    Defines the size of the media content.

    Name Value Type
    height The height of the media content, in pixels. Integer
    width The width of the media content, in pixels. Integer

    Pivot

    Defines the pivot segment.

    Name Value Type
    pivot The segment from the original query to pivot on. String
    suggestions A list of suggested query strings for the pivot. Query

    Publisher

    Defines a publisher or creator.

    Name Value Type
    name The publisher's or creator's name. String

    Query

    Defines a search query string.

    Name Value Type
    displayText The display version of the query string. String
    searchUrl The URL that you use to get the results of the related search. Before using the URL, you must append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.

    Use this URL if you're displaying the results in your own user interface. Otherwise, use the webSearchUrl URL.
    String
    text The query string. String
    thumbnail The URL to a thumbnail of a related image.

    The object includes this field only for pivot suggestions and related searches.
    Thumbnail
    webSearchUrl The URL that takes the user to the Bing search results page for the query. String

    Subcategory

    Defines a subcategory of videos.

    Element Description Type
    tiles A list of videos that are trending in the subcategory. Each tile contains a thumbnail image of the video and a Bing query that returns the video and other related videos. Tile[]
    title The name of the subcategory. For example, This Week's Viral Videos. String


    Defines the main entity shown in the video.

    Name Value Type
    name The name of the main entity shown in the video. String

    Thumbnail

    Defines the URL to a thumbnail of an image.

    Element Description Type
    url The URL to a thumbnail of an image. String

    Tile

    Defines a video tile.

    Element Description Type
    image The URL to the thumbnail image of the video. Image
    query A query that returns a Bing search results page with videos of the subject. For example, if the category is Top Music Videos, the query returns top music videos. Query

    TrendingVideos

    The top-level object that the response includes when a trending videos request succeeds.

    Element Description Type
    bannerTiles A list of the most popular trending videos. Tile[]
    categories A list of categorized videos. For example, music videos and viral videos. Category[]

    Video

    Defines a video that is relevant to the query.

    Note

    Because the URL format and parameters are subject to change without notice, all URLs should be used as-is. You should not take dependencies on the URL format or parameters.

    Name Value Type
    allowHttpsEmbed A Boolean value that determines whether you may embed the video (see the embedHtml field) on pages that use the HTTPS protocol. Boolean
    allowMobileEmbed A Boolean value that determines whether you may embed the video (see the embedHtml field) on a mobile device. If true, you may use the HTML on a mobile device. Boolean
    creator The name of the video's creator.

    NOTE: This field is included only in Video API responses, not in Search API responses.
    Publisher
    contentUrl The URL to the video on the host website. String
    datePublished The date and time that Bing discovered the video. The date is in the format, YYYY-MM-DDTHH:MM:SS. String
    description A short description of the video. String
    duration The video's duration or length. For example, PT2M50S. For information about the format, see Durations on Wikipedia.com. String
    embedHtml An iframe that lets you embed and run the video on your webpage. String
    encodingFormat The video's mime type (for example, mp4). String
    height The height of the video, in pixels. Integer
    hostPageDisplayUrl The display URL of the webpage that hosts the video.

    You may use this URL in your user interface to identify the host webpage that contains the video. This URL is not a well-formed so don't use it to access the host webpage. The URL does not include the protocol (for example, HTTP) and may include hit highlighting characters. To access the host webpage, use the hostPageUrl URL.
    String
    hostPageUrl The URL to the webpage that hosts the video.

    This URL and contentUrl URL may be the same URL.
    String
    id An ID that uniquely identifies this video in the list of videos.

    The Video object includes this field only when the video is included in the Search API search results and the ranking response specifies a specific position for the video. For information about how to use this field, see Using Ranking to Display Results in the Search API guide.
    String
    isAccessibleForFree A Boolean value that indicates whether the video requires payment or a paid subscription to view. If true, the video is free to watch. Otherwise, if false, a payment or subscription is required.

    NOTE: If Bing is unable to determine whether payment is required, the object may not include this field.

    To ensure that Bing returns only free videos, set the pricing query parameter to Free.
    Boolean
    isSuperfresh A Boolean value that indicates whether the video was recently discovered by Bing. If true, the video was recently discovered; otherwise, false.

    To get videos discovered within the last 24 hours or the last week, use the freshness query parameter.
    Boolean
    mainEntity The name of the main entity shown in the video.

    The object includes this field only when scenario is SingleDominantVideo (see Videos).
    Thing
    motionThumbnailUrl The URL to an animated thumbnail that shows a preview of the video. Typically, you would use this URL to play a preview of the video when the user mouses over the thumbnail of the video on your results page. String
    name The name of the video. String
    publisher A list of the publishers that published the video. Publisher
    thumbnail The width and height of the thumbnail image (see thumbnailUrl). MediaSize
    thumbnailUrl The URL to a thumbnail image of the video. For information about resizing the image, see Resize and crop thumbnail images. String
    videoId An ID that uniquely identifies this video in the list of videos. You can use the ID in a subsequent request to ensure that this video is the first video returned in the list of videos. To ensure the video is the first video in the list, set the request's id query parameter to this ID. String
    viewCount The number of times that the video has been watched at the source site. Integer
    webSearchUrl The URL that takes the user to the Bing video search results and plays the video. String
    width The width of the video, in pixels. Integer

    VideoDetails

    The top-level object that the response includes when a video insights request succeeds.

    The modulesRequested query parameter affects the fields that Bing includes in the response. If you set modulesRequested to RelatedVideos, this object includes only the relatedVideos field.

    Name Value Type
    _type Type hint. String
    relatedVideos A list of videos that are similar to the specified video. Video[]
    videoResult The original video that you request insights of (this video is the video that you set the id query parameter to in your insights request). Video

    Videos

    The top-level object that the response includes when the video request succeeds.

    If the service suspects a denial of service attack, the request succeeds (HTTP status code is 200 OK); however, the body of the response is empty.

    Name Value Type
    _type Type hint. String
    id An ID that uniquely identifies the video answer.

    For information about how to use this field, see Using Ranking to Display Results in the Search API guide.
    String
    isFamilyFriendly A Boolean value that determines whether one or more of the videos contain adult content. If none of the videos contain adult content, isFamilyFriendly is set to true. Otherwise, if one or more of the videos contain adult content, isFamilyFriendly is set to false.

    If false, the thumbnail images of the videos are pixelated (fuzzy).

    NOTE: This field is included only in Web Search API responses, not in Video Search API responses.
    Boolean
    nextOffsetAddCount The number to add to the offset query parameter to ensure that you don't receive duplicates when paging results.

    If you set offset to 0 and count to 30 in your first request, and then set offset to 30 in your second request, some results in the second response may be duplicates of the first response.

    To prevent duplicates, add the value of nextOffsetAddCount to the sum of count and offset. For example, if the current value of offset and count is 30, and the value of nextOffsetAddCount is 9, set offset to 69 (count + offset + nextOffsetAddCount).
    Integer
    pivotSuggestions A list of pivots that segment the original query. For example, if the query was Cleaning Gutters, Bing might segment the query into Cleaning and Gutters.

    The Cleaning pivot may contain query suggestions such as Gutter Installation and Gutter Repair, and the Gutters pivot may contain query suggestions such as Roof Cleaning and Window Cleaning.
    Pivot[]
    queryExpansions A list of expanded queries that narrows the original query. For example, if the query was Cleaning+Gutters, the expanded queries might be: Gutter Cleaning Tools, Cleaning Gutters From the Ground, Gutter Cleaning Machine, and Easy Gutter Cleaning. Query[]
    scenario The scenario that reflects the query's intent. The following are the possible values.
    • List—For scenarios where there's more than one video that matches the user's intent.
    • SingleDominantVideo—For scenarios where there's a single music video that matches the user's request (the Videos answer contains only one music video). This scenario is set only for music videos.

    The response includes this field only when calling Web Search API. The Video Search API response does not include this field.
    String
    totalEstimatedMatches The estimated number of videos that match the query. Use this number along with the count and offset query parameters to page the results.

    The response includes this field only when calling the Video Search API. The Web Search API does not include this field in the response.
    Long
    value A list of videos that are relevant to the query. Video[]
    webSearchUrl The URL to the Bing search results for the requested videos. String

    Error codes

    The following are the possible HTTP status codes that a request may return.

    Status Code Description
    200 The call succeeded.
    400 One of the query parameters is missing or not valid.
    401 The subscription key is missing or is not valid.
    403 The user is authenticated (for example, used a valid subscription key) but they don’t have permission to the requested resource.

    If the caller exceeded their queries per month quota, Bing may also return this status.
    410 The request used HTTP instead of the HTTPS protocol. HTTPS is the only supported protocol.
    429 The caller exceeded their queries per second quota.

    If the request fails, the body of the response will contain an ErrorResponse object. The response object will include an error code and description of the error. If the error is related to a parameter, the parameter field will identify the parameter that is the issue. And if the error is related to a parameter value, the value field will identify the value that is not valid.

    {
      "_type": "ErrorResponse", 
      "errors": [
        {
          "code": "RequestParameterMissing", 
          "message": "Required parameter is missing.", 
          "parameter": "q" 
        }
      ]
    }
    
    
    {
      "_type": "ErrorResponse", 
      "errors": [
        {
          "code": "AuthorizationMissing", 
          "message": "Authorization is required.", 
        }
      ]
    }
    

    The following are the possible error codes.

    Error code Description
    RequestParameterMissing The request is missing a required parameter. The parameter field identifies the missing parameter.
    RequestParameterInvalidValue The parameter value is not valid. The parameter field identifies the parameter that contains the invalid value, and the value field contains the value that is not valid.
    ResourceAccessDenied The caller does not have permissions to access the resource. This error can occur if the subscription key has been disabled or has expired.
    ExceededVolume The caller exceeded their queries per month (QPM) quota.
    ExceededQpsLimit The caller exceeded their queries per second (QPS).
    Disabled The caller does not have permissions to access the resource.
    UnexpectedError An unexpected error occurred on the server. Try again later.
    DataSourceErrors There was an error access the resource.
    AuthorizationMissing Bing is unable to authenticate the caller. This error may occur if the Ocp-Apim-Subscription-Key header is missing.
    HttpNotAllowed The request used the HTTP protocol instead of the HTTPS protocol; Bing supports only HTTPS.
    InvalidAuthorization Bing is unable to authenticate the caller. This may occur if the subscription key is not valid.
    InsufficientScope The caller does not have permissions to access the resource. This error can occur if the subscription key has expired.

    Market codes

    The following table lists the market code values that you may use to specify the mkt query parameter. Bing returns content for only these markets. The list is subject to change.

    For a list of country codes that you may specify in the cc query parameter, see Country codes.

    Country/Region Language Market code
    Argentina Spanish es-AR
    Australia English en-AU
    Austria German de-AT
    Belgium Dutch nl-BE
    Belgium French fr-BE
    Brazil Portuguese pt-BR
    Canada English en-CA
    Canada French fr-CA
    Chile Spanish es-CL
    Denmark Danish da-DK
    Finland Finnish fi-FI
    France French fr-FR
    Germany German de-DE
    Hong Kong SAR Traditional Chinese zh-HK
    India English en-IN
    Indonesia English en-ID
    Italy Italian it-IT
    Japan Japanese ja-JP
    Korea Korean ko-KR
    Malaysia English en-MY
    Mexico Spanish es-MX
    Netherlands Dutch nl-NL
    New Zealand English en-NZ
    Norway Norwegian no-NO
    People's republic of China Chinese zh-CN
    Poland Polish pl-PL
    Republic of the Philippines English en-PH
    Russia Russian ru-RU
    South Africa English en-ZA
    Spain Spanish es-ES
    Sweden Swedish sv-SE
    Switzerland French fr-CH
    Switzerland German de-CH
    Taiwan Traditional Chinese zh-TW
    Turkey Turkish tr-TR
    United Kingdom English en-GB
    United States English en-US
    United States Spanish es-US

    Country codes

    The following are the country codes that you may specify in the cc query parameter. The list is subject to change.

    Country/Region Country Code
    Argentina AR
    Australia AU
    Austria AT
    Belgium BE
    Brazil BR
    Canada CA
    Chile CL
    Denmark DK
    Finland FI
    France FR
    Germany DE
    Hong Kong SAR HK
    India IN
    Indonesia ID
    Italy IT
    Japan JP
    Korea KR
    Malaysia MY
    Mexico MX
    Netherlands NL
    New Zealand NZ
    Norway NO
    People's Republic of China CN
    Poland PL
    Portugal PT
    Republic of the Philippines PH
    Russia RU
    Saudi Arabia SA
    South Africa ZA
    Spain ES
    Sweden SE
    Switzerland CH
    Taiwan TW
    Turkey TR
    United Kingdom GB
    United States US