n8n-nodes-sarvcrawl 1.0.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.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 SARV WEBS PRIVATE LIMITED
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,109 @@
1
+ <div align="center">
2
+
3
+ # n8n-nodes-sarvcrawl
4
+
5
+ **Crawl the web and search your own knowledge bases, from an n8n workflow.**
6
+
7
+ An [n8n](https://n8n.io) community node for [SarvCrawl](https://crawl.sarv.com) —
8
+ scrape a page, crawl a site, then query it by keyword or by meaning, with no code
9
+ in between.
10
+
11
+ [![npm](https://img.shields.io/npm/v/n8n-nodes-sarvcrawl.svg?logo=npm&logoColor=white)](https://www.npmjs.com/package/n8n-nodes-sarvcrawl)
12
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
13
+ [![n8n](https://img.shields.io/badge/n8n-community%20node-EA4B71.svg)](https://docs.n8n.io/integrations/community-nodes/)
14
+
15
+ [Install](#-install) · [Credentials](#-credentials) · [Operations](#-operations) · [Example](#-example)
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## 📦 Install
22
+
23
+ **In n8n (self-hosted):** Settings → **Community Nodes** → **Install**, then
24
+ enter:
25
+
26
+ ```
27
+ n8n-nodes-sarvcrawl
28
+ ```
29
+
30
+ **Manually:**
31
+
32
+ ```bash
33
+ npm install n8n-nodes-sarvcrawl
34
+ ```
35
+
36
+ Restart n8n, and **SarvCrawl** appears in the node panel.
37
+
38
+ > [!NOTE]
39
+ > Community nodes run on self-hosted n8n. On n8n Cloud they are available on
40
+ > plans that permit them — check your plan before installing.
41
+
42
+ ---
43
+
44
+ ## 🔑 Credentials
45
+
46
+ Create a **SarvCrawl API** credential:
47
+
48
+ | Field | Value |
49
+ |---|---|
50
+ | **API Key** | Your key from [crawl.sarv.com](https://crawl.sarv.com) — 1 billion free tokens on sign-up, no card |
51
+ | **Base URL** | `https://crawl.sarv.com` — the default; set your own host to self-host |
52
+
53
+ > [!IMPORTANT]
54
+ > Base URL is the **origin**, not the API prefix. The REST API lives at `/api/…`
55
+ > and the node adds that itself, so a value ending in `/api` makes every call
56
+ > 404.
57
+
58
+ ---
59
+
60
+ ## 🧰 Operations
61
+
62
+ Three resources, thirteen operations.
63
+
64
+ | Resource | Operations |
65
+ |---|---|
66
+ | **Knowledge Base** | Create · Get · Get All · Delete |
67
+ | **Job** | Scrape URL · Crawl Website · Get Status · Get All Jobs · Cancel |
68
+ | **Search** | Search (BM25 keyword) · Semantic Search (hybrid embedding + BM25) |
69
+
70
+ **Semantic Search** is what you want for questions phrased in natural language;
71
+ **Search** for exact terms, identifiers and error codes.
72
+
73
+ Crawl takes the bounds you would expect — max depth, page limit and a path
74
+ exclude list — so a run cannot wander off across a whole domain.
75
+
76
+ ---
77
+
78
+ ## 🔁 Example
79
+
80
+ A workflow that keeps a knowledge base current and answers questions from it:
81
+
82
+ ```
83
+ Schedule Trigger (daily)
84
+ → SarvCrawl: Job → Crawl Website (kb_id, url, max depth 2, limit 50)
85
+ → Wait (crawling is asynchronous)
86
+ → SarvCrawl: Job → Get Status (poll until completed)
87
+ → SarvCrawl: Search → Semantic Search (your question)
88
+ → Slack / Email / AI Agent
89
+ ```
90
+
91
+ Ingest is asynchronous: **Scrape URL** and **Crawl Website** return a job id
92
+ immediately, so poll **Get Status** before you search. Search operations return
93
+ straight away.
94
+
95
+ ---
96
+
97
+ ## 📄 License
98
+
99
+ Apache-2.0. The full text ships in the package as `LICENSE`, and is also at
100
+ [apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0).
101
+
102
+ <div align="center">
103
+
104
+ **[Docs](https://crawl.sarv.com/docs/n8n)** ·
105
+ **[SarvCrawl](https://crawl.sarv.com)** ·
106
+ **[Node SDK](https://www.npmjs.com/package/sarvcrawl)** ·
107
+ **[MCP server](https://www.npmjs.com/package/sarvcrawl-mcp)**
108
+
109
+ </div>
@@ -0,0 +1,10 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class SarvcrawlApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
10
+ //# sourceMappingURL=SarvcrawlApi.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SarvcrawlApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/SarvcrawlApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,MAAM,cAAc,CAAC;AAEtB,qBAAa,YAAa,YAAW,eAAe;IACnD,IAAI,SAAkB;IACtB,WAAW,SAAmB;IAC9B,gBAAgB,SAAM;IACtB,UAAU,EAAE,eAAe,EAAE,CAiB3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;IAEF,IAAI,EAAE,sBAAsB,CAK1B;CACF"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SarvcrawlApi = void 0;
4
+ class SarvcrawlApi {
5
+ constructor() {
6
+ this.name = 'sarvcrawlApi';
7
+ this.displayName = 'SarvCrawl API';
8
+ this.documentationUrl = '';
9
+ this.properties = [
10
+ {
11
+ displayName: 'API Key',
12
+ name: 'apiKey',
13
+ type: 'string',
14
+ typeOptions: { password: true },
15
+ default: '',
16
+ required: true,
17
+ },
18
+ {
19
+ displayName: 'Base URL',
20
+ name: 'baseUrl',
21
+ type: 'string',
22
+ default: 'https://crawl.sarv.com',
23
+ required: true,
24
+ description: 'The URL where your SarvCrawl backend is running',
25
+ },
26
+ ];
27
+ this.authenticate = {
28
+ type: 'generic',
29
+ properties: {
30
+ headers: {
31
+ 'x-api-key': '={{$credentials.apiKey}}',
32
+ },
33
+ },
34
+ };
35
+ this.test = {
36
+ request: {
37
+ baseURL: '={{$credentials.baseUrl}}',
38
+ url: '/auth/me',
39
+ },
40
+ };
41
+ }
42
+ }
43
+ exports.SarvcrawlApi = SarvcrawlApi;
44
+ //# sourceMappingURL=SarvcrawlApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SarvcrawlApi.credentials.js","sourceRoot":"","sources":["../../credentials/SarvcrawlApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QACtB,gBAAW,GAAG,eAAe,CAAC;QAC9B,qBAAgB,GAAG,EAAE,CAAC;QACtB,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,wBAAwB;gBACjC,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,iDAAiD;aAC9D;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,2BAA2B;gBACpC,GAAG,EAAE,UAAU;aACf;SACD,CAAC;IACH,CAAC;CAAA;AAtCD,oCAsCC"}
@@ -0,0 +1,3 @@
1
+ export { Sarvcrawl } from './nodes/Sarvcrawl/Sarvcrawl.node';
2
+ export { SarvcrawlApi } from './credentials/SarvcrawlApi.credentials';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SarvcrawlApi = exports.Sarvcrawl = void 0;
4
+ var Sarvcrawl_node_1 = require("./nodes/Sarvcrawl/Sarvcrawl.node");
5
+ Object.defineProperty(exports, "Sarvcrawl", { enumerable: true, get: function () { return Sarvcrawl_node_1.Sarvcrawl; } });
6
+ var SarvcrawlApi_credentials_1 = require("./credentials/SarvcrawlApi.credentials");
7
+ Object.defineProperty(exports, "SarvcrawlApi", { enumerable: true, get: function () { return SarvcrawlApi_credentials_1.SarvcrawlApi; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,mEAA6D;AAApD,2GAAA,SAAS,OAAA;AAClB,mFAAsE;AAA7D,wHAAA,YAAY,OAAA"}
@@ -0,0 +1,6 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Sarvcrawl implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
6
+ //# sourceMappingURL=Sarvcrawl.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sarvcrawl.node.d.ts","sourceRoot":"","sources":["../../../nodes/Sarvcrawl/Sarvcrawl.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAGpB,MAAM,cAAc,CAAC;AAEtB,qBAAa,SAAU,YAAW,SAAS;IAC1C,WAAW,EAAE,oBAAoB,CA2O/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA+IvE"}
@@ -0,0 +1,376 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Sarvcrawl = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ class Sarvcrawl {
6
+ constructor() {
7
+ this.description = {
8
+ displayName: 'SarvCrawl',
9
+ name: 'sarvcrawl',
10
+ icon: 'file:sarvcrawl.svg',
11
+ group: ['transform'],
12
+ version: 1,
13
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
14
+ description: 'Interact with SarvCrawl — manage knowledge bases, scrape URLs, crawl sites, upload documents and search',
15
+ defaults: {
16
+ name: 'SarvCrawl',
17
+ },
18
+ inputs: ['main'],
19
+ outputs: ['main'],
20
+ credentials: [
21
+ {
22
+ name: 'sarvcrawlApi',
23
+ required: true,
24
+ },
25
+ ],
26
+ properties: [
27
+ // ── Resource selector ──────────────────────────────────────────────
28
+ {
29
+ displayName: 'Resource',
30
+ name: 'resource',
31
+ type: 'options',
32
+ noDataExpression: true,
33
+ options: [
34
+ { name: 'Knowledge Base', value: 'knowledgeBase' },
35
+ { name: 'Job', value: 'job' },
36
+ { name: 'Search', value: 'search' },
37
+ ],
38
+ default: 'knowledgeBase',
39
+ },
40
+ // ══════════════════════════════════════════════════════════════════
41
+ // KNOWLEDGE BASE operations
42
+ // ══════════════════════════════════════════════════════════════════
43
+ {
44
+ displayName: 'Operation',
45
+ name: 'operation',
46
+ type: 'options',
47
+ noDataExpression: true,
48
+ displayOptions: { show: { resource: ['knowledgeBase'] } },
49
+ options: [
50
+ { name: 'Create', value: 'create', description: 'Create a new knowledge base', action: 'Create a knowledge base' },
51
+ { name: 'Delete', value: 'delete', description: 'Delete a knowledge base', action: 'Delete a knowledge base' },
52
+ { name: 'Get', value: 'get', description: 'Get a single knowledge base by ID', action: 'Get a knowledge base' },
53
+ { name: 'Get All', value: 'getAll', description: 'List all knowledge bases', action: 'Get all knowledge bases' },
54
+ ],
55
+ default: 'getAll',
56
+ },
57
+ // Create KB fields
58
+ {
59
+ displayName: 'Name',
60
+ name: 'name',
61
+ type: 'string',
62
+ default: '',
63
+ required: true,
64
+ displayOptions: { show: { resource: ['knowledgeBase'], operation: ['create'] } },
65
+ description: 'Name of the knowledge base',
66
+ },
67
+ {
68
+ displayName: 'Description',
69
+ name: 'description',
70
+ type: 'string',
71
+ default: '',
72
+ displayOptions: { show: { resource: ['knowledgeBase'], operation: ['create'] } },
73
+ description: 'Optional description',
74
+ },
75
+ // KB ID field (shared by get, delete)
76
+ {
77
+ displayName: 'Knowledge Base ID',
78
+ name: 'kbId',
79
+ type: 'string',
80
+ default: '',
81
+ required: true,
82
+ displayOptions: { show: { resource: ['knowledgeBase'], operation: ['get', 'delete'] } },
83
+ },
84
+ // ══════════════════════════════════════════════════════════════════
85
+ // JOB operations
86
+ // ══════════════════════════════════════════════════════════════════
87
+ {
88
+ displayName: 'Operation',
89
+ name: 'operation',
90
+ type: 'options',
91
+ noDataExpression: true,
92
+ displayOptions: { show: { resource: ['job'] } },
93
+ options: [
94
+ { name: 'Scrape URL', value: 'scrape', description: 'Scrape a single URL into a knowledge base', action: 'Scrape a URL' },
95
+ { name: 'Crawl Website', value: 'crawl', description: 'Crawl an entire website into a knowledge base', action: 'Crawl a website' },
96
+ { name: 'Get Status', value: 'getStatus', description: 'Get the status of a job by ID', action: 'Get job status' },
97
+ { name: 'Get All Jobs', value: 'getAllJobs', description: 'List all jobs for a knowledge base', action: 'Get all jobs' },
98
+ { name: 'Cancel', value: 'cancel', description: 'Cancel a running job', action: 'Cancel a job' },
99
+ ],
100
+ default: 'scrape',
101
+ },
102
+ // Shared KB ID for job operations
103
+ {
104
+ displayName: 'Knowledge Base ID',
105
+ name: 'kbId',
106
+ type: 'string',
107
+ default: '',
108
+ required: true,
109
+ displayOptions: { show: { resource: ['job'], operation: ['scrape', 'crawl', 'getAllJobs'] } },
110
+ },
111
+ // Job ID field
112
+ {
113
+ displayName: 'Job ID',
114
+ name: 'jobId',
115
+ type: 'string',
116
+ default: '',
117
+ required: true,
118
+ displayOptions: { show: { resource: ['job'], operation: ['getStatus', 'cancel'] } },
119
+ },
120
+ // Scrape fields
121
+ {
122
+ displayName: 'URL',
123
+ name: 'url',
124
+ type: 'string',
125
+ default: '',
126
+ required: true,
127
+ displayOptions: { show: { resource: ['job'], operation: ['scrape'] } },
128
+ description: 'The URL to scrape',
129
+ },
130
+ {
131
+ displayName: 'Include Linked Documents',
132
+ name: 'includeDocs',
133
+ type: 'boolean',
134
+ default: true,
135
+ displayOptions: { show: { resource: ['job'], operation: ['scrape'] } },
136
+ description: 'Whether to also scrape linked PDF/DOCX files found on the page',
137
+ },
138
+ // Crawl fields
139
+ {
140
+ displayName: 'URL',
141
+ name: 'url',
142
+ type: 'string',
143
+ default: '',
144
+ required: true,
145
+ displayOptions: { show: { resource: ['job'], operation: ['crawl'] } },
146
+ description: 'The starting URL to crawl from',
147
+ },
148
+ {
149
+ displayName: 'Max Depth',
150
+ name: 'maxDepth',
151
+ type: 'number',
152
+ default: 5,
153
+ displayOptions: { show: { resource: ['job'], operation: ['crawl'] } },
154
+ description: 'How many levels deep to crawl',
155
+ },
156
+ {
157
+ displayName: 'Page Limit',
158
+ name: 'limit',
159
+ type: 'number',
160
+ default: 500,
161
+ displayOptions: { show: { resource: ['job'], operation: ['crawl'] } },
162
+ description: 'Maximum number of pages to crawl',
163
+ },
164
+ {
165
+ displayName: 'Include Linked Documents',
166
+ name: 'includeDocs',
167
+ type: 'boolean',
168
+ default: true,
169
+ displayOptions: { show: { resource: ['job'], operation: ['crawl'] } },
170
+ description: 'Whether to also scrape linked PDF/DOCX files found during crawl',
171
+ },
172
+ // ══════════════════════════════════════════════════════════════════
173
+ // SEARCH operations
174
+ // ══════════════════════════════════════════════════════════════════
175
+ {
176
+ displayName: 'Operation',
177
+ name: 'operation',
178
+ type: 'options',
179
+ noDataExpression: true,
180
+ displayOptions: { show: { resource: ['search'] } },
181
+ options: [
182
+ { name: 'Search', value: 'search', description: 'Keyword (full-text) search within a knowledge base', action: 'Search a knowledge base' },
183
+ { name: 'Semantic Search', value: 'semanticSearch', description: 'Semantic (hybrid embedding + BM25) search within a knowledge base', action: 'Semantic search a knowledge base' },
184
+ ],
185
+ default: 'search',
186
+ },
187
+ {
188
+ displayName: 'Knowledge Base ID',
189
+ name: 'kbId',
190
+ type: 'string',
191
+ default: '',
192
+ required: true,
193
+ displayOptions: { show: { resource: ['search'] } },
194
+ },
195
+ {
196
+ displayName: 'Query',
197
+ name: 'query',
198
+ type: 'string',
199
+ default: '',
200
+ required: true,
201
+ displayOptions: { show: { resource: ['search'] } },
202
+ description: 'The search query',
203
+ },
204
+ {
205
+ displayName: 'Results Per Page',
206
+ name: 'size',
207
+ type: 'number',
208
+ default: 10,
209
+ displayOptions: { show: { resource: ['search'] } },
210
+ },
211
+ {
212
+ displayName: 'Page',
213
+ name: 'page',
214
+ type: 'number',
215
+ default: 1,
216
+ displayOptions: { show: { resource: ['search'], operation: ['search'] } },
217
+ },
218
+ {
219
+ displayName: 'Filter by Type',
220
+ name: 'filterType',
221
+ type: 'options',
222
+ default: '',
223
+ displayOptions: { show: { resource: ['search'] } },
224
+ options: [
225
+ { name: 'All', value: '' },
226
+ { name: 'Scrape', value: 'scrape' },
227
+ { name: 'Crawl', value: 'crawl' },
228
+ { name: 'Upload', value: 'upload' },
229
+ { name: 'Search', value: 'search' },
230
+ ],
231
+ },
232
+ ],
233
+ };
234
+ }
235
+ async execute() {
236
+ const items = this.getInputData();
237
+ const returnData = [];
238
+ const credentials = await this.getCredentials('sarvcrawlApi');
239
+ const baseUrl = credentials.baseUrl.replace(/\/$/, '');
240
+ for (let i = 0; i < items.length; i++) {
241
+ const resource = this.getNodeParameter('resource', i);
242
+ const operation = this.getNodeParameter('operation', i);
243
+ let responseData;
244
+ try {
245
+ // ── KNOWLEDGE BASE ─────────────────────────────────────────────
246
+ if (resource === 'knowledgeBase') {
247
+ if (operation === 'getAll') {
248
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
249
+ method: 'GET',
250
+ url: `${baseUrl}/api/kb`,
251
+ });
252
+ }
253
+ else if (operation === 'get') {
254
+ const kbId = this.getNodeParameter('kbId', i);
255
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
256
+ method: 'GET',
257
+ url: `${baseUrl}/api/kb/${kbId}`,
258
+ });
259
+ }
260
+ else if (operation === 'create') {
261
+ const name = this.getNodeParameter('name', i);
262
+ const description = this.getNodeParameter('description', i);
263
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
264
+ method: 'POST',
265
+ url: `${baseUrl}/api/kb`,
266
+ body: { name, description },
267
+ json: true,
268
+ });
269
+ }
270
+ else if (operation === 'delete') {
271
+ const kbId = this.getNodeParameter('kbId', i);
272
+ await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
273
+ method: 'DELETE',
274
+ url: `${baseUrl}/api/kb/${kbId}`,
275
+ });
276
+ responseData = { success: true, id: kbId };
277
+ }
278
+ // ── JOB ────────────────────────────────────────────────────────
279
+ }
280
+ else if (resource === 'job') {
281
+ if (operation === 'scrape') {
282
+ const kbId = this.getNodeParameter('kbId', i);
283
+ const url = this.getNodeParameter('url', i);
284
+ const includeDocs = this.getNodeParameter('includeDocs', i);
285
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
286
+ method: 'POST',
287
+ url: `${baseUrl}/api/jobs/scrape`,
288
+ body: { kb_id: kbId, url, include_docs: includeDocs, formats: ['markdown', 'json'] },
289
+ json: true,
290
+ });
291
+ }
292
+ else if (operation === 'crawl') {
293
+ const kbId = this.getNodeParameter('kbId', i);
294
+ const url = this.getNodeParameter('url', i);
295
+ const maxDepth = this.getNodeParameter('maxDepth', i);
296
+ const limit = this.getNodeParameter('limit', i);
297
+ const includeDocs = this.getNodeParameter('includeDocs', i);
298
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
299
+ method: 'POST',
300
+ url: `${baseUrl}/api/jobs/crawl`,
301
+ body: { kb_id: kbId, url, max_depth: maxDepth, limit, include_docs: includeDocs, formats: ['markdown', 'json'] },
302
+ json: true,
303
+ });
304
+ }
305
+ else if (operation === 'getStatus') {
306
+ const jobId = this.getNodeParameter('jobId', i);
307
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
308
+ method: 'GET',
309
+ url: `${baseUrl}/api/jobs/${jobId}`,
310
+ });
311
+ }
312
+ else if (operation === 'getAllJobs') {
313
+ const kbId = this.getNodeParameter('kbId', i);
314
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
315
+ method: 'GET',
316
+ url: `${baseUrl}/api/jobs?kb_id=${kbId}`,
317
+ });
318
+ }
319
+ else if (operation === 'cancel') {
320
+ const jobId = this.getNodeParameter('jobId', i);
321
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
322
+ method: 'DELETE',
323
+ url: `${baseUrl}/api/jobs/${jobId}/cancel`,
324
+ });
325
+ }
326
+ // ── SEARCH ─────────────────────────────────────────────────────
327
+ }
328
+ else if (resource === 'search') {
329
+ const kbId = this.getNodeParameter('kbId', i);
330
+ const query = this.getNodeParameter('query', i);
331
+ const size = this.getNodeParameter('size', i);
332
+ const filterType = this.getNodeParameter('filterType', i);
333
+ if (operation === 'semanticSearch') {
334
+ // Hybrid semantic search over chunk embeddings — not paginated (no page param).
335
+ let embedUrl = `${baseUrl}/api/kb/${kbId}/search/embed?q=${encodeURIComponent(query)}&size=${size}`;
336
+ if (filterType)
337
+ embedUrl += `&type=${filterType}`;
338
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
339
+ method: 'GET',
340
+ url: embedUrl,
341
+ });
342
+ }
343
+ else {
344
+ const page = this.getNodeParameter('page', i);
345
+ let searchUrl = `${baseUrl}/api/kb/${kbId}/search?q=${encodeURIComponent(query)}&size=${size}&page=${page}`;
346
+ if (filterType)
347
+ searchUrl += `&type=${filterType}`;
348
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'sarvcrawlApi', {
349
+ method: 'GET',
350
+ url: searchUrl,
351
+ });
352
+ }
353
+ }
354
+ }
355
+ catch (error) {
356
+ if (this.continueOnFail()) {
357
+ returnData.push({ json: { error: error.message }, pairedItem: i });
358
+ continue;
359
+ }
360
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
361
+ }
362
+ // Normalise: arrays become multiple output items, objects become one
363
+ if (Array.isArray(responseData)) {
364
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
365
+ returnData.push(...responseData.map((item) => ({ json: item, pairedItem: i })));
366
+ }
367
+ else {
368
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
369
+ returnData.push({ json: responseData, pairedItem: i });
370
+ }
371
+ }
372
+ return [returnData];
373
+ }
374
+ }
375
+ exports.Sarvcrawl = Sarvcrawl;
376
+ //# sourceMappingURL=Sarvcrawl.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sarvcrawl.node.js","sourceRoot":"","sources":["../../../nodes/Sarvcrawl/Sarvcrawl.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,MAAa,SAAS;IAAtB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,yGAAyG;YACtH,QAAQ,EAAE;gBACT,IAAI,EAAE,WAAW;aACjB;YACD,MAAM,EAAE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CAAC;gBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;YAChF,CAAC;YAED,qEAAqE;YACrE,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;gBACjC,8DAA8D;gBAC9D,UAAU,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACtF,CAAC;iBAAM,CAAC;gBACP,8DAA8D;gBAC9D,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAmB,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;YAC/D,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AA7XD,8BA6XC"}
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" fill="none">
2
+ <rect width="60" height="60" rx="12" fill="#E56910"/>
3
+ <text x="30" y="40" font-family="Arial" font-size="28" font-weight="bold" fill="white" text-anchor="middle">KB</text>
4
+ </svg>
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "n8n-nodes-sarvcrawl",
3
+ "version": "1.0.0",
4
+ "description": "n8n community node for SarvCrawl \u2014 crawl sites, parse documents, and run keyword or hybrid semantic search over your knowledge bases",
5
+ "keywords": [
6
+ "n8n-community-node-package",
7
+ "n8n",
8
+ "sarvcrawl",
9
+ "knowledge-base",
10
+ "rag",
11
+ "scrape",
12
+ "crawl",
13
+ "semantic-search"
14
+ ],
15
+ "license": "Apache-2.0",
16
+ "homepage": "https://crawl.sarv.com/docs/n8n",
17
+ "author": {
18
+ "name": "Sarv Webs Pvt. Ltd."
19
+ },
20
+ "main": "dist/index.js",
21
+ "scripts": {
22
+ "build": "tsc && cp nodes/Sarvcrawl/sarvcrawl.svg dist/nodes/Sarvcrawl/sarvcrawl.svg",
23
+ "dev": "tsc --watch",
24
+ "prepack": "npm run build"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "n8n": {
30
+ "n8nNodesApiVersion": 1,
31
+ "credentials": [
32
+ "dist/credentials/SarvcrawlApi.credentials.js"
33
+ ],
34
+ "nodes": [
35
+ "dist/nodes/Sarvcrawl/Sarvcrawl.node.js"
36
+ ]
37
+ },
38
+ "devDependencies": {
39
+ "@types/node": "^18.0.0",
40
+ "n8n-workflow": "^1.0.0",
41
+ "typescript": "^5.0.0"
42
+ },
43
+ "peerDependencies": {
44
+ "n8n-workflow": "*"
45
+ },
46
+ "bugs": {
47
+ "url": "https://crawl.sarv.com/docs/n8n"
48
+ }
49
+ }