Search for image from Bing in Power Query and visualize the image in Power BI Desktop

Power Query is very usefull and can be used for many reasons. Today, I want to show you how to use Power Query and Azure Marketplace to get the images from Bing search.

Let’s create the funtion to search images in Bing with Power Query. Add new bank Power Query and paste the code:

Change the name of the query to: “fFindImageForQuery”. To test this function you can click the “Invoke” after selecting your function.

Then input any query to search image for. For example:

If you are executing your query for the first time in the project you will be ask for the credential, so please sign in to the Azure Marketplace, and at the end you should be able to see the result of the function:

To make a real test to this function let’s create the new text file and add some data. As for example let’s grab some animals name:

Add new query and get this data from file, for example:

Now, you can close and apply the queries. There is only one setting important to add. To display images in the report you need to choose the proper data category for image fields in the model. You can do that in the “Data” tab in the Power Bi Designer by changing the Data Category to “Image URL”. Additionally you can change the Data Category to “Web URL” for the url source attribute to allow user to click and go to the image source website.

Now, you are able to prepare the report and you will be able to show the images downloaded from the web.


  1. Dung Anh Le

    i have a problem with the function, i dont know why it doesnt work?
    Anyone else has the same pb with me?

    1. squser


      I have tried now and it seems that the function is working fine. In the April release of Power Bi Desktop i have create new solution, than i have add new blank query and i have paste the funtion code. I was able to invoke the funtion with my word and the funtion returns me the link.
      Please send me the screen with your error. You can send me an email to

      1. Dung Anh Le

        Hi squser,
        I have justsent an email with the screen capture for you (from
        Could you please give a it a look ?
        Thanks in advance,


Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.