I have used google image api in python to download 20 first image result with the following code:
import os
import sys
import time
from urllib import FancyU
I have search api for downloading images to create data set of images may be you should have a look at these !
https://rapidapi.com/contextualwebsearch/api/web-search?endpoint=5b864ca4e4b085e3f407ecca
https://github.com/hardikvasa/webb/blob/master/docs/Documentation.md
From documentation i like the 2nd one to perfect !