@mendable/n8n-nodes-firecrawl 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.
Files changed (59) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +85 -0
  3. package/dist/credentials/FirecrawlApi.credentials.d.ts +8 -0
  4. package/dist/credentials/FirecrawlApi.credentials.js +37 -0
  5. package/dist/credentials/FirecrawlApi.credentials.js.map +1 -0
  6. package/dist/nodes/Firecrawl/Firecrawl.node.d.ts +21 -0
  7. package/dist/nodes/Firecrawl/Firecrawl.node.js +40 -0
  8. package/dist/nodes/Firecrawl/Firecrawl.node.js.map +1 -0
  9. package/dist/nodes/Firecrawl/Firecrawl.node.json +18 -0
  10. package/dist/nodes/Firecrawl/api/common.d.ts +11 -0
  11. package/dist/nodes/Firecrawl/api/common.js +595 -0
  12. package/dist/nodes/Firecrawl/api/common.js.map +1 -0
  13. package/dist/nodes/Firecrawl/api/crawl/index.d.ts +6 -0
  14. package/dist/nodes/Firecrawl/api/crawl/index.js +249 -0
  15. package/dist/nodes/Firecrawl/api/crawl/index.js.map +1 -0
  16. package/dist/nodes/Firecrawl/api/extract/index.d.ts +4 -0
  17. package/dist/nodes/Firecrawl/api/extract/index.js +219 -0
  18. package/dist/nodes/Firecrawl/api/extract/index.js.map +1 -0
  19. package/dist/nodes/Firecrawl/api/getCrawlStatus/index.d.ts +6 -0
  20. package/dist/nodes/Firecrawl/api/getCrawlStatus/index.js +57 -0
  21. package/dist/nodes/Firecrawl/api/getCrawlStatus/index.js.map +1 -0
  22. package/dist/nodes/Firecrawl/api/getExtractStatus/index.d.ts +4 -0
  23. package/dist/nodes/Firecrawl/api/getExtractStatus/index.js +54 -0
  24. package/dist/nodes/Firecrawl/api/getExtractStatus/index.js.map +1 -0
  25. package/dist/nodes/Firecrawl/api/index.d.ts +24 -0
  26. package/dist/nodes/Firecrawl/api/index.js +74 -0
  27. package/dist/nodes/Firecrawl/api/index.js.map +1 -0
  28. package/dist/nodes/Firecrawl/api/map/index.d.ts +6 -0
  29. package/dist/nodes/Firecrawl/api/map/index.js +151 -0
  30. package/dist/nodes/Firecrawl/api/map/index.js.map +1 -0
  31. package/dist/nodes/Firecrawl/api/scrape/index.d.ts +6 -0
  32. package/dist/nodes/Firecrawl/api/scrape/index.js +18 -0
  33. package/dist/nodes/Firecrawl/api/scrape/index.js.map +1 -0
  34. package/dist/nodes/Firecrawl/firecrawl.svg +31 -0
  35. package/dist/nodes/Firecrawl/helpers/http/requestModifiers.d.ts +2 -0
  36. package/dist/nodes/Firecrawl/helpers/http/requestModifiers.js +16 -0
  37. package/dist/nodes/Firecrawl/helpers/http/requestModifiers.js.map +1 -0
  38. package/dist/nodes/Firecrawl/helpers/http/responseHandlers.d.ts +7 -0
  39. package/dist/nodes/Firecrawl/helpers/http/responseHandlers.js +57 -0
  40. package/dist/nodes/Firecrawl/helpers/http/responseHandlers.js.map +1 -0
  41. package/dist/nodes/Firecrawl/helpers/index.d.ts +7 -0
  42. package/dist/nodes/Firecrawl/helpers/index.js +33 -0
  43. package/dist/nodes/Firecrawl/helpers/index.js.map +1 -0
  44. package/dist/nodes/Firecrawl/helpers/types.d.ts +18 -0
  45. package/dist/nodes/Firecrawl/helpers/types.js +3 -0
  46. package/dist/nodes/Firecrawl/helpers/types.js.map +1 -0
  47. package/dist/nodes/Firecrawl/helpers/utils/propertyBuilders.d.ts +5 -0
  48. package/dist/nodes/Firecrawl/helpers/utils/propertyBuilders.js +27 -0
  49. package/dist/nodes/Firecrawl/helpers/utils/propertyBuilders.js.map +1 -0
  50. package/dist/nodes/Firecrawl/methods.d.ts +17 -0
  51. package/dist/nodes/Firecrawl/methods.js +10 -0
  52. package/dist/nodes/Firecrawl/methods.js.map +1 -0
  53. package/dist/nodes/Firecrawl/properties.d.ts +5 -0
  54. package/dist/nodes/Firecrawl/properties.js +196 -0
  55. package/dist/nodes/Firecrawl/properties.js.map +1 -0
  56. package/dist/package.json +53 -0
  57. package/dist/tsconfig.tsbuildinfo +1 -0
  58. package/index.js +0 -0
  59. package/package.json +53 -0
package/LICENSE.md ADDED
@@ -0,0 +1,19 @@
1
+ Copyright 2022 n8n
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # n8n-nodes-firecrawl 🔥
2
+
3
+ This is an n8n community node. It lets you use **[Firecrawl](https://firecrawl.dev)** in your n8n workflows.
4
+
5
+ > 🔥 Turn entire websites into LLM-ready markdown or structured data. Scrape, crawl and extract with a single API.
6
+
7
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
8
+
9
+ [Installation](#installation)
10
+ [Operations](#operations)
11
+ [Credentials](#credentials)
12
+ [Compatibility](#compatibility)
13
+ [Resources](#resources)
14
+ [Version history](#version-history)
15
+
16
+ ## Installation
17
+
18
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
19
+
20
+ ## Operations
21
+
22
+ The **Firecrawl** node supports the following operations:
23
+
24
+ ### Map
25
+ - Input a website and get all the website urls
26
+
27
+ ### Scrape
28
+ - Scrapes a URL and get its content in LLM-ready format (markdown, structured data via LLM Extract, screenshot, html)
29
+
30
+ ### Crawl
31
+ - Scrapes all the URLs of a web page and return content in LLM-ready format
32
+
33
+ ### Get Crawl Status
34
+ - Check the current status of a crawl job
35
+
36
+ ### Extract Data
37
+ - Get structured data from single page, multiple pages or entire websites with AI
38
+
39
+ ### Get Extract Status
40
+ - Get the current status of an extraction job
41
+
42
+ ## Credentials
43
+
44
+ To use the Firecrawl node, you need to:
45
+
46
+ 1. Sign up for a Firecrawl account at [https://firecrawl.dev](https://firecrawl.dev)
47
+ 2. Get your API key from the Firecrawl dashboard
48
+ 3. In n8n, add your Firecrawl API key to the node's credentials
49
+
50
+ > [!CAUTION]
51
+ > The API key should be kept secure and never shared publicly
52
+
53
+ ## Compatibility
54
+
55
+ - Minimum n8n version: 1.0.0
56
+ - Tested against n8n versions: 1.0.0, 1.1.0, 1.2.0
57
+ - Node.js version: 18 or higher
58
+
59
+ ## Resources
60
+
61
+ * [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
62
+ * [Firecrawl Documentation](https://firecrawl.dev/docs)
63
+ * [Firecrawl API Reference](https://docs.firecrawl.dev/api-reference/introduction)
64
+
65
+ ## Version history
66
+
67
+ ### 1.0.0
68
+ - Initial release
69
+ - Support for all basic Firecrawl operations:
70
+ - Map URLs
71
+ - Scrape URL
72
+ - Crawl Website
73
+ - Get Crawl Status
74
+ - Extract Data
75
+ - Get Extract Status
76
+ - Basic error handling and response processing
77
+ - Support for custom body options
78
+
79
+ ## More information
80
+
81
+ Refer to our [documentation on creating nodes](https://docs.n8n.io/integrations/creating-nodes/) for detailed information on building your own nodes.
82
+
83
+ ## License
84
+
85
+ [MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
@@ -0,0 +1,8 @@
1
+ import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class FirecrawlApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FirecrawlApi = void 0;
4
+ class FirecrawlApi {
5
+ constructor() {
6
+ this.name = 'firecrawlApi';
7
+ this.displayName = 'Firecrawl API';
8
+ this.documentationUrl = 'https://docs.firecrawl.dev/introduction#api-key';
9
+ this.properties = [
10
+ {
11
+ displayName: 'Base URL',
12
+ name: 'baseUrl',
13
+ type: 'string',
14
+ default: 'https://api.firecrawl.dev/v1',
15
+ },
16
+ {
17
+ displayName: 'API Key',
18
+ name: 'apiKey',
19
+ type: 'string',
20
+ typeOptions: { password: true },
21
+ default: '',
22
+ },
23
+ ];
24
+ this.authenticate = {
25
+ type: 'generic',
26
+ properties: {
27
+ headers: {
28
+ Authorization: '=Bearer {{$credentials.apiKey}}',
29
+ _origin: 'n8n',
30
+ _originType: 'integration',
31
+ },
32
+ },
33
+ };
34
+ }
35
+ }
36
+ exports.FirecrawlApi = FirecrawlApi;
37
+ //# sourceMappingURL=FirecrawlApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FirecrawlApi.credentials.js","sourceRoot":"","sources":["../../credentials/FirecrawlApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QAEtB,gBAAW,GAAG,eAAe,CAAC;QAE9B,qBAAgB,GAAG,iDAAiD,CAAC;QAErE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,8BAA8B;aACvC;YACD;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;aACX;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;oBAChD,OAAO,EAAE,KAAK;oBACd,WAAW,EAAE,aAAa;iBAC1B;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAjCD,oCAiCC"}
@@ -0,0 +1,21 @@
1
+ import type { INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Firecrawl implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ loadOptions?: {
6
+ [key: string]: (this: import("n8n-workflow").ILoadOptionsFunctions) => Promise<import("n8n-workflow").INodePropertyOptions[]>;
7
+ } | undefined;
8
+ listSearch?: {
9
+ [key: string]: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string | undefined, paginationToken?: string | undefined) => Promise<import("n8n-workflow").INodeListSearchResult>;
10
+ } | undefined;
11
+ credentialTest?: {
12
+ [functionName: string]: import("n8n-workflow").ICredentialTestFunction;
13
+ } | undefined;
14
+ resourceMapping?: {
15
+ [functionName: string]: (this: import("n8n-workflow").ILoadOptionsFunctions) => Promise<import("n8n-workflow").ResourceMapperFields>;
16
+ } | undefined;
17
+ actionHandler?: {
18
+ [functionName: string]: (this: import("n8n-workflow").ILoadOptionsFunctions, payload: string | import("n8n-workflow").IDataObject | undefined) => Promise<import("n8n-workflow").NodeParameterValueType>;
19
+ } | undefined;
20
+ } | undefined;
21
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Firecrawl = void 0;
4
+ const methods_1 = require("./methods");
5
+ const properties_1 = require("./properties");
6
+ class Firecrawl {
7
+ constructor() {
8
+ this.description = {
9
+ displayName: 'Firecrawl',
10
+ name: 'firecrawl',
11
+ icon: 'file:firecrawl.svg',
12
+ group: ['transform'],
13
+ version: 1,
14
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
15
+ description: 'Get data from Firecrawl API',
16
+ defaults: {
17
+ name: 'Firecrawl',
18
+ },
19
+ inputs: `={{["main"]}}`,
20
+ outputs: `={{["main"]}}`,
21
+ credentials: [
22
+ {
23
+ name: 'firecrawlApi',
24
+ required: true,
25
+ },
26
+ ],
27
+ requestDefaults: {
28
+ baseURL: 'https://api.firecrawl.dev/v1',
29
+ headers: {
30
+ Accept: 'application/json',
31
+ 'Content-Type': 'application/json',
32
+ },
33
+ },
34
+ properties: properties_1.allProperties,
35
+ };
36
+ this.methods = methods_1.allMethods;
37
+ }
38
+ }
39
+ exports.Firecrawl = Firecrawl;
40
+ //# sourceMappingURL=Firecrawl.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Firecrawl.node.js","sourceRoot":"","sources":["../../../nodes/Firecrawl/Firecrawl.node.ts"],"names":[],"mappings":";;;AACA,uCAAuC;AACvC,6CAA6C;AAK7C,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,6BAA6B;YAC1C,QAAQ,EAAE;gBACT,IAAI,EAAE,WAAW;aACjB;YACD,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,eAAe;YACxB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,cAAc;oBACpB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,8BAA8B;gBACvC,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBAClC;aACD;YACD,UAAU,EAAE,0BAAa;SACzB,CAAC;QAEF,YAAO,GAAG,oBAAU,CAAC;IACtB,CAAC;CAAA;AA/BD,8BA+BC"}
@@ -0,0 +1,18 @@
1
+ {
2
+ "node": "n8n-nodes-base.Firecrawl",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Miscellaneous", "Development", "Developer Tools"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": ""
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": ""
15
+ }
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1,11 @@
1
+ import { INodeProperties, INodePropertyOptions } from 'n8n-workflow';
2
+ export declare function formatOperationName(name: string): string;
3
+ export declare function createOperationNotice(resourceName: string, operationName: string, method?: string): INodeProperties;
4
+ export declare function createUrlProperty(operationName: string, defaultUrl?: string, resourceName?: string): INodeProperties;
5
+ export declare function createActionsProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean): INodeProperties;
6
+ export declare function createLocationProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean): INodeProperties;
7
+ export declare function createIncludeTagsProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean): INodeProperties;
8
+ export declare function createExcludeTagsProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean): INodeProperties;
9
+ export declare function createScrapeOptionsProperty(operationName: string, useNestedScrapeOptions?: boolean): INodeProperties;
10
+ export declare function createOperationOption(name: string, action: string): INodePropertyOptions;
11
+ export declare function buildApiProperties(name: string, action: string, properties: INodeProperties[]): import("../helpers").IPropertiesWithOptions;