什麼是 Bing 自訂搜尋 API?What is the Bing Custom Search API?

Bing 自訂搜尋 API 可讓您針對感興趣的主題,建立量身訂做且無廣告的搜尋經驗。The Bing Custom Search API enables you to create tailored ad-free search experiences for topics that you care about. 您可以指定 Bing 要搜尋的網域和網頁,以及釘選、升級或降級特定內容,以建立自訂的 Web 檢視,並協助您的使用者快速找出相關的搜尋結果。You can specify the domains and webpages for Bing to search, as well as pin, boost, or demote specific content to create a custom view of the web and help your users quickly find relevant search results.

特性Features

功能Feature 描述Description
自訂即時搜尋建議Custom real-time search suggestions 提供使用者輸入時可顯示為下拉式清單的搜尋建議。Provide search suggestions that can be displayed as a dropdown list as your users type.
自訂影像搜尋體驗Custom image search experiences 可讓使用者從自訂搜尋執行個體中指定的網域和網站搜尋影像。Enable your users to search for images from the domains and websites specified in your custom search instance.
自訂影片搜尋體驗Custom video search experiences 可讓使用者從自訂搜尋執行個體中指定的網域和網站搜尋影片。Enable your users to search for videos from the domains and sites specified in your custom search instance.
共用自訂搜尋執行個體Share your custom search instance 透過與小組成員分享來共同編輯並測試搜尋執行個體。Collaboratively edit and test your search instance by sharing it with members of your team.
設定應用程式和網站的 UIConfigure a UI for your applications and websites 提供主控的 UI,可讓您輕鬆地將其整合在網頁和 Web 應用程式中,做為 JavaScript 程式碼片段。Provides a hosted UI that you can easily integrate into your webpages and web applications as a JavaScript code snippet.

工作流程Workflow

您可以使用 Bing 自訂搜尋入口網站建立自訂搜尋執行個體。You can create a customized search instance by using the Bing Custom Search portal. 此入口網站可讓您建立自訂搜尋執行個體,指定您要 Bing 搜尋的網域、網站和網頁,以及不想要搜尋的網域、網站和網頁。The portal enables you to create a custom search instance that specifies the domains, websites, and webpages that you want Bing to search, along with the ones that you don’t want it to search. 您也可以使用此入口網站:預覽搜尋體驗、調整 API 所提供的搜尋排名,以及選擇性地設定要在網站和應用程式中呈現的可搜尋使用者介面。You can also use the portal to: preview the search experience, adjust the search rankings that the API provides, and optionally configure a searchable user interface to be rendered in your websites and applications.

建立搜尋執行個體之後,您可以透過呼叫 Bing 自訂搜尋 API,將其 (以及使用者介面 (選擇性)) 整合至網站或應用程式:After creating your search instance, you can integrate it (and optionally, a user interface) into your website or application by calling the Bing Custom Search API:

顯示您可以透過 API 連接到 Bing 自訂搜尋的影像Image showing that you can connect to Bing custom search via the API

後續步驟Next steps

若要快速開始,請參閱建立您的第一個 Bing 自訂搜尋執行個體To get started quickly, see Create your first Bing Custom Search instance.

如需有關自訂搜尋執行個體的詳細資,請參閱定義自訂搜尋執行個體For details about customizing your search instance, see Define a custom search instance.

請務必先閱讀 Bing 使用和顯示需求,以便在服務和應用程式中使用搜尋結果。Be sure to read Bing Use and Display Requirements for using search results in your services and applications.

請瀏覽 Bing 搜尋 API 中樞頁面以探索其他可用的 API。Visit the Bing Search API hub page to explore the other available APIs.

讓自己熟悉每個自訂搜尋端點的內容。Familiarize yourself with the reference content for each of the custom search endpoints. 此參考包含端點、標頭,以及您用來要求搜尋結果的查詢參數。The reference contains the endpoints, headers, and query parameters that you'd use to request search results. 它也包含回應物件的定義。It also includes definitions of the response objects.

注意

因為 URL 格式和參數可隨時變更而不會另行通知,因此請依原狀使用所有 URL。Because URL formats and parameters are subject to change without notice, use all URLs as-is. 除非有註明,否則請勿相依於 URL 格式或參數。You should not take dependencies on the URL format or parameters except where noted.