Dans la section API de votre compte, gênerez une nouvelle clé:

Les variables:
$SerpapiSearch="ma recherche"
$SerpapiAPIKEY="ma clé API"
$temp_dir/result.txt="chemin vers le fichier de résultat"
curl "https://serpapi.com/search.json?engine=google_images&q=$SerpapiSearch&api_key=$SerpapiAPIKEY" -o $temp_dir/result.txt