Référence API
API de recherche Google
Accédez aux résultats de recherche Google et aux données associées pour les agents IA
Version
1.0.0
Points de terminaison
6
URL de base
https://api.pressmonitor.com/google/v1 Authentification
Toutes les requêtes utilisent une authentification par jeton Bearer. Ajoutez l'en-tête Authorization à chaque appel.
Authorization: Bearer VOTRE_JETON GET
/web Recherche Web
Recherche Web
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query_text | string | query | Oui | Texte de la requête |
| lang_code | string | query | Non | Code langue |
| country_code | string | query | Non | Code pays |
| count | integer | query | Non | Nombre de résultats à retourner |
| safesearch | string | query | Non | Filtre de sécurité |
Exemples de code
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(); Réponses
200 Succès
GET
/news Recherche d'actualités
Recherche d'actualités
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query_text | string | query | Oui | Texte de la requête |
| lang_code | string | query | Non | Code langue |
| country_code | string | query | Non | Code pays |
| count | integer | query | Non | Nombre de résultats à retourner |
Exemples de code
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(); Réponses
200 Succès
GET
/images Recherche d'images
Recherche d'images
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query_text | string | query | Oui | Texte de la requête |
| lang_code | string | query | Non | Code langue |
| country_code | string | query | Non | Code pays |
| count | integer | query | Non | Nombre de résultats à retourner |
| safesearch | string | query | Non | Filtre de sécurité |
| color | string | query | Non | Couleur |
| size | string | query | Non | Taille |
| type_image | string | query | Non | Type d'image |
| layout | string | query | Non | Disposition |
Exemples de code
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(); Réponses
200 Succès
GET
/videos Recherche de vidéos
Recherche de vidéos
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query_text | string | query | Oui | Texte de la requête |
| lang_code | string | query | Non | Code langue |
| country_code | string | query | Non | Code pays |
| count | integer | query | Non | Nombre de résultats à retourner |
| safesearch | string | query | Non | Filtre de sécurité |
| timelimit | string | query | Non | Limite de temps |
| duration | string | query | Non | Durée |
| resolution | string | query | Non | Résolution |
Exemples de code
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(); Réponses
200 Succès
GET
/map Recherche sur carte
Recherche sur carte
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query_text | string | query | Oui | Texte de la requête |
| place | string | query | Non | Lieu |
| street | string | query | Non | Rue |
| city | string | query | Non | Ville |
| county | string | query | Non | Comté |
| state | string | query | Non | État |
| country | string | query | Non | Pays |
| postalcode | string | query | Non | Code postal |
| latitude | string | query | Non | Latitude |
| longitude | string | query | Non | Longitude |
| radius | string | query | Non | Rayon |
Exemples de code
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(); Réponses
200 Succès
GET
/autocomplete Saisie semi-automatique
Saisie semi-automatique
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query_text | string | query | Oui | Texte de la requête |
Exemples de code
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(); Réponses
200 Succès