Standardtaggen för insikter
Varning
Den 30 oktober 2020 flyttade Bing-sökning API:er från Azure AI-tjänster till Bing-sökning Services. Den här dokumentationen tillhandahålls endast som referens. Uppdaterad dokumentation finns i dokumentationen för API:et för Bing-sökning. Anvisningar om hur du skapar nya Azure-resurser för Bing-sökning finns i Skapa en Bing-sökning resurs via Azure Marketplace.
Standardtaggen för insikter är den med displayName
fältet inställt på en tom sträng. I följande exempel visas en möjlig lista över standardinsikter (åtgärder). Listan över åtgärder som svaret innehåller beror på bilden. För varje åtgärd kan listan med egenskaper variera beroende på bild, så kontrollera om egenskapen finns innan du försöker använda den.
{
"_type" : "ImageKnowledge",
"tags" : [
{
"displayName" : "",
"actions" : [
{
"_type" : "ImageModuleAction",
"actionType" : "PagesIncluding",
"data" : {
"value" : [...]
}
},
{
"_type" : "ImageShoppingSourcesAction",
"actionType" : "ShoppingSources",
"data" : {
"offers" : [...]
}
},
{
"image" : {...},
"actionType" : "MoreSizes"
},
{
"_type" : "ImageModuleAction",
"actionType" : "VisualSearch",
"data" : {
"value" : [...]
}
},
{
"_type" : "ImageRecipesAction",
"actionType" : "Recipes",
"data" : {
"value" : [...]
}
},
{
"image" : {...},
"actionType" : "ImageById"
},
{
"_type" : "ImageModuleAction",
"actionType" : "ProductVisualSearch",
"data" : {
"value" : [...]
}
},
{
"_type" : "ImageRelatedSearchesAction",
"actionType" : "RelatedSearches",
"data" : {
"value" : [...]
}
},
{
"_type" : "ImageRelatedSearchesAction",
"actionType" : "DocumentLevelSuggestions",
"data" : {
"value" : [...]
}
}
]
},
{...},
{...},
{...},
{...}
],
"image" : {
"imageInsightsToken" : "bcid_AF8C9CA409421B..."
}
}
SidorInkludera insikter
PagesIncluding-insikten innehåller en lista över webbsidor som innehåller den här bilden. Det är faktiskt en lista över Image
objekt och fältet hostPageUrl
innehåller URL:en till webbsidan som innehåller bilden. Exempel på användning finns i PagesIncluding insight example (Exempel på sidorInkludera insikter).
{
"_type" : "ImageModuleAction",
"actionType" : "PagesIncluding",
"data" : {
"value" : [
{
"webSearchUrl" : "https://www.bing.com\/images\/search?",
"name" : "Today's smoking hot country",
"thumbnailUrl" : "https:\/\/tse2.mm.bing.net\/th?id=OIP...",
"datePublished" : "2017-09-20T12:00:00.0000000Z",
"contentUrl" : "http:\/\/contoso.com\/wordstuff",
"hostPageUrl" : "http:\/\/contoso.com\/2017\/09\/20\/car",
"contentSize" : "122540 B",
"encodingFormat" : "jpeg",
"hostPageDisplayUrl" : "contoso.com\/2017\/09\/20\/car",
"width" : 894,
"height" : 1200,
"thumbnail" : {
"width" : 474,
"height" : 636
},
"imageInsightsToken" : "ccid_CO5GEthj*mid_5323B1",
"insightsMetadata" : {
"pagesIncludingCount" : 12,
"availableSizesCount" : 7
},
"imageId" : "5323B1900FB9087B6B45D176D234E1F2F23CD3A5",
"accentColor" : "55585B"
}
]
}
}
ShoppingSources-insikter
ShoppingSources-insikten innehåller en lista över webbplatser där användaren kan köpa objektet som visas i bilden. Listan över erbjudanden innehåller webbadressen till webbsidan där användaren kan köpa objektet, priset på objektet och betygsätta eller granska information. Exempel på användning finns i Exempel på ShoppingSources.
{
"_type" : "ImageShoppingSourcesAction",
"actionType" : "ShoppingSources",
"data" : {
"offers" : [
{
"name" : "Apple Pie",
"url" : "https:\/\/contoso.com\/product_p\/l10.htm",
"description" : "A taste of the crust, apple, and pie filling...",
"seller" : {
"name" : "Contoso"
},
"price" : 3.99,
"priceCurrency" : "USD",
"aggregateRating" : {
"ratingValue" : 5
},
"lastUpdated" : "2018-04-16T00:00:00.0000000"
}
]
}
}
MoreSizes insight
MoreSizes-insikten identifierar antalet storlekar (större eller mindre) av bilden som Bing hittade på Internet (se availableSizesCount
fältet):
{
"image" : {
"webSearchUrl" : "https:\/\/www.bing.com\/images\/search?view=detai...",
"name" : "Making Apple Pie",
"thumbnailUrl" : "https:\/\/tse4.mm.bing.net\/th?id=OIP....",
"datePublished" : "2013-06-21T12:00:00.0000000Z",
"contentUrl" : "http:\/\/contoso.com\/content\/uploads\/2013\/06\/apple-pie.jpg",
"hostPageUrl" : "http:\/\/contoso.com\/2013\/06\/21\/making-apple-pie\/",
"contentSize" : "134847 B",
"encodingFormat" : "jpeg",
"hostPageDisplayUrl" : "contoso.com\/2013\/06\/21\/making-apple-pie",
"width" : 1050,
"height" : 765,
"thumbnail" : {
"width" : 474,
"height" : 345
},
"imageInsightsToken" : "ccid_tmaGQ2eU*mid_D12339146CF...",
"insightsMetadata" : {
"recipeSourcesCount" : 6,
"pagesIncludingCount" : 103,
"availableSizesCount" : 28
},
"imageId" : "D12339146CFEDF3D409CC7A66D2C98D0D71904D4",
"accentColor" : "3A0B01"
},
"actionType" : "MoreSizes"
},
VisualSearch-insikt
VisualSearch-insikten innehåller en lista över bilder som visuellt liknar den ursprungliga bilden (innehåller innehåll som liknar det innehåll som visas i den ursprungliga bilden). Exempel på användning finns i VisualSearch Insight-exempel.
{
"_type" : "ImageModuleAction",
"actionType" : "VisualSearch",
"data" : {
"value" : [
{
"webSearchUrl" : "https:\/\/www.bing.com\/images\/search?view=...",
"name" : "An apple pie...",
"thumbnailUrl" : "https:\/\/tse4.mm.bing.net\/th?id=OIP.z...",
"datePublished" : "2017-03-18T00:17:00.0000000Z",
"contentUrl" : "http:\/\/contoso.net\/images\/8\/8a\/an_apple_pie.png",
"hostPageUrl" : "http:\/\/contoso.com\/wiki\/an_apple_pie.png",
"contentSize" : "87930 B",
"encodingFormat" : "png",
"hostPageDisplayUrl" : "contoso.com\/wiki\/an_apple_pie.png",
"width" : 263,
"height" : 192,
"thumbnail" : {
"width" : 474,
"height" : 346
},
"imageInsightsToken" : "ccid_zhRxfGkI*mid_1DCBA7AA6D231...",
"insightsMetadata" : {
"recipeSourcesCount" : 6,
"pagesIncludingCount" : 103,
"availableSizesCount" : 28
},
"imageId" : "1DCBA7AA6D23147F9DD06D47DB3A38EB25389",
"accentColor" : "3E0D01"
}
]
}
}
Receptinsikt
Receptinsikten innehåller en lista över webbsidor som innehåller ett recept för att göra maten som visas i bilden. Exempel på användning finns i Exempel på receptinsikter.
{
"_type" : "ImageRecipesAction",
"actionType" : "Recipes",
"data" : {
"value" : [
{
"name" : "Granny's Apple Pie",
"url" : "http:\/\/contoso.com\/recipes\/appetizer\/apple-pie.html",
"description" : "I love Granny's apple pie. Sooooo delicious...",
"thumbnailUrl" : "https:\/\/tse4.mm.bing.net\/th?id=A63002cd9",
"creator" : {
"_type" : "Person",
"name" : "Charlene Whitney"
},
"aggregateRating" : {
"text" : "5",
"ratingValue" : 5,
"bestRating" : 5,
"reviewCount" : 1
},
"cookTime" : "PT45M",
"prepTime" : "PT1H",
"totalTime" : "PT1H45M"
}
]
}
}
ImageById-insikt
ImageById-insikten innehåller ett Image
objekt för den avbildning som du har begärt insikter för:
{
"image" : {
"webSearchUrl" : "https:\/\/www.bing.com\/images\/search?view=deta...",
"name" : "Making Apple Pie",
"thumbnailUrl" : "https:\/\/tse4.mm.bing.net\/th?id=OIP...",
"datePublished" : "2013-06-21T12:00:00.0000000Z",
"contentUrl" : "http:\/\/contoso.com\/content\/uploads\/2013\/06\/apple-pie.jpg",
"hostPageUrl" : "http:\/\/contoso.com\/2013\/06\/21\/making-apple-pie\/",
"contentSize" : "134847 B",
"encodingFormat" : "jpeg",
"hostPageDisplayUrl" : "contoso.com\/2013\/06\/21\/making-apple-pie",
"width" : 1050,
"height" : 765,
"thumbnail" : {
"width" : 474,
"height" : 345
},
"imageInsightsToken" : "ccid_tmaGQ2eU*mid_D12339146CFE...",
"insightsMetadata" : {
"recipeSourcesCount" : 6,
"pagesIncludingCount" : 103,
"availableSizesCount" : 28
},
"imageId" : "D12339146CFEDF3D409A66D2C98D0D71904D4",
"accentColor" : "3A0B01"
},
"actionType" : "ImageById"
},
ProductVisualSearch-insikt
ProductVisualSearch-insikten innehåller en lista över bilder av produkter som visuellt liknar produkter som visas i den ursprungliga bilden. Fältet insightsMetadata
kan innehålla information om erbjudanden där du kan köpa produkten och priset på produkten.
{
"_type" : "ImageModuleAction",
"actionType" : "ProductVisualSearch",
"data" : {
"value" : [
{
"webSearchUrl" : "https:\/\/www.bing.com\/images\/search?view=detail...",
"name" : "Contoso 4-Piece Kitchen Package...",
"thumbnailUrl" : "https:\/\/tse3.mm.bing.net\/th?id=OIP.l9hzaabu-RJd...",
"datePublished" : "2017-07-16T04:28:00.0000000Z",
"contentUrl" : "https:\/\/www.contoso.com\/assets\/media\/images\/prod...",
"hostPageUrl" : "https:\/\/www.contoso.com\/4-piece-kitchen-package...",
"contentSize" : "13594 B",
"encodingFormat" : "jpeg",
"hostPageDisplayUrl" : "https:\/\/www.contoso.com\/4-piece-kitchen-package...",
"width" : 450,
"height" : 332,
"thumbnail" : {
"width" : 474,
"height" : 349
},
"imageInsightsToken" : "ccid_l9hzaabu*mid_70A8B616355D681DB9A5A...",
"insightsMetadata" : {
"shoppingSourcesCount" : 1,
"recipeSourcesCount" : 0,
"aggregateOffer" : {
"name":"4-Piece Kitchen Package with...",
"priceCurrency":"USD",
"lowPrice":2756,
"offers" : [
{
"name" : "4-Piece Kitchen Package with...",
"url" : "https:\/\/www.fabrikam.com\/1234.html?ref=bing",
"description" : "This 36 Frenchdoor refrigerator by...",
"seller" : {
"name" : "Fabrikam",
"image" : {
"url" : "https:\/\/tse1.mm.bing.net\/th?id=A818f811..."
}
},
"price" : 2756,
"priceCurrency" : "USD",
"availability" : "InStock",
"lastUpdated" : "2018-02-20T00:00:00.0000000"
}
],
"offerCount":1
},
"pagesIncludingCount" : 4,
"availableSizesCount" : 2
},
"imageId" : "70A8B616355D681DA5980A8D0514BCC995A3",
"accentColor" : "60646B"
}
]
}
}
RelatedSearches-insikter
RelatedSearches-insikten innehåller en lista över relaterade sökningar som gjorts av andra (baserat på andra användares söktermer). Exempel på användning finns i Exempel på RelatedSearches-insikter.
{
"_type" : "ImageRelatedSearchesAction",
"actionType" : "RelatedSearches",
"data" : {
"value" : [
{
"text" : "Homemade Apple Pies Recipes",
"displayText" : "Homemade Apple Pies Recipes",
"webSearchUrl" : "https:\/\/www.bing.com\/images\/search?q=Homemade...",
"thumbnail" : {
"url" : "https:\/\/tse1.mm.bing.net\/th?q=Homemade+Apple+Pies"
}
}
]
}
}
DocumentLevelSuggestions-insikt
DocumentLevelSuggestions-insikten innehåller en lista över föreslagna söktermer baserat på innehållet i bilden:
{
"_type" : "ImageRelatedSearchesAction",
"actionType" : "DocumentLevelSuggestions",
"data" : {
"value" : [
{
"text" : "American Apple Pie",
"displayText" : "American Apple Pie",
"webSearchUrl" : "https:\/\/www.bing.com\/images\/search?q=American",
"thumbnail" : {
"url" : "https:\/\/tse3.mm.bing.net\/th?q=American+Apple+Pie."
}
}
]
}
}
Nästa steg
Kolla in Exempel på användning av Bing-insikter för att se hur Bing kan visa visuella insikter.
Kom igång snabbt med din första begäran genom att läsa snabbstarterna: