1

From a Delphi 32-bit Windows VCL Application in Delphi 11 Alexandria, is it possible to programmatically reverse-search Google Images by uploading a local image file?

The Google Reverse Image API is documented here: https://serpapi.com/google-reverse-image

But how to use it by uploading a local image from a Delphi program?

user1580348
  • 5,721
  • 4
  • 43
  • 105
  • As per [Advanced Reverse Image Parameters](https://serpapi.com/google-reverse-image#api-parameters-advanced-reverse-image-parameters) you need to provide a URL. Which can't be local. You have to upload (HTTP) a picture to some host to get a URL from there. – AmigoJack Nov 29 '22 at 14:51
  • The URL can be a local file if you run your own HTTP server on your local machine, such as with Indy's `TIdHTTPServer` component. Of course, your ISP will have to allow incoming connections, and you will have to configure your network router (if any) with port forwarding, etc. But it is a possible alternative if you don't want to upload the file to an online hosting provider and then remove it after performing the image search. – Remy Lebeau Nov 29 '22 at 23:36
  • Before doing that I'd just mimic what Google's website does, because that supports uploading a file (thus neither needing a URI or any API). However, this requires understanding HTTP and (at least) understanding the [web browser's developer tools](https://stackoverflow.com/a/56790467/4299358). – AmigoJack Nov 30 '22 at 09:31

0 Answers0