Платформенная аналитика API
Google Поиск API
Ежедневно миллиарды людей используют Google для поиска веб-страниц, новостей, изображений, видео и локальных результатов, обеспечивая важность для обнаружения, управления репутацией и привлечения спроса.
Справочник API Версия: 1.0.0 6 Точки доступа Аутентификация
Базовый URL
https://api.pressmonitor.com/google/v1 Аутентификация
Все запросы используют аутентификацию с токеном Bearer. Добавьте заголовок Authorization ко всем вызовам.
Authorization: Bearer YOUR_TOKEN GET
/web Поиск в Интернете
Search Web
Параметры
| Имя | Тип | Местоположение | Обязательно | Описание |
|---|---|---|---|---|
| query_text | string | query | Да | Текст запроса |
| lang_code | string | query | Нет | Код языка |
| country_code | string | query | Нет | Код страны |
| count | integer | query | Нет | Количество возвращаемых результатов |
| safesearch | string | query | Нет | Безопасный поиск |
Примеры кода
curl --request GET \ --url 'https://api.pressmonitor.com/google/v1/web?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/google/v1/web?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/google/v1/web" querystring = {"query_text":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","country_code":"SOME_STRING_VALUE","count":"SOME_INTEGER_VALUE","safesearch":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/google/v1/web?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/google/v1/web?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Ответы
200 Успешно
GET
/news Поиск новостей
Search News
Параметры
| Имя | Тип | Местоположение | Обязательно | Описание |
|---|---|---|---|---|
| query_text | string | query | Да | Текст запроса |
| lang_code | string | query | Нет | Код языка |
| country_code | string | query | Нет | Код страны |
| count | integer | query | Нет | Количество возвращаемых результатов |
Примеры кода
curl --request GET \ --url 'https://api.pressmonitor.com/google/v1/news?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/google/v1/news?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/google/v1/news" querystring = {"query_text":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","country_code":"SOME_STRING_VALUE","count":"SOME_INTEGER_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/google/v1/news?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/google/v1/news?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Ответы
200 Успешно
GET
/images Поиск изображений
Search Images
Параметры
| Имя | Тип | Местоположение | Обязательно | Описание |
|---|---|---|---|---|
| query_text | string | query | Да | Текст запроса |
| lang_code | string | query | Нет | Код языка |
| country_code | string | query | Нет | Код страны |
| count | integer | query | Нет | Количество возвращаемых результатов |
| safesearch | string | query | Нет | Безопасный поиск |
| color | string | query | Нет | Цвет |
| size | string | query | Нет | Размер |
| type_image | string | query | Нет | Тип изображения |
| layout | string | query | Нет | Макет |
Примеры кода
curl --request GET \ --url 'https://api.pressmonitor.com/google/v1/images?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE&color=SOME_STRING_VALUE&size=SOME_STRING_VALUE&type_image=SOME_STRING_VALUE&layout=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/google/v1/images?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE&color=SOME_STRING_VALUE&size=SOME_STRING_VALUE&type_image=SOME_STRING_VALUE&layout=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/google/v1/images" querystring = {"query_text":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","country_code":"SOME_STRING_VALUE","count":"SOME_INTEGER_VALUE","safesearch":"SOME_STRING_VALUE","color":"SOME_STRING_VALUE","size":"SOME_STRING_VALUE","type_image":"SOME_STRING_VALUE","layout":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/google/v1/images?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE&color=SOME_STRING_VALUE&size=SOME_STRING_VALUE&type_image=SOME_STRING_VALUE&layout=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/google/v1/images?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE&color=SOME_STRING_VALUE&size=SOME_STRING_VALUE&type_image=SOME_STRING_VALUE&layout=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Ответы
200 Успешно
GET
/videos Поиск видео
Search Videos
Параметры
| Имя | Тип | Местоположение | Обязательно | Описание |
|---|---|---|---|---|
| query_text | string | query | Да | Текст запроса |
| lang_code | string | query | Нет | Код языка |
| country_code | string | query | Нет | Код страны |
| count | integer | query | Нет | Количество возвращаемых результатов |
| safesearch | string | query | Нет | Безопасный поиск |
| timelimit | string | query | Нет | Ограничение по времени |
| duration | string | query | Нет | Длительность |
| resolution | string | query | Нет | Разрешение |
Примеры кода
curl --request GET \ --url 'https://api.pressmonitor.com/google/v1/videos?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE&timelimit=SOME_STRING_VALUE&duration=SOME_STRING_VALUE&resolution=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/google/v1/videos?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE&timelimit=SOME_STRING_VALUE&duration=SOME_STRING_VALUE&resolution=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/google/v1/videos" querystring = {"query_text":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","country_code":"SOME_STRING_VALUE","count":"SOME_INTEGER_VALUE","safesearch":"SOME_STRING_VALUE","timelimit":"SOME_STRING_VALUE","duration":"SOME_STRING_VALUE","resolution":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/google/v1/videos?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE&timelimit=SOME_STRING_VALUE&duration=SOME_STRING_VALUE&resolution=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/google/v1/videos?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&safesearch=SOME_STRING_VALUE&timelimit=SOME_STRING_VALUE&duration=SOME_STRING_VALUE&resolution=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Ответы
200 Успешно
GET
/map Поиск на карте
Search Map
Параметры
| Имя | Тип | Местоположение | Обязательно | Описание |
|---|---|---|---|---|
| query_text | string | query | Да | Текст запроса |
| place | string | query | Нет | Место |
| street | string | query | Нет | Улица |
| city | string | query | Нет | Город |
| county | string | query | Нет | Округ |
| state | string | query | Нет | Штат |
| country | string | query | Нет | Страна |
| postalcode | string | query | Нет | Почтовый индекс |
| latitude | string | query | Нет | Широта |
| longitude | string | query | Нет | Долгота |
| radius | string | query | Нет | Радиус |
Примеры кода
curl --request GET \ --url 'https://api.pressmonitor.com/google/v1/map?query_text=SOME_STRING_VALUE&place=SOME_STRING_VALUE&street=SOME_STRING_VALUE&city=SOME_STRING_VALUE&county=SOME_STRING_VALUE&state=SOME_STRING_VALUE&country=SOME_STRING_VALUE&postalcode=SOME_STRING_VALUE&latitude=SOME_STRING_VALUE&longitude=SOME_STRING_VALUE&radius=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/google/v1/map?query_text=SOME_STRING_VALUE&place=SOME_STRING_VALUE&street=SOME_STRING_VALUE&city=SOME_STRING_VALUE&county=SOME_STRING_VALUE&state=SOME_STRING_VALUE&country=SOME_STRING_VALUE&postalcode=SOME_STRING_VALUE&latitude=SOME_STRING_VALUE&longitude=SOME_STRING_VALUE&radius=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/google/v1/map" querystring = {"query_text":"SOME_STRING_VALUE","place":"SOME_STRING_VALUE","street":"SOME_STRING_VALUE","city":"SOME_STRING_VALUE","county":"SOME_STRING_VALUE","state":"SOME_STRING_VALUE","country":"SOME_STRING_VALUE","postalcode":"SOME_STRING_VALUE","latitude":"SOME_STRING_VALUE","longitude":"SOME_STRING_VALUE","radius":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/google/v1/map?query_text=SOME_STRING_VALUE&place=SOME_STRING_VALUE&street=SOME_STRING_VALUE&city=SOME_STRING_VALUE&county=SOME_STRING_VALUE&state=SOME_STRING_VALUE&country=SOME_STRING_VALUE&postalcode=SOME_STRING_VALUE&latitude=SOME_STRING_VALUE&longitude=SOME_STRING_VALUE&radius=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/google/v1/map?query_text=SOME_STRING_VALUE&place=SOME_STRING_VALUE&street=SOME_STRING_VALUE&city=SOME_STRING_VALUE&county=SOME_STRING_VALUE&state=SOME_STRING_VALUE&country=SOME_STRING_VALUE&postalcode=SOME_STRING_VALUE&latitude=SOME_STRING_VALUE&longitude=SOME_STRING_VALUE&radius=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Ответы
200 Успешно
GET
/autocomplete Автозаполнение
Auto Complete
Параметры
| Имя | Тип | Местоположение | Обязательно | Описание |
|---|---|---|---|---|
| query_text | string | query | Да | Текст запроса |
Примеры кода
curl --request GET \ --url 'https://api.pressmonitor.com/google/v1/autocomplete?query_text=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/google/v1/autocomplete?query_text=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/google/v1/autocomplete" querystring = {"query_text":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/google/v1/autocomplete?query_text=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/google/v1/autocomplete?query_text=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Ответы
200 Успешно