頭にきたのでメモ
<?php
require_once("./vendor/autoload.php");
$api_key = '********';
$app_name = '********';
$cx = '********';
$client = new Google_Client();
$client->setApplicationName($app_name);
$client->setDeveloperKey($api_key);
$service = new Google_Service_Customsearch($client);
$query = "歳納京子";
$param = array(
'searchType' => 'image',
'cx' => $cx,
'num' => '10',
);
$results = $service->cse->listCse($query, $param);
var_dump($results->getItems());
PHPなら
https://github.com/google/google-api-php-client を使えば
こんな感じで書けば結果を取ってこれるはず、「だが」
設定がさっきの画像の状態だと画像検索できない!
上画像の状態がONだったようだ
ちょっと考えればわかったはずなのに無駄に時間を費やしてしまったので反省