O'Reilly logo

Learning Microsoft Cognitive Services - Second Edition by Leif Larsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Searching for videos

Searching for videos is about the same as for images. The only real difference is how we construct the endpoint, and the response we get.

We are going to add a new function in the BingSearch class, to accompany a video search:

public async Task<VideoSearchResponse> SearchVideos(string query) 
{ 
    string endpoint = string.Format("{0}{1}", "https://api.cognitive.microsoft.com/bing/v5.0/videos/search?q=", query); 

As you can see, there is only one required parameter, the query string, q. We can also specify a few optional parameters, which are common to all the search APIs, and will be described later.

Aside from common filters, video can also filter results based on the following filters:

Filter

Description

pricing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required