2

Trying to figure out how to perform a "Reverse Image Search" using the Bing Image Search API.

Basically looking for a way to programmatically do what Bing provides if you go to the Images search page (https://www.bing.com/images), click the Camera, and upload a picture to search on.

Johnny B
  • 21
  • 1
  • 3

1 Answers1

1

For the already Bing indexed images, you can use the following API call:

curl -v -X GET "https://api.cognitive.microsoft.com/bing/v7.0/images/details?imgurl=YOUR_IMAGE_URL&mkt=en-us&modules=similarimages" -H "Ocp-Apim-Subscription-Key: YOUR_ACCESS_KEY".

This will give you similar images for the given URL.

Ronak
  • 751
  • 5
  • 10
  • I do not believe this is what I need. Doing it your way I believe requires you to provide a URL to an image that is already on the internet somewhere. What I'm looking for is a method to post and uploaded image, probably as binary to Bing. Which should be just like how bing works when you upload an image. – Johnny B Nov 02 '17 at 14:22
  • For this usecase, you can try the POST method with the following endpoint: https://api.cognitive.microsoft.com/bing/v7.0/images/details?modules=similarimages&Content-Type=form-data. Make the async call: var message = await client.PostAsync(url, content), where content is the binary image. – Ronak Nov 03 '17 at 00:00
  • That did it! My code was actually almost exact already to what you provided, except that I had .../bing/v7.0/images/search... and you had ../bing/7.0/images/details... Thank you for your help! – Johnny B Nov 06 '17 at 11:34