You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -7,7 +11,8 @@ export class SearchApi implements INodeType {
7
11
icon: 'file:searchApi.svg',
8
12
group: ['output'],
9
13
version: 1,
10
-
description: 'Call this tool whenever the answer might require fresh, niche, or externally-verifiable information. Make sure to always cite the sources in the final reply. ',
14
+
description:
15
+
'Access real-time search results from Google, Google Images, Google Maps, Google Shopping and more. Use this when you need current, up-to-date information, product searches, location data, or visual content that may not be available in your training data.',
11
16
subtitle: '={{ $parameter["engine"] }}',
12
17
defaults: {name: 'SearchApi'},
13
18
// @ts-ignore
@@ -17,7 +22,7 @@ export class SearchApi implements INodeType {
description: 'Search engine to use for the query',
45
-
hint: 'Check https://www.searchapi.io/docs/google for the available engines',
46
-
routing: {
47
-
request: {
48
-
qs: {
49
-
engine: '={{ $value }}',
50
-
},
51
-
},
52
-
},
44
+
displayName: 'Resource',
45
+
name: 'resource',
46
+
type: 'options',
47
+
description: 'The search engine to use',
48
+
noDataExpression: true,
49
+
options: [
50
+
google.resource,
51
+
google_images.resource,
52
+
google_maps.resource,
53
+
google_shopping.resource,
54
+
55
+
],
56
+
default: google.resource.value,
53
57
},
54
58
{
55
-
displayName: 'Parameters',
56
-
name: 'parameters',
57
-
type: 'fixedCollection',
58
-
typeOptions: {multipleValues: true},
59
-
default: {},
60
-
description: 'Add the parameters you want to use for the search, refer to the SearchAPI.io documentation for the available parameters for the selected engine',
59
+
displayName: 'Operation Name',
60
+
name: 'operation',
61
+
type: 'options',
62
+
noDataExpression: true,
61
63
options: [
62
64
{
63
-
displayName: 'Parameter',
64
-
name: 'parameter',
65
-
values: [
66
-
{
67
-
displayName: 'Name',
68
-
name: 'name',
69
-
type: 'string',
70
-
default: '',
71
-
placeholder: 'q',
72
-
},
73
-
{
74
-
displayName: 'Value',
75
-
name: 'value',
76
-
type: 'string',
77
-
default: '',
78
-
placeholder: 'pizza near me',
65
+
name: 'Search',
66
+
value: 'search',
67
+
action: 'Search',
68
+
description: 'Search using the engine specified in the resource',
69
+
routing: {
70
+
request: {
71
+
qs: {
72
+
engine: '={{ $parameter["resource"] }}',
73
+
},
79
74
},
80
-
],
75
+
},
81
76
},
82
77
],
83
-
/**
84
-
* Build an object like { hl: 'en', gl: 'us' } out of
85
-
* the collection entries and merge it into qs.
86
-
*/
87
-
routing: {
88
-
request: {
89
-
// We are doing this cast here because we need to
90
-
// build an object out of the collection entries
91
-
// and merge it into qs, but qs expects an object.
0 commit comments