n8n-nodes-exa-official 0.3.3 → 0.4.0

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.
Files changed (74) hide show
  1. package/README.md +39 -79
  2. package/dist/credentials/ExaApi.credentials.d.ts +1 -1
  3. package/dist/credentials/ExaApi.credentials.js +2 -1
  4. package/dist/credentials/ExaApi.credentials.js.map +1 -1
  5. package/dist/nodes/Exa/Exa.node.d.ts +3 -3
  6. package/dist/nodes/Exa/Exa.node.js +12 -1017
  7. package/dist/nodes/Exa/Exa.node.js.map +1 -1
  8. package/dist/nodes/Exa/Exa.node.json +5 -5
  9. package/dist/nodes/Exa/v1/ExaV1.node.d.ts +5 -0
  10. package/dist/nodes/Exa/v1/ExaV1.node.js +1027 -0
  11. package/dist/nodes/Exa/v1/ExaV1.node.js.map +1 -0
  12. package/dist/nodes/Exa/v2/ExaV2.node.d.ts +6 -0
  13. package/dist/nodes/Exa/v2/ExaV2.node.js +15 -0
  14. package/dist/nodes/Exa/v2/ExaV2.node.js.map +1 -0
  15. package/dist/nodes/Exa/v2/actions/agent/cancel.operation.d.ts +30 -0
  16. package/dist/nodes/Exa/v2/actions/agent/cancel.operation.js +15 -0
  17. package/dist/nodes/Exa/v2/actions/agent/cancel.operation.js.map +1 -0
  18. package/dist/nodes/Exa/v2/actions/agent/common.descriptions.d.ts +2 -0
  19. package/dist/nodes/Exa/v2/actions/agent/common.descriptions.js +13 -0
  20. package/dist/nodes/Exa/v2/actions/agent/common.descriptions.js.map +1 -0
  21. package/dist/nodes/Exa/v2/actions/agent/create.operation.d.ts +30 -0
  22. package/dist/nodes/Exa/v2/actions/agent/create.operation.js +241 -0
  23. package/dist/nodes/Exa/v2/actions/agent/create.operation.js.map +1 -0
  24. package/dist/nodes/Exa/v2/actions/agent/get.operation.d.ts +30 -0
  25. package/dist/nodes/Exa/v2/actions/agent/get.operation.js +15 -0
  26. package/dist/nodes/Exa/v2/actions/agent/get.operation.js.map +1 -0
  27. package/dist/nodes/Exa/v2/actions/agent/getEvents.operation.d.ts +30 -0
  28. package/dist/nodes/Exa/v2/actions/agent/getEvents.operation.js +83 -0
  29. package/dist/nodes/Exa/v2/actions/agent/getEvents.operation.js.map +1 -0
  30. package/dist/nodes/Exa/v2/actions/agent/getMany.operation.d.ts +30 -0
  31. package/dist/nodes/Exa/v2/actions/agent/getMany.operation.js +45 -0
  32. package/dist/nodes/Exa/v2/actions/agent/getMany.operation.js.map +1 -0
  33. package/dist/nodes/Exa/v2/actions/agent/index.d.ts +8 -0
  34. package/dist/nodes/Exa/v2/actions/agent/index.js +94 -0
  35. package/dist/nodes/Exa/v2/actions/agent/index.js.map +1 -0
  36. package/dist/nodes/Exa/v2/actions/answer/get.operation.d.ts +30 -0
  37. package/dist/nodes/Exa/v2/actions/answer/get.operation.js +85 -0
  38. package/dist/nodes/Exa/v2/actions/answer/get.operation.js.map +1 -0
  39. package/dist/nodes/Exa/v2/actions/answer/index.d.ts +4 -0
  40. package/dist/nodes/Exa/v2/actions/answer/index.js +58 -0
  41. package/dist/nodes/Exa/v2/actions/answer/index.js.map +1 -0
  42. package/dist/nodes/Exa/v2/actions/common.descriptions.d.ts +3 -0
  43. package/dist/nodes/Exa/v2/actions/common.descriptions.js +137 -0
  44. package/dist/nodes/Exa/v2/actions/common.descriptions.js.map +1 -0
  45. package/dist/nodes/Exa/v2/actions/contents/get.operation.d.ts +30 -0
  46. package/dist/nodes/Exa/v2/actions/contents/get.operation.js +49 -0
  47. package/dist/nodes/Exa/v2/actions/contents/get.operation.js.map +1 -0
  48. package/dist/nodes/Exa/v2/actions/contents/index.d.ts +4 -0
  49. package/dist/nodes/Exa/v2/actions/contents/index.js +58 -0
  50. package/dist/nodes/Exa/v2/actions/contents/index.js.map +1 -0
  51. package/dist/nodes/Exa/v2/actions/router.d.ts +2 -0
  52. package/dist/nodes/Exa/v2/actions/router.js +81 -0
  53. package/dist/nodes/Exa/v2/actions/router.js.map +1 -0
  54. package/dist/nodes/Exa/v2/actions/search/index.d.ts +4 -0
  55. package/dist/nodes/Exa/v2/actions/search/index.js +58 -0
  56. package/dist/nodes/Exa/v2/actions/search/index.js.map +1 -0
  57. package/dist/nodes/Exa/v2/actions/search/search.operation.d.ts +30 -0
  58. package/dist/nodes/Exa/v2/actions/search/search.operation.js +265 -0
  59. package/dist/nodes/Exa/v2/actions/search/search.operation.js.map +1 -0
  60. package/dist/nodes/Exa/v2/actions/versionDescription.d.ts +2 -0
  61. package/dist/nodes/Exa/v2/actions/versionDescription.js +79 -0
  62. package/dist/nodes/Exa/v2/actions/versionDescription.js.map +1 -0
  63. package/dist/nodes/Exa/v2/helpers/interfaces.d.ts +29 -0
  64. package/dist/nodes/Exa/v2/helpers/interfaces.js +10 -0
  65. package/dist/nodes/Exa/v2/helpers/interfaces.js.map +1 -0
  66. package/dist/nodes/Exa/v2/helpers/utils.d.ts +23 -0
  67. package/dist/nodes/Exa/v2/helpers/utils.js +92 -0
  68. package/dist/nodes/Exa/v2/helpers/utils.js.map +1 -0
  69. package/dist/nodes/Exa/v2/transport/index.d.ts +19 -0
  70. package/dist/nodes/Exa/v2/transport/index.js +180 -0
  71. package/dist/nodes/Exa/v2/transport/index.js.map +1 -0
  72. package/dist/package.json +9 -5
  73. package/dist/tsconfig.tsbuildinfo +1 -1
  74. package/package.json +9 -5
package/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # n8n-nodes-exa-official
2
2
 
3
- This is an n8n community node that provides integration with the Exa API for intelligent web search, async research, and content extraction.
4
-
5
- [Exa](https://exa.ai) is an AI-powered search engine that provides embeddings-based semantic search, deep web research, and structured content extraction.
3
+ An n8n community node for the [Exa](https://exa.ai) API: web search, content extraction, and research agents. This node is usable both as a regular node and as a tool for an n8n AI Agent.
6
4
 
7
5
  [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
8
6
 
@@ -19,28 +17,35 @@ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes
19
17
 
20
18
  ## Operations
21
19
 
22
- This node supports the following Exa API operations:
20
+ ### Search — `POST /search`
21
+
22
+ Semantic web search. Search types: `auto`, `instant`, `fast`, `deep-lite`, `deep`, `deep-reasoning`.
23
+
24
+ Output formats:
25
+
26
+ - **Results** — the ranked list of pages.
27
+ - **Text** — a single written answer synthesised from the results.
28
+ - **Structured (JSON Schema)** — JSON matching a schema you provide.
29
+
30
+ Options include category (`company`, `publication`, `news`, `personal site`, `financial report`, `people`), domain and text filters, published-date ranges, additional queries for the deep types, moderation, a system prompt and user location. Content extraction (text, highlights, summary, links, images, `maxAgeHours`, subpages) is available on every search.
23
31
 
24
- ### Search
25
- - **Search**: Intelligently search the web with neural or keyword-based search
26
- - Supports multiple search types: auto, neural, keyword, fast
27
- - Filter by domain, date, category, and text content
28
- - Extract page contents (text, highlights, summaries)
29
- - Configure livecrawl and subpage crawling
32
+ ### Contents — `POST /contents`
30
33
 
31
- ### Contents
32
- - **Get Contents**: Retrieve cleaned text, highlights, and summaries from a list of URLs
34
+ Fetch cleaned text, highlights, summaries, links and images for a list of URLs. Per-URL statuses are merged onto the results, so pages that failed to crawl arrive as items carrying `status` and `error` instead of silently disappearing.
33
35
 
34
- ### Find Similar
35
- - **Find Similar Links**: Discover pages similar to a given URL
36
+ ### Answer — `POST /answer`
36
37
 
37
- ### Answer
38
- - **Get Answer**: Get an AI-generated answer to a query using Exa's research capabilities
38
+ A grounded answer with citations, optionally as JSON matching a schema, optionally including the full text of each citation.
39
39
 
40
- ### Research
41
- - **Create Research Task**: Launch a long-running research job powered by Exa Research or Research Pro
42
- - **Get Research Task**: Poll a specific research task for status, findings, and generated artifacts
43
- - **List Research Tasks**: Fetch paginated task history for monitoring and auditing
40
+ ### Agent — `/agent/runs`
41
+
42
+ Multi-step research, list building and enrichment.
43
+
44
+ - **Create Run** — start a run, optionally waiting for it to finish by streaming server-sent events or by polling. Supports effort, system prompt, structured output, input rows, metadata, connector data sources and continuation from a previous run.
45
+ - **Get Run** — status and output of a run.
46
+ - **Get Many Runs** — recent runs, with pagination.
47
+ - **Get Run Events** — list a run's events, or hold an SSE connection open and collect them until the run finishes.
48
+ - **Cancel Run** — stop a queued or running run.
44
49
 
45
50
  ## Credentials
46
51
 
@@ -54,65 +59,23 @@ Add the API key to your n8n credentials as "Exa API".
54
59
 
55
60
  ## Compatibility
56
61
 
57
- - Minimum n8n version: 1.0.0
58
- - Tested against n8n version: 1.60.0
62
+ - Requires n8n 1.60.0 or newer, and Node.js 20.15 or newer.
63
+ - Tested against n8n 2.32.
59
64
 
60
65
  ## Usage
61
66
 
62
- ### Basic Search Example
63
-
64
- 1. Add the Exa node to your workflow
65
- 2. Select "Search" as the resource
66
- 3. Enter your search query (e.g., "Latest AI research papers")
67
- 4. Configure search type (auto, neural, keyword, or fast)
68
- 5. Optionally add filters:
69
- - Category (research paper, news, company, etc.)
70
- - Date range (published date)
71
- - Domain filters (include/exclude specific domains)
72
- - Text filters (include/exclude specific text)
73
-
74
- ### Content Extraction
67
+ ### As an AI Agent tool
75
68
 
76
- Enable content extraction options:
77
- - **Text**: Get cleaned page text
78
- - **Highlights**: Get relevant excerpts
79
- - **Summary**: Get AI-generated summaries
80
- - **Livecrawl**: Crawl pages in real-time
81
- - **Subpages**: Crawl linked subpages
69
+ Set the node's connection to an **AI Agent** and it appears as a tool. Any parameter can be filled by the model with `{{ $fromAI('query', 'what to search for', 'string') }}`, which makes Search and Answer useful as web-grounding tools for agents.
82
70
 
83
- ### Advanced Features
71
+ ### Waiting for an agent run
84
72
 
85
- **Date Filtering**: Filter results by publication date
86
- ```
87
- Start Published Date: 2024-01-01
88
- End Published Date: 2024-12-31
89
- ```
90
-
91
- **Domain Control**: Focus on or exclude specific domains
92
- ```
93
- Include Domains: arxiv.org, github.com
94
- Exclude Domains: reddit.com
95
- ```
73
+ **Wait for Completion** holds the workflow until the run reaches a terminal state:
96
74
 
97
- **Category Filtering**: Focus on specific content types
98
- - Company profiles
99
- - Research papers
100
- - News articles
101
- - PDFs
102
- - GitHub repositories
103
- - Twitter/LinkedIn profiles
104
- - Financial reports
75
+ - **Stream** keeps one server-sent events connection open and returns the finished run (optionally with every event that led to it).
76
+ - **Poll** re-requests the run on an interval.
105
77
 
106
- ### Research Workflow Example
107
-
108
- 1. Add an Exa node and set **Resource** to `Research` with the **Create Research Task** operation.
109
- 2. Provide a clear research instruction (for example, "Compare emerging open-source RAG frameworks and summarize trade-offs").
110
- 3. Choose the Research product tier (`exa-research` or `exa-research-pro`) and optional guardrails like domain/category allowlists.
111
- 4. Store the returned `id` or use paired nodes (Set/Code) to persist it inside the workflow.
112
- 5. Add another Exa node in the same workflow set to **Get Research Task** and reference the saved `id` to poll results until the status becomes `completed`.
113
- 6. Inspect the response for `insights`, `sources`, `outline`, or generated assets, then continue your workflow (e.g., send a Slack summary or populate a database).
114
-
115
- For bulk monitoring, use **List Research Tasks** and apply parameters for pagination, status filtering, or creation date ranges.
78
+ For long runs, turn **Wait for Completion** off, store the returned `id`, and follow the run later with **Get Run** — the run keeps going server-side.
116
79
 
117
80
  ## Resources
118
81
 
@@ -130,15 +93,12 @@ npm install
130
93
 
131
94
  # Build the node
132
95
  npm run build
96
+ npm run lint
133
97
 
134
- # Link for local testing
135
- npm link
136
-
137
- # In your n8n installation directory
138
- cd ~/.n8n/custom
139
- npm link n8n-nodes-exa-official
140
-
141
- # Start n8n
98
+ # Install the node in your n8n instance
99
+ mkdir -p ~/.n8n/custom && cd ~/.n8n/custom
100
+ npm init -y
101
+ npm install /path/to/n8n-integration
142
102
  n8n start
143
103
  ```
144
104
 
@@ -1,4 +1,4 @@
1
- import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
2
  export declare class ExaApi implements ICredentialType {
3
3
  name: string;
4
4
  displayName: string;
@@ -5,7 +5,7 @@ class ExaApi {
5
5
  constructor() {
6
6
  this.name = 'exaApi';
7
7
  this.displayName = 'Exa API';
8
- this.documentationUrl = 'https://docs.exa.ai/reference/getting-started';
8
+ this.documentationUrl = 'https://exa.ai/docs/reference/getting-started';
9
9
  this.properties = [
10
10
  {
11
11
  displayName: 'API Key',
@@ -34,6 +34,7 @@ class ExaApi {
34
34
  url: '/search',
35
35
  body: {
36
36
  query: 'n8n credential verification',
37
+ type: 'instant',
37
38
  numResults: 1,
38
39
  },
39
40
  },
@@ -1 +1 @@
1
- {"version":3,"file":"ExaApi.credentials.js","sourceRoot":"","sources":["../../credentials/ExaApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,MAAM;IAAnB;QACC,SAAI,GAAG,QAAQ,CAAC;QAChB,gBAAW,GAAG,SAAS,CAAC;QACxB,qBAAgB,GAAG,+CAA+C,CAAC;QACnE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,gEAAgE;aAC7E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,WAAW,EAAE,0BAA0B;iBACvC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,oBAAoB;gBAC7B,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,SAAS;gBACd,IAAI,EAAE;oBACL,KAAK,EAAE,6BAA6B;oBACpC,UAAU,EAAE,CAAC;iBACb;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAtCD,wBAsCC"}
1
+ {"version":3,"file":"ExaApi.credentials.js","sourceRoot":"","sources":["../../credentials/ExaApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,MAAM;IAAnB;QACC,SAAI,GAAG,QAAQ,CAAC;QAChB,gBAAW,GAAG,SAAS,CAAC;QACxB,qBAAgB,GAAG,+CAA+C,CAAC;QACnE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,gEAAgE;aAC7E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,WAAW,EAAE,0BAA0B;iBACvC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,oBAAoB;gBAC7B,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,SAAS;gBACd,IAAI,EAAE;oBACL,KAAK,EAAE,6BAA6B;oBACpC,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,CAAC;iBACb;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAvCD,wBAuCC"}
@@ -1,4 +1,4 @@
1
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
2
- export declare class Exa implements INodeType {
3
- description: INodeTypeDescription;
1
+ import { VersionedNodeType } from 'n8n-workflow';
2
+ export declare class Exa extends VersionedNodeType {
3
+ constructor();
4
4
  }