1
votes

When I tried to use similar products search from Bing search api with the following url with a valid api key in the header, it returns an error saying the request is missing a parameter "q". I need to search the image without a query string but just the image URL.

https://api.cognitive.microsoft.com/bing/v7.0/images/search?modulesRequested=SimilarProducts&mkt=en-us&form=BCSPRD&imgUrl=https%3A%2F%2Fm.media-amazon.com%2Fimages%2FG%2F01%2Fzappos%2Flanding%2Fpages%2Fmensclothing%2FMelodyTest1%2FMensShoes1.V506596164.jpg&count=1

Thanks in advance

1

1 Answers

0
votes

The endpoint is different. "Search" endpoint is meant for searching for images, given a query. "Details" endpoint will do the trick here. You need to do something like this:

GET https://api.cognitive.microsoft.com/bing/v7.0/images/details?imgurl=YOUR_IMAGE_URL&modules=SimilarImages

Use this with your access key as a header and it will work.