Video Search API v7 reference
Warning
Bing Search APIs are moving from Cognitive Services to Bing Search Services. Starting October 30, 2020, any new instances of Bing Search need to be provisioned following the process documented here. Bing Search APIs provisioned using Cognitive Services will be supported for the next three years or until the end of your Enterprise Agreement, whichever happens first. For migration instructions, see Bing Search Services.
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.
Note
Because URL formats and parameters are subject to change without notice, use all URLs as-is. You should not take dependencies on the URL format or parameters except where noted.
Endpoints
To request videos, send a GET request to one of the following URLs:
Endpoint | Description |
---|---|
https://api.cognitive.microsoft.com/bing/v7.0/videos/search | Returns videos that are relevant to the users search query. |
https://api.cognitive.microsoft.com/bing/v7.0/videos/details | Returns insights about a video, such as related videos. |
https://api.cognitive.microsoft.com/bing/v7.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. |
For multi-service subscriptions, you must include the region in the URL. For example: westus.api.cognitive.microsoft.com. See Supported Regions.
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 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. |
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.
|
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.
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-MSEdge-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.
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 lists the query parameters that a request may include. See the Required column for required parameters. You must URL encode the query parameter values. 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. You may use this parameter along with the offset parameter to page results. For example, if your user interface presents 20 videos per page, set count to 20 and offset to 0 to get the first page of results. For each subsequent page, increment offset by 20 (for example, 0, 20, 40).Use this parameter only with the Video Search API. Do not specify this parameter when calling the Trending Videos API or the Web Search API. |
UnsignedShort | 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 use this parameter to ensure that the specified video is the first video in the list of videos that Bing returns. For the /videos/details endpoint, you use this parameter to identify the video to get insights of. |
String | No |
modules | A comma-delimited list of insights to request. The following are the possible case-insensitive values.
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 term is not required, you should always include it because it helps to improve relevance and the results. Use this parameter only when calling the /videos/details endpoint. Do not specify this parameter when calling the /videos endpoint or the Web 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 displays 20 videos per page, set count to 20 and offset to 0 to get the first page of results. For each subsequent page, 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 nextOffset. Use this parameter only with the Video Search API. Do not specify this parameter when calling the Trending Videos API or the Web 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. Use this parameter only with the Video Search 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.
NOTE: If safeSearch is set to Off, Bing ignores it and uses 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. You may specify the language using either a 2-letter or 4-letter code. Using 4-letter codes is preferred. For a list of supported language codes, see Bing supported languages. Bing loads the localized strings if setlang contains a valid 2-letter neutral culture code (fr) or a valid 4-letter specific culture code (fr-ca). For example, for fr-ca, Bing loads the fr neutral culture code strings.If setlang is not valid (for example, zh) or Bing doesn't support the language (for example, af, af-na), Bing defaults to en (English).To specify the 2-letter code, set this parameter to an ISO 639-1 language code. To specify the 4-letter code, use the form <language>-<country/region> where <language> is an ISO 639-1 language code (neutral culture) and <country/region> is an ISO 3166 country/region (specific culture) code. For example, use en-US for United States 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 |
textDecorations | A Boolean value that determines whether display strings contain decoration markers such as hit highlighting characters. If true, the strings may include markers. The default is false. To specify whether to use Unicode characters or HTML tags as the markers, see the textFormat query parameter. For information about hit highlighting, see Hit Highlighting. |
Boolean | No |
textFormat | The type of markers to use for text decorations (see the textDecorations query parameter).The following are the possible values.
The default is Raw. For a list of markers, see Hit Highlighting. For display strings that contain escapable HTML characters such as <, >, and &, if textFormat is set to HTML, Bing escapes the characters as appropriate (for example, < is escaped to <).For information about processing strings with the embedded Unicode characters, see Hit Highlighting. |
String | No |
Filter query parameters
The following are the optional filter query parameters that you can use to filter the videos that Bing returns. You must URL encode the query parameters.
Use these query parameters only with the Video Search API. Do not specify these parameters when calling the Trending Videos API and the Search API.
Response objects
Note
To comply with the new EU Copyright Directive in France, the Bing Web, News, Video, Image and all Custom Search APIs must omit some content from certain EU News sources for French users. The removed content may include thumbnail images and videos, video previews, and snippets which accompany search results from these sources. As a consequence, the Bing APIs may serve fewer results with thumbnail images and videos, video previews, and snippets to French users.
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. |
VideosModule | Defines a list of videos. |
Category
Defines the category of trending videos.
Element | Description | Type |
---|---|---|
subcategories | A list of subcategories. For example, Top Music Videos. | Subcategory[] |
title | The name of the video category. For example, Music Videos. | String |
Error
Defines the error that occurred.
Element | Description | Type |
---|---|---|
code | The error code that identifies the category of error. For a list of possible codes, see Error Codes. | String |
message | A description of the error. | String |
moreDetails | A description that provides additional information about the error. | String |
parameter | The query parameter in the request that caused the error. | String |
subCode | The error code that identifies the error. For example, if code is InvalidRequest, subCode may be ParameterInvalid or ParameterInvalidValue. |
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 term.
Name | Value | Type |
---|---|---|
displayText | The display version of the query term. | 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 term. | 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 |
Thing
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, use all URLs 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. Only Video Search API responses include this field. |
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 https://en.wikipedia.org/wiki/ISO_8601#Durations. | String |
embedHtml | An iframe that lets you embed and run the video in 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. Use this URL in your user interface to identify the host webpage that contains the video. The URL is not a well-formed and should not be used to access the host webpage. 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. Only Web Search API responses include this field. For information about how to use this field, see Using Ranking to Display Results in the Web 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. 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 modules query parameter affects the fields that Bing includes in the response. If you set modules
to RelatedVideos, then 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. | VideosModule |
videoResult | The original video that you requested insights of (this 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), but 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 Web 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: Only Web Search API responses include this field (Video Search API responses do not include this field). |
Boolean |
nextOffset | The offset value that you set the offset query parameter to. If you set offset to 0 and count to 30 on your first request, and then set offset to 30 on your second request, some of the results in the second response may be duplicates of the first response.To prevent duplicates, set offset to the value of nextOffset . |
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[] |
scenario | The scenario that reflects the query's intent. The following are the possible values.
Only Web Search API responses 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. Only Video Search API responses include this field. |
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 |
VideosModule
Defines a list of videos.
Element | Description | Type |
---|---|---|
value | A list of videos. | Video[] |
Error codes
The following are the possible HTTP status codes that a request returns.
Status Code | Description |
---|---|
200 | Success. |
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, they used a valid subscription key) but they don’t have permission to the requested resource. Bing may also return this status if the caller exceeded their queries per month quota. |
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. |
500 | Unexpected server error. |
If the request fails, the response contains an ErrorResponse object, which contains a list of Error objects that describe what caused of error. If the error is related to a parameter, the parameter
field identifies the parameter that is the issue. And if the error is related to a parameter value, the value
field identifies the value that is not valid.
{
"_type": "ErrorResponse",
"errors": [
{
"code": "InvalidRequest",
"subCode": "ParameterMissing",
"message": "Required parameter is missing.",
"parameter": "q"
}
]
}
{
"_type": "ErrorResponse",
"errors": [
{
"code": "InvalidAuthorization",
"subCode": "AuthorizationMissing",
"message": "Authorization is required.",
"moreDetails": "Subscription key is not recognized."
}
]
}
The following are the possible error code and sub-error code values.
Code | SubCode | Description |
---|---|---|
ServerError | UnexpectedError ResourceError NotImplemented |
HTTP status code is 500. |
InvalidRequest | ParameterMissing ParameterInvalidValue HttpNotAllowed Blocked |
Bing returns InvalidRequest whenever any part of the request is not valid. For example, a required parameter is missing or a parameter value is not valid. If the error is ParameterMissing or ParameterInvalidValue, the HTTP status code is 400. If you use the HTTP protocol instead of HTTPS, Bing returns HttpNotAllowed, and the HTTP status code is 410. |
RateLimitExceeded | No sub-codes | Bing returns RateLimitExceeded whenever you exceed your queries per second (QPS) or queries per month (QPM) quota. If you exceed QPS, Bing returns HTTP status code 429, and if you exceed QPM, Bing returns 403. |
InvalidAuthorization | AuthorizationMissing AuthorizationRedundancy |
Bing returns InvalidAuthorization when Bing cannot authenticate the caller. For example, the Ocp-Apim-Subscription-Key header is missing or the subscription key is not valid.Redundancy occurs if you specify more than one authentication method. If the error is InvalidAuthorization, the HTTP status code is 401. |
InsufficientAuthorization | AuthorizationDisabled AuthorizationExpired |
Bing returns InsufficientAuthorization when the caller does not have permissions to access the resource. This can occur if the subscription key has been disabled or has expired. If the error is InsufficientAuthorization, the HTTP status code is 403. |
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 |
People's republic of China | Chinese | zh-CN |
Poland | Polish | pl-PL |
Portugal | Portuguese | pt-PT |
Republic of the Philippines | English | en-PH |
Russia | Russian | ru-RU |
Saudi Arabia | Arabic | ar-SA |
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 |
Bing supported languages
The following are the Bing supported languages that you may specify in the setLang
query parameter. The list is subject to change.
Supported Languages | Language Code |
---|---|
Arabic | ar |
Basque | eu |
Bengali | bn |
Bulgarian | bg |
Catalan | ca |
Chinese (Simplified) | zh-hans |
Chinese (Traditional) | zh-hant |
Croatian | hr |
Czech | cs |
Danish | da |
Dutch | nl |
English | en |
English-United Kingdom | en-gb |
Estonian | et |
Finnish | fi |
French | fr |
Galician | gl |
German | de |
Gujarati | gu |
Hebrew | he |
Hindi | hi |
Hungarian | hu |
Icelandic | is |
Italian | it |
Japanese | jp |
Kannada | kn |
Korean | ko |
Latvian | lv |
Lithuanian | lt |
Malay | ms |
Malayalam | ml |
Marathi | mr |
Norwegian (Bokmål) | nb |
Polish | pl |
Portuguese (Brazil) | pt-br |
Portuguese (Portugal) | pt-pt |
Punjabi | pa |
Romanian | ro |
Russian | ru |
Serbian (Cyrylic) | sr |
Slovak | sk |
Slovenian | sl |
Spanish | es |
Swedish | sv |
Tamil | ta |
Telugu | te |
Thai | th |
Turkish | tr |
Ukrainian | uk |
Vietnamese | vi |