Lesson 2: Question on How to Get a Bing Image Search API key

While applying for a Bing Search Key on Azure, there is a problem occurred. There is no choice for pricing tiers available, however, it is a value that can not be empty. Because of that, a Bing Search Source can not be created. Does anyone have met this problem before?


No available items to choose

Without choosing the pricing tier, no Bing Search Source can be created

You can check out here Downloading images | Practical Deep Learning for Coders

1 Like

You might also want to check out the ‘is it a bird’ kaggle notebook that Jeremy recently shared on Twitter. It has a pretty nice way to download images from duckduckgo which I think you’ll find less painful than using Bing.

4 Likes

Thank you for those useful information :smiling_face:. I found that to use DuckDuckGo in chapter 2, some code should be changed, I combined code from Downloading images | Practical Deep Learning for Coders and Is it a bird? Creating a model from your own data | Kaggle, and find the code working well :smiley:

4 Likes

That’s awesome! Would you mind sharing the code you developed?

Sure! Though there may be some unseen bugs, the code runs smoothly in my computer. You may check it out :relieved:

from fastbook import *
urls = search_images_ddg('grizzly bear', max_images=150)
len(urls),urls[0]

download_url(urls[7], 'images/bear.jpg')
im = Image.open('images/bear.jpg')
im.thumbnail((256,256))
im

for o in bear_types:
    dest = (path/o)
    dest.mkdir(exist_ok=True, parents=True)
    download_images(dest, urls=search_images_ddg(f'{o} bear'))
    resize_images(path/o, max_size=400, dest=path/o)
1 Like

I found the way to address the pricing tier issue of Bing.
This problem may be caused by not having “Microsoft Bing” registered as a “Resource Provider”, so after that is done, Bing Search v7 resources can be created.

1 Like

This worked for me. Thank you!

Hi

I am still struggling as to where can I locate Bing Image Search API key. I have navigated links through the course notebook (colab), through forum discussions but even on Bing Image Search API page, I could not locate any section that leads me to getting an API key.

Would appreciate if someone can advise a step wise process with links which are working in present.

Thanks