UNPKG

n8n-nodes-google-custom-search

Version:

Google Custom Search node for n8n

49 lines 1.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GoogleCustomSearchApi = void 0; class GoogleCustomSearchApi { constructor() { this.name = 'googleCustomSearchApi'; this.displayName = 'Google Custom Search API'; this.documentationUrl = 'https://developers.google.com/custom-search/v1/overview'; this.properties = [ { displayName: 'API Key', name: 'apiKey', type: 'string', typeOptions: { password: true, }, default: '', required: true, description: 'Your Google Custom Search API key', }, { displayName: 'Search Engine ID (cx)', name: 'searchEngineId', type: 'string', default: '', required: true, description: 'The custom search engine ID (cx parameter)', }, ]; // This allows n8n to verify if the credentials are correct this.test = { request: { baseURL: 'https://www.googleapis.com/customsearch/v1', url: '?q=test', }, }; this.authenticate = { type: 'generic', properties: { qs: { 'key': '={{$credentials.apiKey}}', 'cx': '={{$credentials.searchEngineId}}', }, }, }; } } exports.GoogleCustomSearchApi = GoogleCustomSearchApi; //# sourceMappingURL=GoogleCustomSearchApi.credentials.js.map