Creating a Bing Video Search App
Discover how to build a video search application by integrating Azure Bing Search APIs with FastAPI in Python. This lesson guides you through fetching video results using REST API calls and rendering them on a user-friendly interface. You'll understand the backend implementation and connect it to a minimalistic UI, preparing you to create scalable video search solutions.
Introduction
In this lesson, we’re going to build our own video search engine using the Azure Bing Search service.
Implementation
We’ll follow the steps mentioned below to build the video search engine:
-
First, we’ll write a Python script to get the video search results for a given search term using the Bing Search REST API calls.
-
Second, we’ll create a nice UI to render the search results which makes the application usable through UI. Like the course, it does not focus on UI development, all the HTML and CSS files are provided in the code block for your reference.
Now let’s implement the application.
A Python script to fetch the video search results
As discussed, we’ll call the Bing Search API to fetch the video search results.
Explanation:
-
In line 1, we import the required package.
-
In line 3, we define the term that needs to be searched for videos.
-
In line 5, we define the header data ...