Images - Visual Search

Visual Search API lets you discover insights about an image such as visually similar images, shopping sources, and related searches. The API can also perform text recognition, identify entities (people, places, things), return other topical content for the user to explore, and more. For more information, see Visual Search Overview.

POST {Endpoint}/bing/v7.0/images/visualsearch
POST {Endpoint}/bing/v7.0/images/visualsearch?mkt={mkt}&safeSearch={safeSearch}&setLang={setLang}

URI Parameters

Name In Required Type Description
Endpoint
path True
  • string

Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com").

mkt
query
  • string

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 -. 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.

safeSearch
query

Filter the image results in actions with type 'VisualSearch' for adult content. The following are the possible filter values. Off: May return images with adult content. Moderate: Do not return images with adult content. Strict: Do not return images with adult content. The default is Moderate. If the request comes from a market that Bing's adult policy requires that safeSearch is set to Strict, Bing ignores the safeSearch value and uses Strict. If you use the site: filter in the knowledge request, 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.

setLang
query
  • string

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. 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.

Request Header

Media Types: "multipart/form-data", "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"

Name Required Type Description
X-BingApis-SDK True

Activate swagger compliance.

Accept
  • string

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
  • string

A comma-delimited list of one or more languages to use for user interface strings. The list is in decreasing order of preference. For additional 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.

Content-Type
  • string

Must be set to multipart/form-data and include a boundary parameter (for example, multipart/form-data; boundary=). For more details, see Content form types.

User-Agent
  • string

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
  • string

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. 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. 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. 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. ATTENTION: You must ensure that this Client ID is not linkable to any authenticatable user account information. If you include the X-MSEdge-ClientID, you must not include cookies in the request.

X-MSEdge-ClientIP
  • string

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. 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
  • string

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 :. 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. Although many of the keys are optional, the more information that you provide, the more accurate the location results are. 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-MSEdge-ClientIP header, but at a minimum, you should include this header.

Responses

Name Type Description
200 OK

Success.

Other Status Codes

An error has occurred. Check the response type and/or status code for more details.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Sample Request

POST {Endpoint}/bing/v7.0/images/visualsearch
X-BingApis-SDK: true
Content-Type: multipart/form-data

Sample Response

{
  "_type": "ImageKnowledge",
  "tags": [
    {
      "image": {
        "thumbnailUrl": "https://tse4.mm.bing.net/th?q=Space+Needle&pid=Api&mkt=en-US&adlt=moderate"
      },
      "displayName": "Space Needle",
      "boundingBox": {
        "queryRectangle": {
          "topLeft": {
            "x": 0,
            "y": 0
          },
          "topRight": {
            "x": 1,
            "y": 0
          },
          "bottomRight": {
            "x": 1,
            "y": 1
          },
          "bottomLeft": {
            "x": 0,
            "y": 1
          }
        },
        "displayRectangle": {
          "topLeft": {
            "x": 0,
            "y": 0
          },
          "topRight": {
            "x": 1,
            "y": 0
          },
          "bottomRight": {
            "x": 1,
            "y": 1
          },
          "bottomLeft": {
            "x": 0,
            "y": 1
          }
        }
      },
      "actions": [
        {
          "_type": "ImageAction",
          "actionType": "ImageById",
          "image": {
            "webSearchUrl": "https://www.bing.com/images/search?view=detailv2&FORM=OIIRPO",
            "name": "",
            "contentUrl": "https://assets0.roadtrippers.com/uploads/poi_gallery_image/image/319703805/-quality_60_-interlace_Plane_-resize_1024x480_U__-gravity_center_-extent_1024x480/poi_gallery_image-image-9e436dcb-f4af-4965-9fd6-d526b1af1758.jpg",
            "hostPageUrl": "https://assets0.roadtrippers.com/uploads/poi_gallery_image/image/319703805/-quality_60_-interlace_Plane_-resize_1024x480_U__-gravity_center_-extent_1024x480/poi_gallery_image-image-9e436dcb-f4af-4965-9fd6-d526b1af1758.jpg",
            "contentSize": "47157 B",
            "encodingFormat": "jpeg",
            "hostPageDisplayUrl": "https://assets0.roadtrippers.com/uploads/poi_gallery_image/image/319703805/-quality_60_-interlace_Plane_-resize_1024x480_U__-gravity_center_-extent_1024x480/poi_gallery_image-image-9e436dcb-f4af-4965-9fd6-d526b1af1758.jpg",
            "width": 1024,
            "height": 480,
            "thumbnail": {
              "width": 0,
              "height": 0
            },
            "accentColor": "31749A"
          }
        }
      ]
    },
    {
      "image": {
        "thumbnailUrl": "https://tse4.mm.bing.net/th?q=city&pid=Api&mkt=en-US&adlt=moderate"
      },
      "displayName": "city",
      "boundingBox": {
        "queryRectangle": {
          "topLeft": {
            "x": 0,
            "y": 0
          },
          "topRight": {
            "x": 1,
            "y": 0
          },
          "bottomRight": {
            "x": 1,
            "y": 1
          },
          "bottomLeft": {
            "x": 0,
            "y": 1
          }
        },
        "displayRectangle": {
          "topLeft": {
            "x": 0,
            "y": 0
          },
          "topRight": {
            "x": 1,
            "y": 0
          },
          "bottomRight": {
            "x": 1,
            "y": 1
          },
          "bottomLeft": {
            "x": 0,
            "y": 1
          }
        }
      },
      "actions": [
        {
          "_type": "ImageAction",
          "webSearchUrl": "https://www.bing.com/images/search?q=city",
          "displayName": "city",
          "serviceUrl": "https://www.bing.com/api/v7/images/search?q=city",
          "actionType": "ImageResults"
        }
      ]
    }
  ],
  "image": {
    "imageInsightsToken": "ccid_5raYvpmc*mid_28189CE73748FE8CB0AB80F7B377C4DA64EA132E"
  }
}

Definitions

AggregateOffer

Defines a list of offers from merchants that are related to the image.

AggregateRating

Defines the metrics that indicate how well an item was rated by others.

Currency

The monetary currency. For example, USD.

Error

Defines the error that occurred.

ErrorCode

The error code that identifies the category of error.

ErrorResponse

The top-level response that represents a failed request.

ErrorSubCode

The error code that further helps to identify the error.

ImageEntityAction

Defines an entity action.

ImageKnowledge

Defines a visual search API response.

ImageModuleAction

Defines an image list action.

ImageObject

Defines an image.

ImageRecipesAction

Defines an recipe action.

ImageRelatedSearchesAction

Defines an related search action.

ImageShoppingSourcesAction

Defines a shopping sources action.

ImagesImageMetadata

Defines a count of the number of websites where you can shop or perform other actions related to the image.

ImagesModule

Defines a list of images.

ImageTag

A visual search tag.

ImageTagRegion

Defines an image region relevant to the ImageTag.

ItemAvailability

The item's availability. The following are the possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut.

NormalizedQuadrilateral

Defines a region of an image. The region is a convex quadrilateral defined by coordinates of its top left, top right, bottom left, and bottom right points. The coordinates are fractional values of the original image's width and height in the range 0.0 through 1.0.

Offer

Defines a merchant's offer.

Organization

Defines an organization.

Point2D

Defines a 2D point with X and Y coordinates.

Query

Defines a search query.

Recipe

Defines a cooking recipe.

RecipesModule

Defines a list of recipes.

RelatedSearchesModule

Defines a list of related searches.

SafeSearch

Filter the image results in actions with type 'VisualSearch' for adult content. The following are the possible filter values. Off: May return images with adult content. Moderate: Do not return images with adult content. Strict: Do not return images with adult content. The default is Moderate. If the request comes from a market that Bing's adult policy requires that safeSearch is set to Strict, Bing ignores the safeSearch value and uses Strict. If you use the site: filter in the knowledge request, 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.

Thing

Defines a thing.

XBingApisSDK

Activate swagger compliance.

AggregateOffer

Defines a list of offers from merchants that are related to the image.

Name Type Description
aggregateRating

An aggregated rating that indicates how well the product has been rated by others.

availability

The item's availability. The following are the possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut.

lastUpdated
  • string

The last date that the offer was updated. The date is in the form YYYY-MM-DD.

offers

A list of offers from merchants that have offerings related to the image.

price
  • number

The item's price.

priceCurrency

The monetary currency. For example, USD.

seller

Seller for this offer.

AggregateRating

Defines the metrics that indicate how well an item was rated by others.

Name Type Description
_type string:
  • Properties/Item
bestRating
  • number

The highest rated review. The possible values are 1.0 through 5.0.

ratingValue
  • number

The mean (average) rating. The possible values are 1.0 through 5.0.

reviewCount
  • integer

The number of times the recipe has been rated or reviewed.

text
  • string

Text representation of an item.

Currency

The monetary currency. For example, USD.

Name Type Description
AED
  • string
AFN
  • string
ALL
  • string
AMD
  • string
ANG
  • string
AOA
  • string
ARS
  • string
AUD
  • string
AWG
  • string
AZN
  • string
BAM
  • string
BBD
  • string
BDT
  • string
BGN
  • string
BHD
  • string
BIF
  • string
BMD
  • string
BND
  • string
BOB
  • string
BOV
  • string
BRL
  • string
BSD
  • string
BTN
  • string
BWP
  • string
BYR
  • string
BZD
  • string
CAD
  • string
CDF
  • string
CHE
  • string
CHF
  • string
CHW
  • string
CLF
  • string
CLP
  • string
CNY
  • string
COP
  • string
COU
  • string
CRC
  • string
CUC
  • string
CUP
  • string
CVE
  • string
CZK
  • string
DJF
  • string
DKK
  • string
DOP
  • string
DZD
  • string
EGP
  • string
ERN
  • string
ETB
  • string
EUR
  • string
FJD
  • string
FKP
  • string
GBP
  • string
GEL
  • string
GHS
  • string
GIP
  • string
GMD
  • string
GNF
  • string
GTQ
  • string
GYD
  • string
HKD
  • string
HNL
  • string
HRK
  • string
HTG
  • string
HUF
  • string
IDR
  • string
ILS
  • string
INR
  • string
IQD
  • string
IRR
  • string
ISK
  • string
JMD
  • string
JOD
  • string
JPY
  • string
KES
  • string
KGS
  • string
KHR
  • string
KMF
  • string
KPW
  • string
KRW
  • string
KWD
  • string
KYD
  • string
KZT
  • string
LAK
  • string
LBP
  • string
LKR
  • string
LRD
  • string
LSL
  • string
LYD
  • string
MAD
  • string
MDL
  • string
MGA
  • string
MKD
  • string
MMK
  • string
MNT
  • string
MOP
  • string
MRO
  • string
MUR
  • string
MVR
  • string
MWK
  • string
MXN
  • string
MXV
  • string
MYR
  • string
MZN
  • string
NAD
  • string
NGN
  • string
NIO
  • string
NOK
  • string
NPR
  • string
NZD
  • string
OMR
  • string
PAB
  • string
PEN
  • string
PGK
  • string
PHP
  • string
PKR
  • string
PLN
  • string
PYG
  • string
QAR
  • string
RON
  • string
RSD
  • string
RUB
  • string
RWF
  • string
SAR
  • string
SBD
  • string
SCR
  • string
SDG
  • string
SEK
  • string
SGD
  • string
SHP
  • string
SLL
  • string
SOS
  • string
SRD
  • string
SSP
  • string
STD
  • string
SYP
  • string
SZL
  • string
THB
  • string
TJS
  • string
TMT
  • string
TND
  • string
TOP
  • string
TRY
  • string
TTD
  • string
TWD
  • string
TZS
  • string
UAH
  • string
UGX
  • string
USD
  • string
UYU
  • string
UZS
  • string
VEF
  • string
VND
  • string
VUV
  • string
WST
  • string
XAF
  • string
XCD
  • string
XOF
  • string
XPF
  • string
YER
  • string
ZAR
  • string
ZMW
  • string

Error

Defines the error that occurred.

Name Type Description
code

The error code that identifies the category of error.

message
  • string

A description of the error.

moreDetails
  • string

A description that provides additional information about the error.

parameter
  • string

The parameter in the request that caused the error.

subCode

The error code that further helps to identify the error.

value
  • string

The parameter's value in the request that was not valid.

ErrorCode

The error code that identifies the category of error.

Name Type Description
InsufficientAuthorization
  • string
InvalidAuthorization
  • string
InvalidRequest
  • string
None
  • string
RateLimitExceeded
  • string
ServerError
  • string

ErrorResponse

The top-level response that represents a failed request.

Name Type Description
_type
  • string
errors

A list of errors that describe the reasons why the request failed.

id
  • string

A String identifier.

readLink
  • string

The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.

webSearchUrl
  • string

The URL to Bing's search result for this item.

ErrorSubCode

The error code that further helps to identify the error.

Name Type Description
AuthorizationDisabled
  • string
AuthorizationExpired
  • string
AuthorizationMissing
  • string
AuthorizationRedundancy
  • string
Blocked
  • string
HttpNotAllowed
  • string
NotImplemented
  • string
ParameterInvalidValue
  • string
ParameterMissing
  • string
ResourceError
  • string
UnexpectedError
  • string

ImageEntityAction

Defines an entity action.

Name Type Description
_type string:

Specifies the sub-class of the action.

actionType
  • string

A string representing the type of action.

datePublished
  • string

The date on which the CreativeWork was published.

displayName
  • string

A display name for the action.

isTopAction
  • boolean

A Boolean representing whether this result is the top action.

provider

The source of the creative work.

result

The result produced in the action.

serviceUrl
  • string

Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.

text
  • string

Text content of this creative work.

thumbnailUrl
  • string

The URL to a thumbnail of the item.

ImageKnowledge

Defines a visual search API response.

Name Type Description
_type
  • string
id
  • string

A String identifier.

image

Image object containing metadata about the requested image.

readLink
  • string

The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.

tags

A list of visual search tags.

webSearchUrl
  • string

The URL to Bing's search result for this item.

ImageModuleAction

Defines an image list action.

Name Type Description
_type string:

Specifies the sub-class of the action.

actionType
  • string

A string representing the type of action.

data

A list of images.

datePublished
  • string

The date on which the CreativeWork was published.

displayName
  • string

A display name for the action.

isTopAction
  • boolean

A Boolean representing whether this result is the top action.

provider

The source of the creative work.

result

The result produced in the action.

serviceUrl
  • string

Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.

text
  • string

Text content of this creative work.

thumbnailUrl
  • string

The URL to a thumbnail of the item.

ImageObject

Defines an image.

Name Type Description
accentColor
  • string

A three-byte hexadecimal number that represents the color that dominates the image. Use the color as the temporary background in your client until the image is loaded.

contentSize
  • string

Size of the media object content. Use format "value unit" (e.g., "1024 B").

contentUrl
  • string

Original URL to retrieve the source (file) for the media object (e.g., the source URL for the image).

datePublished
  • string

The date on which the CreativeWork was published.

encodingFormat
  • string

Encoding format (e.g., png, gif, jpeg, etc).

height
  • integer

The height of the media object, in pixels.

hostPageDisplayUrl
  • string

Display URL of the page that hosts the media object.

hostPageUrl
  • string

URL of the page that hosts the media object.

imageId
  • string

Unique Id for the image.

imageInsightsToken
  • string

The token that you use in a subsequent call to Visual Search API to get additional information about the image. For information about using this token, see the imageInsightsToken field inside the knowledgeRequest request parameter.

insightsMetadata

A count of the number of websites where you can shop or perform other actions related to the image. For example, if the image is of an apple pie, this object includes a count of the number of websites where you can buy an apple pie. To indicate the number of offers in your UX, include badging such as a shopping cart icon that contains the count. When the user clicks on the icon, use imageInsightsToken in a subsequent Visual Search API call to get the list of shopping websites.

provider

The source of the creative work.

text
  • string

Text content of this creative work.

thumbnail

The URL to a thumbnail of the image.

thumbnailUrl
  • string

The URL to a thumbnail of the item.

visualWords
  • string

For internal use only.

width
  • integer

The width of the media object, in pixels.

ImageRecipesAction

Defines an recipe action.

Name Type Description
_type string:

Specifies the sub-class of the action.

actionType
  • string

A string representing the type of action.

data

A list of recipes related to the image.

datePublished
  • string

The date on which the CreativeWork was published.

displayName
  • string

A display name for the action.

isTopAction
  • boolean

A Boolean representing whether this result is the top action.

provider

The source of the creative work.

result

The result produced in the action.

serviceUrl
  • string

Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.

text
  • string

Text content of this creative work.

thumbnailUrl
  • string

The URL to a thumbnail of the item.

ImageRelatedSearchesAction

Defines an related search action.

Name Type Description
_type string:

Specifies the sub-class of the action.

actionType
  • string

A string representing the type of action.

data

A list of queries related to the image.

datePublished
  • string

The date on which the CreativeWork was published.

displayName
  • string

A display name for the action.

isTopAction
  • boolean

A Boolean representing whether this result is the top action.

provider

The source of the creative work.

result

The result produced in the action.

serviceUrl
  • string

Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.

text
  • string

Text content of this creative work.

thumbnailUrl
  • string

The URL to a thumbnail of the item.

ImageShoppingSourcesAction

Defines a shopping sources action.

Name Type Description
_type string:

Specifies the sub-class of the action.

actionType
  • string

A string representing the type of action.

data

A list of merchants that offer items related to the image.

datePublished
  • string

The date on which the CreativeWork was published.

displayName
  • string

A display name for the action.

isTopAction
  • boolean

A Boolean representing whether this result is the top action.

provider

The source of the creative work.

result

The result produced in the action.

serviceUrl
  • string

Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.

text
  • string

Text content of this creative work.

thumbnailUrl
  • string

The URL to a thumbnail of the item.

ImagesImageMetadata

Defines a count of the number of websites where you can shop or perform other actions related to the image.

Name Type Description
aggregateOffer

A summary of the online offers of products found in the image. For example, if the image is of a dress, the offer might identify the lowest price and the number of offers found. Only visually similar products insights include this field. The offer includes the following fields: Name, AggregateRating, OfferCount, and LowPrice.

recipeSourcesCount
  • integer

The number of websites that offer recipes of the food seen in the image.

shoppingSourcesCount
  • integer

The number of websites that sell the products seen in the image.

ImagesModule

Defines a list of images.

Name Type Description
value

A list of images.

ImageTag

A visual search tag.

Name Type Description
_type
  • string
actions ImageAction[]:

Actions within this tag. The order of the items denotes the default ranking order of these actions, with the first action being the most likely user intent.

alternateName
  • string

An alias for the item.

bingId
  • string

An ID that uniquely identifies this item.

boundingBox

The bounding box for this tag. For the default tag, there is no bounding box.

description
  • string

A short description of the item.

displayName
  • string

Display name for this tag. For the default tag, the display name is empty.

id
  • string

A String identifier.

image

An image of the item.

name
  • string

The name of the thing represented by this object.

readLink
  • string

The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.

url
  • string

The URL to get more information about the thing represented by this object.

webSearchUrl
  • string

The URL to Bing's search result for this item.

ImageTagRegion

Defines an image region relevant to the ImageTag.

Name Type Description
displayRectangle

A recommended rectangle to show to the user.

queryRectangle

A rectangle that outlines the area of interest for this tag.

ItemAvailability

The item's availability. The following are the possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut.

Name Type Description
Discontinued
  • string
InStock
  • string
InStoreOnly
  • string
LimitedAvailability
  • string
OnlineOnly
  • string
OutOfStock
  • string
PreOrder
  • string
SoldOut
  • string

NormalizedQuadrilateral

Defines a region of an image. The region is a convex quadrilateral defined by coordinates of its top left, top right, bottom left, and bottom right points. The coordinates are fractional values of the original image's width and height in the range 0.0 through 1.0.

Name Type Description
_type
  • string
alternateName
  • string

An alias for the item.

bingId
  • string

An ID that uniquely identifies this item.

bottomLeft

The bottom left corner coordinate.

bottomRight

The bottom right corner coordinate.

description
  • string

A short description of the item.

id
  • string

A String identifier.

image

An image of the item.

name
  • string

The name of the thing represented by this object.

readLink
  • string

The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.

topLeft

The top left corner coordinate.

topRight

The top right corner coordinate.

url
  • string

The URL to get more information about the thing represented by this object.

webSearchUrl
  • string

The URL to Bing's search result for this item.

Offer

Defines a merchant's offer.

Name Type Description
_type
  • string
aggregateRating

An aggregated rating that indicates how well the product has been rated by others.

alternateName
  • string

An alias for the item.

availability

The item's availability. The following are the possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut.

bingId
  • string

An ID that uniquely identifies this item.

description
  • string

A short description of the item.

id
  • string

A String identifier.

image

An image of the item.

lastUpdated
  • string

The last date that the offer was updated. The date is in the form YYYY-MM-DD.

name
  • string

The name of the thing represented by this object.

price
  • number

The item's price.

priceCurrency

The monetary currency. For example, USD.

readLink
  • string

The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.

seller

Seller for this offer.

url
  • string

The URL to get more information about the thing represented by this object.

webSearchUrl
  • string

The URL to Bing's search result for this item.

Organization

Defines an organization.

Name Type Description
_type
  • string
alternateName
  • string

An alias for the item.

bingId
  • string

An ID that uniquely identifies this item.

description
  • string

A short description of the item.

id
  • string

A String identifier.

image

An image of the item.

name
  • string

The name of the thing represented by this object.

readLink
  • string

The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.

url
  • string

The URL to get more information about the thing represented by this object.

webSearchUrl
  • string

The URL to Bing's search result for this item.

Point2D

Defines a 2D point with X and Y coordinates.

Name Type Description
_type
  • string
alternateName
  • string

An alias for the item.

bingId
  • string

An ID that uniquely identifies this item.

description
  • string

A short description of the item.

id
  • string

A String identifier.

image

An image of the item.

name
  • string

The name of the thing represented by this object.

readLink
  • string

The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.

url
  • string

The URL to get more information about the thing represented by this object.

webSearchUrl
  • string

The URL to Bing's search result for this item.

x
  • number

The x-coordinate of the point.

y
  • number

The y-coordinate of the point.

Query

Defines a search query.

Name Type Description
displayText
  • string

The display version of the query term.

searchLink
  • string

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.

text
  • string

The query string. Use this string as the query term in a new search request.

thumbnail

The URL to a thumbnail of a related image.

webSearchUrl
  • string

The URL that takes the user to the Bing search results page for the query.

Recipe

Defines a cooking recipe.

Name Type Description
cookTime
  • string

The amount of time the food takes to cook. For example, PT25M. For information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations.

datePublished
  • string

The date on which the CreativeWork was published.

prepTime
  • string

The amount of time required to prepare the ingredients. For example, PT15M. For information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations.

provider

The source of the creative work.

text
  • string

Text content of this creative work.

thumbnailUrl
  • string

The URL to a thumbnail of the item.

totalTime
  • string

The total amount of time it takes to prepare and cook the recipe. For example, PT45M. For information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations.

RecipesModule

Defines a list of recipes.

Name Type Description
value

A list of recipes.

RelatedSearchesModule

Defines a list of related searches.

Name Type Description
value

A list of related searches.

SafeSearch

Filter the image results in actions with type 'VisualSearch' for adult content. The following are the possible filter values. Off: May return images with adult content. Moderate: Do not return images with adult content. Strict: Do not return images with adult content. The default is Moderate. If the request comes from a market that Bing's adult policy requires that safeSearch is set to Strict, Bing ignores the safeSearch value and uses Strict. If you use the site: filter in the knowledge request, 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.

Name Type Description
Moderate
  • string
Off
  • string
Strict
  • string

Thing

Defines a thing.

Name Type Description
_type
  • string
alternateName
  • string

An alias for the item.

bingId
  • string

An ID that uniquely identifies this item.

description
  • string

A short description of the item.

id
  • string

A String identifier.

image

An image of the item.

name
  • string

The name of the thing represented by this object.

readLink
  • string

The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.

url
  • string

The URL to get more information about the thing represented by this object.

webSearchUrl
  • string

The URL to Bing's search result for this item.

XBingApisSDK

Activate swagger compliance.

Name Type Description
true
  • string