Skip to main content

Création d'un compte google Search

1. Création d'un compte de facturation

image-1651665806183.png

  • Créer un nouveau compte → Les informations sont pré-rempli, il faudra valider la carte de paiement associée

image-1651665895854.png

2. Création du projet

image-1651666019205.png

Sélectionner le projet créé et créer un nouvel identifiant API → pour remplir les informations, se baser sur Wiltz ou LWK

image-1651666165483.png

3. Créer un nouveau Search Engine

image-1651666328324.png

4. Se connecter sur le projet Q3 puis aller dans les paramètres -> Types de pages

Ajouter le code suivant :

pageGoogle:
  type: api
  config:
    format: json
    src: 'https://www.googleapis.com/customsearch/v1?key=AIzaSyB1Seja5UcvQdBbJYEihZxWvbdkjhDF6DY&cx=703ca50653b2a7e2b&q={{query.q}}&start={{nextitem}}&lr={{current.locale}}'
    timeout: 10
    defaults:
      nextitem: 1
    caching:
      enabled: true
      type: default
      validity: 0

"key" : correspond la clé API créée

image-1651666772259.png

"cx" : Remplacer l'Engine ID (cx) qui correspond au Search Engine créé

image-1651666798660.png

"start" : est utilisé si jamais il y a besoin d'une pagination (l'API ne renvoie que 10 résultats)

"lr" : Paramètre de langue si besoin