n8n-nodes-exa-official 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,23 +45,13 @@ class Exa {
45
45
  {
46
46
  name: 'Answer',
47
47
  value: 'answer',
48
- description: 'Get an AI-generated answer to a query',
48
+ description: 'Get a web-grounded LLM answer to a query',
49
49
  },
50
50
  {
51
51
  name: 'Content',
52
52
  value: 'contents',
53
53
  description: 'Get contents from URLs',
54
54
  },
55
- {
56
- name: 'Find Similar',
57
- value: 'findSimilar',
58
- description: 'Find similar links to a given URL',
59
- },
60
- {
61
- name: 'Research',
62
- value: 'research',
63
- description: 'Create and manage asynchronous research tasks',
64
- },
65
55
  {
66
56
  name: 'Search',
67
57
  value: 'search',
@@ -122,7 +112,7 @@ class Exa {
122
112
  {
123
113
  name: 'Get Contents',
124
114
  value: 'getContents',
125
- action: 'Get contents from ur ls',
115
+ action: 'Get contents from urls',
126
116
  description: 'Retrieve contents from a list of URLs',
127
117
  routing: {
128
118
  request: {
@@ -134,32 +124,6 @@ class Exa {
134
124
  ],
135
125
  default: 'getContents',
136
126
  },
137
- {
138
- displayName: 'Operation',
139
- name: 'operation',
140
- type: 'options',
141
- noDataExpression: true,
142
- displayOptions: {
143
- show: {
144
- resource: ['findSimilar'],
145
- },
146
- },
147
- options: [
148
- {
149
- name: 'Find Similar Links',
150
- value: 'findSimilar',
151
- action: 'Find similar links',
152
- description: 'Find links similar to a given URL',
153
- routing: {
154
- request: {
155
- method: 'POST',
156
- url: '/findSimilar',
157
- },
158
- },
159
- },
160
- ],
161
- default: 'findSimilar',
162
- },
163
127
  {
164
128
  displayName: 'Operation',
165
129
  name: 'operation',
@@ -174,8 +138,8 @@ class Exa {
174
138
  {
175
139
  name: 'Get Answer',
176
140
  value: 'getAnswer',
177
- action: 'Get an AI answer',
178
- description: 'Get an AI-generated answer to a query',
141
+ action: 'Get a web grounded LLM answer',
142
+ description: 'Get a web-grounded LLM answer to a query',
179
143
  routing: {
180
144
  request: {
181
145
  method: 'POST',
@@ -186,56 +150,6 @@ class Exa {
186
150
  ],
187
151
  default: 'getAnswer',
188
152
  },
189
- {
190
- displayName: 'Operation',
191
- name: 'operation',
192
- type: 'options',
193
- noDataExpression: true,
194
- displayOptions: {
195
- show: {
196
- resource: ['research'],
197
- },
198
- },
199
- options: [
200
- {
201
- name: 'Create Task',
202
- value: 'createTask',
203
- action: 'Create a research task',
204
- description: 'Create an asynchronous research task',
205
- routing: {
206
- request: {
207
- method: 'POST',
208
- url: '/research/v1',
209
- },
210
- },
211
- },
212
- {
213
- name: 'Get Task',
214
- value: 'getTask',
215
- action: 'Get a research task',
216
- description: 'Retrieve status and results of a research task',
217
- routing: {
218
- request: {
219
- method: 'GET',
220
- url: '=/research/v1/{{ $parameter.researchId }}',
221
- },
222
- },
223
- },
224
- {
225
- name: 'List Tasks',
226
- value: 'listTasks',
227
- action: 'List research tasks',
228
- description: 'Retrieve a paginated list of research tasks',
229
- routing: {
230
- request: {
231
- method: 'GET',
232
- url: '/research/v1',
233
- },
234
- },
235
- },
236
- ],
237
- default: 'createTask',
238
- },
239
153
  {
240
154
  displayName: 'Query',
241
155
  name: 'query',
@@ -256,96 +170,6 @@ class Exa {
256
170
  },
257
171
  },
258
172
  },
259
- {
260
- displayName: 'Deep Search Type',
261
- name: 'deepSearchType',
262
- type: 'options',
263
- displayOptions: {
264
- show: {
265
- resource: ['search'],
266
- operation: ['deepSearch'],
267
- },
268
- },
269
- options: [
270
- {
271
- name: 'Deep',
272
- value: 'deep',
273
- description: 'Deep search with synthesized output (~5s)',
274
- },
275
- {
276
- name: 'Deep Reasoning',
277
- value: 'deep-reasoning',
278
- description: 'Full deep search with stronger reasoning (~7s)',
279
- },
280
- ],
281
- default: 'deep',
282
- description: 'The deep search variant to use',
283
- routing: {
284
- request: {
285
- body: {
286
- type: '={{ $value }}',
287
- },
288
- },
289
- },
290
- },
291
- {
292
- displayName: 'Instructions',
293
- name: 'instructions',
294
- type: 'string',
295
- required: true,
296
- displayOptions: {
297
- show: {
298
- resource: ['research'],
299
- operation: ['createTask'],
300
- },
301
- },
302
- default: '',
303
- description: 'Instructions for what you would like research on',
304
- typeOptions: {
305
- rows: 4,
306
- },
307
- routing: {
308
- request: {
309
- body: {
310
- instructions: '={{ $value }}',
311
- },
312
- },
313
- },
314
- },
315
- {
316
- displayName: 'Research ID',
317
- name: 'researchId',
318
- type: 'string',
319
- required: true,
320
- displayOptions: {
321
- show: {
322
- resource: ['research'],
323
- operation: ['getTask'],
324
- },
325
- },
326
- default: '',
327
- description: 'The unique identifier of the research request to retrieve',
328
- },
329
- {
330
- displayName: 'URL',
331
- name: 'url',
332
- type: 'string',
333
- required: true,
334
- displayOptions: {
335
- show: {
336
- resource: ['findSimilar'],
337
- },
338
- },
339
- default: '',
340
- description: 'The URL to find similar links for',
341
- routing: {
342
- request: {
343
- body: {
344
- url: '={{ $value }}',
345
- },
346
- },
347
- },
348
- },
349
173
  {
350
174
  displayName: 'URLs',
351
175
  name: 'urls',
@@ -357,16 +181,18 @@ class Exa {
357
181
  },
358
182
  },
359
183
  default: '',
360
- description: 'Comma-separated list of URLs to get contents for',
184
+ description: 'Comma-separated list of URLs or IDs to get contents for',
361
185
  routing: {
362
186
  send: {
363
187
  preSend: [
364
188
  async function (requestOptions) {
365
189
  const urls = this.getNodeParameter('urls', 0);
366
- const urlArray = urls.split(',').map((url) => url.trim());
190
+ const urlArray = urls
191
+ .split(',')
192
+ .map((url) => url.trim());
367
193
  requestOptions.body = {
368
194
  ...requestOptions.body,
369
- urls: urlArray,
195
+ ids: urlArray,
370
196
  };
371
197
  return requestOptions;
372
198
  },
@@ -375,48 +201,39 @@ class Exa {
375
201
  },
376
202
  },
377
203
  {
378
- displayName: 'Search Type',
379
- name: 'type',
204
+ displayName: 'Deep Search Type',
205
+ name: 'deepSearchType',
380
206
  type: 'options',
381
207
  displayOptions: {
382
208
  show: {
383
209
  resource: ['search'],
384
- operation: ['search'],
210
+ operation: ['deepSearch'],
385
211
  },
386
212
  },
387
213
  options: [
388
- {
389
- name: 'Auto',
390
- value: 'auto',
391
- description: 'Intelligently combines neural and other search methods',
392
- },
393
214
  {
394
215
  name: 'Deep',
395
216
  value: 'deep',
396
217
  description: 'Deep search with synthesized output (~5s)',
397
218
  },
398
219
  {
399
- name: 'Deep Reasoning',
400
- value: 'deep-reasoning',
401
- description: 'Full deep search with stronger reasoning (~7s)',
402
- },
403
- {
404
- name: 'Fast',
405
- value: 'fast',
406
- description: 'Streamlined low-latency search',
220
+ name: 'Deep Lite',
221
+ value: 'deep-lite',
222
+ description: 'Lightweight synthesized output with lower latency',
407
223
  },
408
224
  {
409
- name: 'Instant',
410
- value: 'instant',
411
- description: 'Lowest latency search optimized for real-time applications',
225
+ name: 'Deep Max',
226
+ value: 'deep-max',
227
+ description: 'Highest-effort deep search mode',
412
228
  },
413
229
  {
414
- name: 'Neural',
415
- value: 'neural',
416
- description: 'Embeddings-based semantic search',
230
+ name: 'Deep Reasoning',
231
+ value: 'deep-reasoning',
232
+ description: 'Deep search with stronger reasoning (~7s)',
417
233
  },
418
234
  ],
419
- default: 'auto',
235
+ default: 'deep',
236
+ description: 'The deep search variant to use',
420
237
  routing: {
421
238
  request: {
422
239
  body: {
@@ -474,7 +291,10 @@ class Exa {
474
291
  if (desc) {
475
292
  requestOptions.body = {
476
293
  ...requestOptions.body,
477
- outputSchema: { type: 'text', description: desc },
294
+ outputSchema: {
295
+ type: 'text',
296
+ description: desc,
297
+ },
478
298
  };
479
299
  }
480
300
  return requestOptions;
@@ -485,7 +305,7 @@ class Exa {
485
305
  },
486
306
  {
487
307
  displayName: 'Output Schema',
488
- name: 'outputSchema',
308
+ name: 'deepOutputSchema',
489
309
  type: 'json',
490
310
  required: true,
491
311
  displayOptions: {
@@ -501,12 +321,15 @@ class Exa {
501
321
  send: {
502
322
  preSend: [
503
323
  async function (requestOptions) {
504
- const raw = this.getNodeParameter('outputSchema', 0);
324
+ const raw = this.getNodeParameter('deepOutputSchema', 0);
505
325
  if (raw) {
506
326
  const parsed = JSON.parse(raw);
507
327
  requestOptions.body = {
508
328
  ...requestOptions.body,
509
- outputSchema: { type: 'object', ...parsed },
329
+ outputSchema: {
330
+ type: 'object',
331
+ ...parsed,
332
+ },
510
333
  };
511
334
  }
512
335
  return requestOptions;
@@ -533,7 +356,9 @@ class Exa {
533
356
  async function (requestOptions) {
534
357
  const queries = this.getNodeParameter('additionalQueries', 0);
535
358
  if (queries) {
536
- const queryArray = queries.split(',').map((q) => q.trim());
359
+ const queryArray = queries
360
+ .split(',')
361
+ .map((q) => q.trim());
537
362
  requestOptions.body = {
538
363
  ...requestOptions.body,
539
364
  additionalQueries: queryArray,
@@ -546,227 +371,328 @@ class Exa {
546
371
  },
547
372
  },
548
373
  {
549
- displayName: 'Number of Results',
550
- name: 'numResults',
551
- type: 'number',
374
+ displayName: 'System Prompt',
375
+ name: 'deepSystemPrompt',
376
+ type: 'string',
552
377
  displayOptions: {
553
378
  show: {
554
- resource: ['search', 'findSimilar'],
379
+ resource: ['search'],
380
+ operation: ['deepSearch'],
555
381
  },
556
382
  },
383
+ default: '',
384
+ description: 'Instructions that guide synthesized output and search planning',
557
385
  typeOptions: {
558
- minValue: 1,
559
- maxValue: 100,
386
+ rows: 3,
560
387
  },
561
- default: 10,
562
- description: 'Number of results to return (max 100)',
563
388
  routing: {
564
389
  request: {
565
390
  body: {
566
- numResults: '={{ $value }}',
391
+ systemPrompt: '={{ $value }}',
567
392
  },
568
393
  },
569
394
  },
570
395
  },
571
396
  {
572
- displayName: 'Answer Options',
573
- name: 'answerOptions',
574
- type: 'collection',
575
- placeholder: 'Add Option',
576
- default: {},
397
+ displayName: 'Search Type',
398
+ name: 'type',
399
+ type: 'options',
577
400
  displayOptions: {
578
401
  show: {
579
- resource: ['answer'],
402
+ resource: ['search'],
403
+ operation: ['search'],
580
404
  },
581
405
  },
582
406
  options: [
583
407
  {
584
- displayName: 'Include Text',
585
- name: 'text',
586
- type: 'boolean',
587
- default: false,
588
- description: 'Whether to include full text content in the citation results',
589
- routing: {
590
- request: {
591
- body: {
592
- text: '={{ $value }}',
593
- },
594
- },
595
- },
408
+ name: 'Auto',
409
+ value: 'auto',
410
+ description: 'Intelligently combines neural and other search methods',
596
411
  },
597
412
  {
598
- displayName: 'Output Schema',
599
- name: 'outputSchema',
600
- type: 'json',
601
- default: '',
602
- description: 'JSON Schema to enforce structured answer output instead of a plain string',
603
- routing: {
604
- request: {
605
- body: {
606
- outputSchema: '={{ JSON.parse($value) }}',
607
- },
608
- },
609
- },
413
+ name: 'Fast',
414
+ value: 'fast',
415
+ description: 'Low-latency optimized search',
610
416
  },
611
417
  {
612
- displayName: 'Stream',
613
- name: 'stream',
614
- type: 'boolean',
615
- default: false,
616
- description: 'Whether to stream the response via Server-Sent Events',
617
- routing: {
618
- request: {
619
- body: {
620
- stream: '={{ $value }}',
621
- },
622
- },
623
- },
418
+ name: 'Instant',
419
+ value: 'instant',
420
+ description: 'Lowest latency embeddings-based search (~150ms)',
624
421
  },
625
422
  ],
423
+ default: 'auto',
424
+ routing: {
425
+ request: {
426
+ body: {
427
+ type: '={{ $value }}',
428
+ },
429
+ },
430
+ },
626
431
  },
627
432
  {
628
- displayName: 'Additional Options',
629
- name: 'additionalOptions',
433
+ displayName: 'Number of Results',
434
+ name: 'numResults',
435
+ type: 'number',
436
+ displayOptions: {
437
+ show: {
438
+ resource: ['search'],
439
+ },
440
+ },
441
+ typeOptions: {
442
+ minValue: 1,
443
+ maxValue: 100,
444
+ },
445
+ default: 10,
446
+ description: 'Number of results to return (max 100)',
447
+ routing: {
448
+ request: {
449
+ body: {
450
+ numResults: '={{ $value }}',
451
+ },
452
+ },
453
+ },
454
+ },
455
+ {
456
+ displayName: 'Additional Fields',
457
+ name: 'additionalFields',
630
458
  type: 'collection',
631
- placeholder: 'Add Option',
459
+ placeholder: 'Add Field',
632
460
  default: {},
633
461
  displayOptions: {
634
462
  show: {
635
- resource: ['research'],
636
- operation: ['createTask'],
463
+ resource: ['search'],
464
+ operation: ['search'],
637
465
  },
638
466
  },
639
467
  options: [
640
468
  {
641
- displayName: 'Model',
642
- name: 'model',
469
+ displayName: 'Category',
470
+ name: 'category',
643
471
  type: 'options',
644
472
  options: [
473
+ { name: 'Company', value: 'company' },
645
474
  {
646
- name: 'Exa Research Fast',
647
- value: 'exa-research-fast',
648
- description: 'Fastest research model',
475
+ name: 'Financial Report',
476
+ value: 'financial report',
649
477
  },
478
+ { name: 'News', value: 'news' },
479
+ { name: 'People', value: 'people' },
650
480
  {
651
- name: 'Exa Research',
652
- value: 'exa-research',
653
- description: 'Balanced speed and quality',
481
+ name: 'Personal Site',
482
+ value: 'personal site',
654
483
  },
655
484
  {
656
- name: 'Exa Research Pro',
657
- value: 'exa-research-pro',
658
- description: 'Most thorough analysis and stronger reasoning',
485
+ name: 'Research Paper',
486
+ value: 'research paper',
659
487
  },
488
+ { name: 'Tweet', value: 'tweet' },
660
489
  ],
661
- default: 'exa-research',
662
- description: 'Research model to use',
490
+ default: 'company',
491
+ description: 'A data category to focus on',
663
492
  routing: {
664
493
  request: {
665
494
  body: {
666
- model: '={{ $value }}',
495
+ category: '={{ $value }}',
667
496
  },
668
497
  },
669
498
  },
670
499
  },
671
500
  {
672
- displayName: 'Output Schema',
673
- name: 'outputSchema',
674
- type: 'json',
501
+ displayName: 'End Published Date',
502
+ name: 'endPublishedDate',
503
+ type: 'dateTime',
675
504
  default: '',
676
- description: 'JSON Schema to enforce structured output',
505
+ description: 'Only return links published before this date',
677
506
  routing: {
678
507
  request: {
679
508
  body: {
680
- outputSchema: '={{ JSON.parse($value) }}',
509
+ endPublishedDate: '={{ new Date($value).toISOString() }}',
681
510
  },
682
511
  },
683
512
  },
684
513
  },
685
- ],
686
- },
687
- {
688
- displayName: 'Query Options',
689
- name: 'queryOptions',
690
- type: 'collection',
691
- placeholder: 'Add Option',
692
- default: {},
693
- displayOptions: {
694
- show: {
695
- resource: ['research'],
696
- operation: ['getTask'],
514
+ {
515
+ displayName: 'Exclude Domains',
516
+ name: 'excludeDomains',
517
+ type: 'string',
518
+ default: '',
519
+ description: 'Comma-separated list of domains to exclude',
520
+ routing: {
521
+ send: {
522
+ preSend: [
523
+ async function (requestOptions) {
524
+ const domains = this.getNodeParameter('additionalFields.excludeDomains', 0);
525
+ if (domains) {
526
+ const domainArray = domains
527
+ .split(',')
528
+ .map((d) => d.trim());
529
+ requestOptions.body = {
530
+ ...requestOptions.body,
531
+ excludeDomains: domainArray,
532
+ };
533
+ }
534
+ return requestOptions;
535
+ },
536
+ ],
537
+ },
538
+ },
697
539
  },
698
- },
699
- options: [
700
540
  {
701
- displayName: 'Stream',
702
- name: 'stream',
703
- type: 'boolean',
704
- default: false,
705
- description: 'Whether to receive real-time updates via Server-Sent Events (SSE)',
541
+ displayName: 'Exclude Text',
542
+ name: 'excludeText',
543
+ type: 'string',
544
+ default: '',
545
+ description: 'Text that must not be present in webpage (comma-separated, max 5 words each)',
706
546
  routing: {
707
- request: {
708
- qs: {
709
- stream: '={{ $value ? "true" : undefined }}',
710
- },
547
+ send: {
548
+ preSend: [
549
+ async function (requestOptions) {
550
+ const text = this.getNodeParameter('additionalFields.excludeText', 0);
551
+ if (text) {
552
+ const textArray = text
553
+ .split(',')
554
+ .map((t) => t.trim());
555
+ requestOptions.body = {
556
+ ...requestOptions.body,
557
+ excludeText: textArray,
558
+ };
559
+ }
560
+ return requestOptions;
561
+ },
562
+ ],
711
563
  },
712
564
  },
713
565
  },
714
566
  {
715
- displayName: 'Events',
716
- name: 'events',
567
+ displayName: 'Include Domains',
568
+ name: 'includeDomains',
569
+ type: 'string',
570
+ default: '',
571
+ description: 'Comma-separated list of domains to include (e.g., arxiv.org, github.com)',
572
+ routing: {
573
+ send: {
574
+ preSend: [
575
+ async function (requestOptions) {
576
+ const domains = this.getNodeParameter('additionalFields.includeDomains', 0);
577
+ if (domains) {
578
+ const domainArray = domains
579
+ .split(',')
580
+ .map((d) => d.trim());
581
+ requestOptions.body = {
582
+ ...requestOptions.body,
583
+ includeDomains: domainArray,
584
+ };
585
+ }
586
+ return requestOptions;
587
+ },
588
+ ],
589
+ },
590
+ },
591
+ },
592
+ {
593
+ displayName: 'Include Text',
594
+ name: 'includeText',
595
+ type: 'string',
596
+ default: '',
597
+ description: 'Text that must be present in webpage (comma-separated, max 5 words each)',
598
+ routing: {
599
+ send: {
600
+ preSend: [
601
+ async function (requestOptions) {
602
+ const text = this.getNodeParameter('additionalFields.includeText', 0);
603
+ if (text) {
604
+ const textArray = text
605
+ .split(',')
606
+ .map((t) => t.trim());
607
+ requestOptions.body = {
608
+ ...requestOptions.body,
609
+ includeText: textArray,
610
+ };
611
+ }
612
+ return requestOptions;
613
+ },
614
+ ],
615
+ },
616
+ },
617
+ },
618
+ {
619
+ displayName: 'Moderation',
620
+ name: 'moderation',
717
621
  type: 'boolean',
718
622
  default: false,
719
- description: 'Whether to include the detailed event log of all operations performed',
623
+ description: 'Whether to filter unsafe content from results',
720
624
  routing: {
721
625
  request: {
722
- qs: {
723
- events: '={{ $value ? "true" : undefined }}',
626
+ body: {
627
+ moderation: '={{ $value }}',
724
628
  },
725
629
  },
726
630
  },
727
631
  },
728
- ],
729
- },
730
- {
731
- displayName: 'List Options',
732
- name: 'listOptions',
733
- type: 'collection',
734
- placeholder: 'Add Option',
735
- default: {},
736
- displayOptions: {
737
- show: {
738
- resource: ['research'],
739
- operation: ['listTasks'],
632
+ {
633
+ displayName: 'Output Schema',
634
+ name: 'outputSchema',
635
+ type: 'json',
636
+ default: '',
637
+ description: 'JSON Schema to enforce structured output with grounded citations',
638
+ routing: {
639
+ send: {
640
+ preSend: [
641
+ async function (requestOptions) {
642
+ const schema = this.getNodeParameter('additionalFields.outputSchema', 0);
643
+ if (schema) {
644
+ requestOptions.body = {
645
+ ...requestOptions.body,
646
+ outputSchema: JSON.parse(schema),
647
+ };
648
+ }
649
+ return requestOptions;
650
+ },
651
+ ],
652
+ },
653
+ },
740
654
  },
741
- },
742
- options: [
743
655
  {
744
- displayName: 'Cursor',
745
- name: 'cursor',
746
- type: 'string',
656
+ displayName: 'Start Published Date',
657
+ name: 'startPublishedDate',
658
+ type: 'dateTime',
747
659
  default: '',
748
- description: 'The cursor to paginate through the results',
660
+ description: 'Only return links published after this date',
749
661
  routing: {
750
662
  request: {
751
- qs: {
752
- cursor: '={{ $value }}',
663
+ body: {
664
+ startPublishedDate: '={{ new Date($value).toISOString() }}',
753
665
  },
754
666
  },
755
667
  },
756
668
  },
757
669
  {
758
- displayName: 'Limit',
759
- name: 'limit',
760
- type: 'number',
761
- default: 50,
670
+ displayName: 'System Prompt',
671
+ name: 'systemPrompt',
672
+ type: 'string',
673
+ default: '',
674
+ description: 'Instructions that guide synthesized output when outputSchema is provided',
762
675
  typeOptions: {
763
- minValue: 1,
676
+ rows: 3,
764
677
  },
765
- description: 'Max number of results to return',
766
678
  routing: {
767
679
  request: {
768
- qs: {
769
- limit: '={{ $value }}',
680
+ body: {
681
+ systemPrompt: '={{ $value }}',
682
+ },
683
+ },
684
+ },
685
+ },
686
+ {
687
+ displayName: 'User Location',
688
+ name: 'userLocation',
689
+ type: 'string',
690
+ default: '',
691
+ description: 'Two-letter ISO country code (e.g., US, GB)',
692
+ routing: {
693
+ request: {
694
+ body: {
695
+ userLocation: '={{ $value }}',
770
696
  },
771
697
  },
772
698
  },
@@ -775,13 +701,14 @@ class Exa {
775
701
  },
776
702
  {
777
703
  displayName: 'Additional Fields',
778
- name: 'additionalFields',
704
+ name: 'deepAdditionalFields',
779
705
  type: 'collection',
780
706
  placeholder: 'Add Field',
781
707
  default: {},
782
708
  displayOptions: {
783
709
  show: {
784
710
  resource: ['search'],
711
+ operation: ['deepSearch'],
785
712
  },
786
713
  },
787
714
  options: [
@@ -791,11 +718,20 @@ class Exa {
791
718
  type: 'options',
792
719
  options: [
793
720
  { name: 'Company', value: 'company' },
794
- { name: 'Financial Report', value: 'financial report' },
721
+ {
722
+ name: 'Financial Report',
723
+ value: 'financial report',
724
+ },
795
725
  { name: 'News', value: 'news' },
796
726
  { name: 'People', value: 'people' },
797
- { name: 'Personal Site', value: 'personal site' },
798
- { name: 'Research Paper', value: 'research paper' },
727
+ {
728
+ name: 'Personal Site',
729
+ value: 'personal site',
730
+ },
731
+ {
732
+ name: 'Research Paper',
733
+ value: 'research paper',
734
+ },
799
735
  { name: 'Tweet', value: 'tweet' },
800
736
  ],
801
737
  default: 'company',
@@ -808,34 +744,6 @@ class Exa {
808
744
  },
809
745
  },
810
746
  },
811
- {
812
- displayName: 'End Crawl Date',
813
- name: 'endCrawlDate',
814
- type: 'dateTime',
815
- default: '',
816
- description: 'Only return links crawled by Exa before this date',
817
- routing: {
818
- request: {
819
- body: {
820
- endCrawlDate: '={{ new Date($value).toISOString() }}',
821
- },
822
- },
823
- },
824
- },
825
- {
826
- displayName: 'End Published Date',
827
- name: 'endPublishedDate',
828
- type: 'dateTime',
829
- default: '',
830
- description: 'Only return links published before this date',
831
- routing: {
832
- request: {
833
- body: {
834
- endPublishedDate: '={{ new Date($value).toISOString() }}',
835
- },
836
- },
837
- },
838
- },
839
747
  {
840
748
  displayName: 'Exclude Domains',
841
749
  name: 'excludeDomains',
@@ -846,9 +754,11 @@ class Exa {
846
754
  send: {
847
755
  preSend: [
848
756
  async function (requestOptions) {
849
- const domains = this.getNodeParameter('additionalFields.excludeDomains', 0);
757
+ const domains = this.getNodeParameter('deepAdditionalFields.excludeDomains', 0);
850
758
  if (domains) {
851
- const domainArray = domains.split(',').map((d) => d.trim());
759
+ const domainArray = domains
760
+ .split(',')
761
+ .map((d) => d.trim());
852
762
  requestOptions.body = {
853
763
  ...requestOptions.body,
854
764
  excludeDomains: domainArray,
@@ -860,43 +770,21 @@ class Exa {
860
770
  },
861
771
  },
862
772
  },
863
- {
864
- displayName: 'Exclude Text',
865
- name: 'excludeText',
866
- type: 'string',
867
- default: '',
868
- description: 'Text that must not be present in webpage (comma-separated, max 5 words each)',
869
- routing: {
870
- send: {
871
- preSend: [
872
- async function (requestOptions) {
873
- const text = this.getNodeParameter('additionalFields.excludeText', 0);
874
- if (text) {
875
- const textArray = text.split(',').map((t) => t.trim());
876
- requestOptions.body = {
877
- ...requestOptions.body,
878
- excludeText: textArray,
879
- };
880
- }
881
- return requestOptions;
882
- },
883
- ],
884
- },
885
- },
886
- },
887
773
  {
888
774
  displayName: 'Include Domains',
889
775
  name: 'includeDomains',
890
776
  type: 'string',
891
777
  default: '',
892
- description: 'Comma-separated list of domains to include (e.g., arxiv.org, github.com)',
778
+ description: 'Comma-separated list of domains to include',
893
779
  routing: {
894
780
  send: {
895
781
  preSend: [
896
782
  async function (requestOptions) {
897
- const domains = this.getNodeParameter('additionalFields.includeDomains', 0);
783
+ const domains = this.getNodeParameter('deepAdditionalFields.includeDomains', 0);
898
784
  if (domains) {
899
- const domainArray = domains.split(',').map((d) => d.trim());
785
+ const domainArray = domains
786
+ .split(',')
787
+ .map((d) => d.trim());
900
788
  requestOptions.body = {
901
789
  ...requestOptions.body,
902
790
  includeDomains: domainArray,
@@ -908,36 +796,12 @@ class Exa {
908
796
  },
909
797
  },
910
798
  },
911
- {
912
- displayName: 'Include Text',
913
- name: 'includeText',
914
- type: 'string',
915
- default: '',
916
- description: 'Text that must be present in webpage (comma-separated, max 5 words each)',
917
- routing: {
918
- send: {
919
- preSend: [
920
- async function (requestOptions) {
921
- const text = this.getNodeParameter('additionalFields.includeText', 0);
922
- if (text) {
923
- const textArray = text.split(',').map((t) => t.trim());
924
- requestOptions.body = {
925
- ...requestOptions.body,
926
- includeText: textArray,
927
- };
928
- }
929
- return requestOptions;
930
- },
931
- ],
932
- },
933
- },
934
- },
935
799
  {
936
800
  displayName: 'Moderation',
937
801
  name: 'moderation',
938
802
  type: 'boolean',
939
803
  default: false,
940
- description: 'Whether to enable content moderation to filter unsafe results',
804
+ description: 'Whether to filter unsafe content from results',
941
805
  routing: {
942
806
  request: {
943
807
  body: {
@@ -947,43 +811,69 @@ class Exa {
947
811
  },
948
812
  },
949
813
  {
950
- displayName: 'Start Crawl Date',
951
- name: 'startCrawlDate',
952
- type: 'dateTime',
814
+ displayName: 'User Location',
815
+ name: 'userLocation',
816
+ type: 'string',
953
817
  default: '',
954
- description: 'Only return links crawled by Exa after this date',
818
+ description: 'Two-letter ISO country code (e.g., US, GB)',
955
819
  routing: {
956
820
  request: {
957
821
  body: {
958
- startCrawlDate: '={{ new Date($value).toISOString() }}',
822
+ userLocation: '={{ $value }}',
959
823
  },
960
824
  },
961
825
  },
962
826
  },
827
+ ],
828
+ },
829
+ {
830
+ displayName: 'Additional Options',
831
+ name: 'answerOptions',
832
+ type: 'collection',
833
+ placeholder: 'Add Option',
834
+ default: {},
835
+ displayOptions: {
836
+ show: {
837
+ resource: ['answer'],
838
+ },
839
+ },
840
+ options: [
963
841
  {
964
- displayName: 'Start Published Date',
965
- name: 'startPublishedDate',
966
- type: 'dateTime',
842
+ displayName: 'Output Schema',
843
+ name: 'outputSchema',
844
+ type: 'json',
967
845
  default: '',
968
- description: 'Only return links published after this date',
846
+ description: 'JSON Schema to enforce structured output',
969
847
  routing: {
970
- request: {
971
- body: {
972
- startPublishedDate: '={{ new Date($value).toISOString() }}',
973
- },
848
+ send: {
849
+ preSend: [
850
+ async function (requestOptions) {
851
+ const schema = this.getNodeParameter('answerOptions.outputSchema', 0);
852
+ if (schema) {
853
+ requestOptions.body = {
854
+ ...requestOptions.body,
855
+ outputSchema: JSON.parse(schema),
856
+ };
857
+ }
858
+ return requestOptions;
859
+ },
860
+ ],
974
861
  },
975
862
  },
976
863
  },
977
864
  {
978
- displayName: 'User Location',
979
- name: 'userLocation',
865
+ displayName: 'System Prompt',
866
+ name: 'systemPrompt',
980
867
  type: 'string',
981
868
  default: '',
982
- description: 'Two-letter ISO country code (e.g., US, GB)',
869
+ description: 'Instructions that guide the answer generation',
870
+ typeOptions: {
871
+ rows: 3,
872
+ },
983
873
  routing: {
984
874
  request: {
985
875
  body: {
986
- userLocation: '={{ $value }}',
876
+ systemPrompt: '={{ $value }}',
987
877
  },
988
878
  },
989
879
  },
@@ -998,7 +888,7 @@ class Exa {
998
888
  default: {},
999
889
  displayOptions: {
1000
890
  show: {
1001
- resource: ['search', 'contents', 'findSimilar'],
891
+ resource: ['search', 'contents'],
1002
892
  },
1003
893
  },
1004
894
  routing: {
@@ -1006,82 +896,48 @@ class Exa {
1006
896
  preSend: [
1007
897
  async function (requestOptions) {
1008
898
  const contentsOptions = this.getNodeParameter('contentsOptions', 0, {});
1009
- const contents = {};
1010
- const hasTextAdvanced = (contentsOptions.textMaxCharacters !== undefined && contentsOptions.textMaxCharacters > 0) ||
1011
- contentsOptions.textIncludeHtmlTags === true;
1012
- if (hasTextAdvanced) {
1013
- const textObj = {};
1014
- if (contentsOptions.textMaxCharacters !== undefined && contentsOptions.textMaxCharacters > 0) {
1015
- textObj.maxCharacters = contentsOptions.textMaxCharacters;
1016
- }
1017
- if (contentsOptions.textIncludeHtmlTags === true) {
1018
- textObj.includeHtmlTags = true;
1019
- }
1020
- contents.text = textObj;
1021
- }
1022
- else if (contentsOptions.text !== undefined) {
1023
- contents.text = contentsOptions.text;
1024
- }
1025
- const hasHighlightsAdvanced = (contentsOptions.highlightsMaxCharacters !== undefined && contentsOptions.highlightsMaxCharacters > 0) ||
1026
- (contentsOptions.highlightsQuery !== undefined && contentsOptions.highlightsQuery !== '');
1027
- if (hasHighlightsAdvanced) {
1028
- const hlObj = {};
1029
- if (contentsOptions.highlightsMaxCharacters !== undefined && contentsOptions.highlightsMaxCharacters > 0) {
1030
- hlObj.maxCharacters = contentsOptions.highlightsMaxCharacters;
1031
- }
1032
- if (contentsOptions.highlightsQuery !== undefined && contentsOptions.highlightsQuery !== '') {
1033
- hlObj.query = contentsOptions.highlightsQuery;
1034
- }
1035
- contents.highlights = hlObj;
899
+ const contents = {
900
+ highlights: true,
901
+ };
902
+ if (contentsOptions.highlights === false) {
903
+ delete contents.highlights;
1036
904
  }
1037
- else if (contentsOptions.highlights !== undefined) {
1038
- contents.highlights = contentsOptions.highlights;
905
+ else if (contentsOptions.highlightsMaxCharacters) {
906
+ contents.highlights = {
907
+ maxCharacters: contentsOptions.highlightsMaxCharacters,
908
+ };
1039
909
  }
1040
- if (contentsOptions.summaryQuery !== undefined && contentsOptions.summaryQuery !== '') {
1041
- contents.summary = { query: contentsOptions.summaryQuery };
910
+ if (contentsOptions.text) {
911
+ contents.text =
912
+ contentsOptions.textMaxCharacters
913
+ ? {
914
+ maxCharacters: contentsOptions.textMaxCharacters,
915
+ }
916
+ : true;
1042
917
  }
1043
- else if (contentsOptions.summary !== undefined) {
1044
- contents.summary = contentsOptions.summary;
918
+ if (contentsOptions.summary) {
919
+ contents.summary = true;
1045
920
  }
1046
921
  if (contentsOptions.livecrawl !== undefined) {
1047
- contents.livecrawl = contentsOptions.livecrawl;
1048
- }
1049
- if (contentsOptions.livecrawlTimeout !== undefined && contentsOptions.livecrawlTimeout > 0) {
1050
- contents.livecrawlTimeout = contentsOptions.livecrawlTimeout;
1051
- }
1052
- if (contentsOptions.maxAgeHours !== undefined) {
1053
- contents.maxAgeHours = contentsOptions.maxAgeHours;
1054
- }
1055
- if (contentsOptions.subpages !== undefined && contentsOptions.subpages > 0) {
1056
- contents.subpages = contentsOptions.subpages;
1057
- }
1058
- if (contentsOptions.subpageTarget !== undefined && contentsOptions.subpageTarget !== '') {
1059
- contents.subpageTarget = contentsOptions.subpageTarget;
1060
- }
1061
- const extras = {};
1062
- if (contentsOptions.links !== undefined && contentsOptions.links > 0) {
1063
- extras.links = contentsOptions.links;
922
+ contents.livecrawl =
923
+ contentsOptions.livecrawl;
1064
924
  }
1065
- if (contentsOptions.imageLinks !== undefined && contentsOptions.imageLinks > 0) {
1066
- extras.imageLinks = contentsOptions.imageLinks;
925
+ if (contentsOptions.subpages !== undefined &&
926
+ contentsOptions.subpages > 0) {
927
+ contents.subpages =
928
+ contentsOptions.subpages;
1067
929
  }
1068
- if (Object.keys(extras).length > 0) {
1069
- contents.extras = extras;
930
+ if (contentsOptions.imageLinks !== undefined &&
931
+ contentsOptions.imageLinks > 0) {
932
+ contents.extras = {
933
+ imageLinks: contentsOptions.imageLinks,
934
+ };
1070
935
  }
1071
936
  if (Object.keys(contents).length > 0) {
1072
- const resource = this.getNodeParameter('resource', 0);
1073
- if (resource === 'contents') {
1074
- requestOptions.body = {
1075
- ...requestOptions.body,
1076
- ...contents,
1077
- };
1078
- }
1079
- else {
1080
- requestOptions.body = {
1081
- ...requestOptions.body,
1082
- contents,
1083
- };
1084
- }
937
+ requestOptions.body = {
938
+ ...requestOptions.body,
939
+ contents,
940
+ };
1085
941
  }
1086
942
  return requestOptions;
1087
943
  },
@@ -1093,81 +949,41 @@ class Exa {
1093
949
  displayName: 'Highlights',
1094
950
  name: 'highlights',
1095
951
  type: 'boolean',
1096
- default: false,
1097
- description: 'Whether to include highlighted excerpts',
952
+ default: true,
953
+ description: 'Whether to include highlighted excerpts (enabled by default)',
1098
954
  },
1099
955
  {
1100
956
  displayName: 'Highlights Max Characters',
1101
957
  name: 'highlightsMaxCharacters',
1102
958
  type: 'number',
1103
959
  default: 0,
1104
- typeOptions: { minValue: 0 },
1105
- description: 'Maximum characters for highlights (overrides the boolean toggle when > 0)',
1106
- },
1107
- {
1108
- displayName: 'Highlights Query',
1109
- name: 'highlightsQuery',
1110
- type: 'string',
1111
- default: '',
1112
- description: 'Custom query to direct highlight selection',
1113
- },
1114
- {
1115
- displayName: 'Image Links',
1116
- name: 'imageLinks',
1117
- type: 'number',
1118
- default: 0,
1119
960
  typeOptions: {
1120
961
  minValue: 0,
1121
- maxValue: 10,
1122
962
  },
1123
- description: 'Number of image URLs to return per result (0-10)',
963
+ description: 'Maximum character length for highlights (0 for no limit)',
1124
964
  },
1125
965
  {
1126
- displayName: 'Links',
1127
- name: 'links',
966
+ displayName: 'Image Links',
967
+ name: 'imageLinks',
1128
968
  type: 'number',
1129
969
  default: 0,
1130
970
  typeOptions: {
1131
971
  minValue: 0,
1132
972
  maxValue: 10,
1133
973
  },
1134
- description: 'Number of outgoing URLs to return from each webpage (0-10)',
974
+ description: 'Number of image URLs to return per result (0-10)',
1135
975
  },
1136
976
  {
1137
- displayName: 'Livecrawl (Deprecated)',
977
+ displayName: 'Livecrawl',
1138
978
  name: 'livecrawl',
1139
979
  type: 'options',
1140
980
  options: [
1141
981
  { name: 'Always', value: 'always' },
1142
- { name: 'Preferred', value: 'preferred' },
1143
- { name: 'Fallback', value: 'fallback' },
1144
982
  { name: 'Never', value: 'never' },
983
+ { name: 'Fallback', value: 'fallback' },
1145
984
  ],
1146
985
  default: 'fallback',
1147
- description: 'Deprecated: use Max Age Hours instead. Controls when to crawl pages in real-time.',
1148
- },
1149
- {
1150
- displayName: 'Livecrawl Timeout',
1151
- name: 'livecrawlTimeout',
1152
- type: 'number',
1153
- default: 10000,
1154
- typeOptions: { minValue: 1000 },
1155
- description: 'Timeout for livecrawling in milliseconds',
1156
- },
1157
- {
1158
- displayName: 'Max Age Hours',
1159
- name: 'maxAgeHours',
1160
- type: 'number',
1161
- default: 24,
1162
- typeOptions: { minValue: -1 },
1163
- description: 'Max age of cached content in hours. 0 = always livecrawl, -1 = always use cache, 24 = recommended default.',
1164
- },
1165
- {
1166
- displayName: 'Subpage Target',
1167
- name: 'subpageTarget',
1168
- type: 'string',
1169
- default: '',
1170
- description: 'Keyword(s) to find specific subpages (e.g., "sources", "references")',
986
+ description: 'Whether to crawl the page in real-time',
1171
987
  },
1172
988
  {
1173
989
  displayName: 'Subpages',
@@ -1187,34 +1003,22 @@ class Exa {
1187
1003
  default: false,
1188
1004
  description: 'Whether to include an AI-generated summary',
1189
1005
  },
1190
- {
1191
- displayName: 'Summary Query',
1192
- name: 'summaryQuery',
1193
- type: 'string',
1194
- default: '',
1195
- description: 'Custom query for the LLM-generated summary (overrides the boolean toggle)',
1196
- },
1197
1006
  {
1198
1007
  displayName: 'Text',
1199
1008
  name: 'text',
1200
1009
  type: 'boolean',
1201
1010
  default: false,
1202
- description: 'Whether to include cleaned text from the page',
1203
- },
1204
- {
1205
- displayName: 'Text Include HTML Tags',
1206
- name: 'textIncludeHtmlTags',
1207
- type: 'boolean',
1208
- default: false,
1209
- description: 'Whether to include HTML tags in text output for structure understanding',
1011
+ description: 'Whether to include full cleaned text from the page',
1210
1012
  },
1211
1013
  {
1212
1014
  displayName: 'Text Max Characters',
1213
1015
  name: 'textMaxCharacters',
1214
1016
  type: 'number',
1215
1017
  default: 0,
1216
- typeOptions: { minValue: 0 },
1217
- description: 'Maximum characters for text content (0 = no limit, overrides the boolean toggle when > 0)',
1018
+ typeOptions: {
1019
+ minValue: 0,
1020
+ },
1021
+ description: 'Maximum character length for text content (0 for no limit)',
1218
1022
  },
1219
1023
  ],
1220
1024
  },