Share via


預設深入解析標記

警告

在 2020 年 10 月 30 日,Bing 搜尋 API 已從 Azure AI 服務移至 Bing 搜尋 服務。 本文件僅供參考之用。 如需更新的文件,請參閱 Bing 搜尋 API 文件。 如需針對 Bing 搜尋建立新 Azure 資源的指示,請參閱透過 Azure Marketplace 建立 Bing 搜尋資源

預設深入解析標記是 displayName 欄位設定為空字串的標記。 下列範例顯示預設深入解析 (動作) 的可能清單。 回應包含的動作清單取決於影像。 此外,針對每個動作,屬性清單可能會因為影像而有所不同,因此,請在嘗試使用屬性之前,先確認該屬性是否存在。

{
  "_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..."
  }
}

PagesIncluding 深入解析

PagesIncluding 深入解析會提供包含此影像的網頁。 這實際上是 Image 物件的清單,而且 hostPageUrl 欄位包含附有影像之網頁所用的 URL。 關於使用範例,請參閱 PagesIncluding 見解範例

{
  "_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 深入解析

ShoppingSources 深入解析會提供網站清單,使用者可以在這些網站購買影像所示的項目。 供應項目清單包括網頁的 URL,使用者可以從中購買項目、查詢項目的價格,並查看評等或評論詳細資料。 關於使用範例,請參閱 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 深入解析

MoreSizes 見解會識別 Bing 在網際網路上找到的影像大小 (大型或小型) (請參閱 availableSizesCount 欄位):

{
  "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 深入解析

VisualSearch 深入解析會提供影像清單,這些影像呈現在視覺效果上與原始影像類似的影像 (包含與原始影像顯示的內容類似的內容)。 關於使用範例,請參閱 VisualSearch 見解範例

{
  "_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"
      }
    ]
  }
}

Recipes 深入解析

Recipes 深入解析會提供網頁清單,這些網頁包含對於影像顯示的食物進行調理的食譜。 關於使用範例,請參閱 Recipes 見解範例

{
  "_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 深入解析

對於您要求見解的物件,ImageById 見解會提供該影像的 Image 物件:

{
  "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 深入解析

ProductVisualSearch 深入解析提供產品影像的清單,這些影像呈現在視覺效果上與原始影像顯示的產品類似的產品。 insightsMetadata 欄位可能包含您可以購買產品和產品價格的優惠相關資訊。

{
  "_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 深入解析

RelatedSearches 深入解析會提供其他人進行的相關搜尋清單 (根據其他使用者的搜尋字詞)。 關於使用範例,請參閱 RelatedSearches 見解範例

{
  "_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 深入解析

DocumentLevelSuggestions 見解會提供依據影像內容建議的搜尋字詞清單。

{
  "_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."
        }
      }
    ]
  }
}

下一步

請參考 Bing 見解使用方式的範例以了解 Bing 可能會如何顯示視覺效果見解。

若要快速開始使用您的第一個要求,請參閱快速入門: