@brave/n8n-nodes-brave-search
Version:
A n8n node for the Brave Search API
45 lines • 1.47 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BraveSearchApi = void 0;
class BraveSearchApi {
constructor() {
this.name = 'braveSearchApi';
this.icon = 'file:../nodes/BraveSearch/braveSearch.svg';
this.displayName = 'Brave Search API';
this.documentationUrl = 'https://api-dashboard.search.brave.com/app/documentation/';
this.properties = [
{
name: 'apiKey',
displayName: 'API Key',
type: 'string',
default: '',
typeOptions: { password: true },
},
];
this.authenticate = {
type: 'generic',
properties: {
headers: {
'X-Subscription-Token': '={{$credentials.apiKey}}',
},
},
};
this.test = {
request: {
url: 'https://api.search.brave.com/res/v1/web/search',
method: 'GET',
headers: {
Accept: 'application/json',
'Accept-Encoding': 'gzip',
'X-Subscription-Token': '={{$credentials.apiKey}}',
},
qs: {
q: 'n8n',
count: 1,
},
},
};
}
}
exports.BraveSearchApi = BraveSearchApi;
//# sourceMappingURL=BraveSearchApi.credentials.js.map