Actor picture

Google Search By Image

pocesar/google-search-by-image

Search Google results by providing image URLs. It can be used for: reverse search, finding people by photo, detecting objects on images, getting product names, finding social media related to the person in the photo, finding related images and terms, and identifying objects on photos

Free trial for 1 day

Then $40/month

No credit card required now

Author's avatarPaulo Cesar
  • Modified
  • Users10
  • Runs178
Actor picture
Google Search By Image

Free trial for 1 day

Then $40/month

To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token. For a more detailed explanation, please read about running actors via the API in Apify Docs.

import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with API token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare actor input
const input = {
    "startUrls": [
        {
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Steve_Jobs_Headshot_2010-CROP_%28cropped_2%29.jpg/1024px-Steve_Jobs_Headshot_2010-CROP_%28cropped_2%29.jpg",
            "userData": {
                "name": "Steve Jobs"
            }
        }
    ]
};

(async () => {
    // Run the actor and wait for it to finish
    const run = await client.actor("pocesar/google-search-by-image").call(input);

    // Fetch and print actor results from the run's dataset (if any)
    console.log('Results from dataset');
    const { items } = await client.dataset(run.defaultDatasetId).listItems();
    items.forEach((item) => {
        console.dir(item);
    });
})();