什麼是 Bing 實體搜尋 API?What is Bing Entity Search API?

Bing 實體搜尋 API 會將搜尋查詢傳送至 Bing,並取得包含實體和地點的結果。The Bing Entity Search API sends a search query to Bing and gets results that include entities and places. 地點結果包含餐廳、旅館或其他本地商家。Place results include restaurants, hotel, or other local businesses. 若查詢指定本地商家名稱或要求商務類型 (例如我附近的餐廳),Bing 會傳回地點。Bing returns places if the query specifies the name of the local business or asks for a type of business (for example, restaurants near me). 若查詢指定已知人物、地點 (旅遊景點、縣/市、國家/地區等) 或事項,Bing 會傳回實體。Bing returns entities if the query specifies well-known people, places (tourist attractions, states, countries/regions, etc.), or things.

功能Feature 描述Description
即時搜尋建議Real-time search suggestions 提供使用者輸入時可顯示為下拉式清單的搜尋建議。Provide search suggestions that can be displayed as a dropdown list as your users type.
實體去除混淆Entity disambiguation 針對具有多個可能意義的查詢取得多個實體。Get multiple entities for queries with multiple possible meanings.
尋找地點Find places 搜尋並傳回當地商家和實體的相關資訊Search for and return information on local businesses and entities

工作流程Workflow

Bing 實體搜尋 API 是一種 RESTful Web 服務,可讓您輕鬆地從任何可發出 HTTP 要求及剖析 JSON 的程式設計語言進行呼叫。The Bing Entity Search API is a RESTful web service, making it easy to call from any programming language that can make HTTP requests and parse JSON. 您可以透過 REST API 或 SDK 來使用此服務。You can use the service using either the REST API, or the SDK.

  1. 建立具備 Bing 搜尋 API 存取權的認知服務 API 帳戶Create a Cognitive Services API account with access to the Bing Search APIs. 如果您沒有 Azure 訂用帳戶,可以建立免費帳戶If you don't have an Azure subscription, you can create an account for free.
  2. 使用有效的搜尋查詢,將要求傳送至 API。Send a request to the API, with a valid search query.
  3. 剖析傳回的 JSON 訊息以處理 API 回應。Process the API response by parsing the returned JSON message.

後續步驟Next steps