n8n-nodes-socialfetch 0.1.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 +21 -0
- package/README.md +44 -0
- package/dist/credentials/SocialFetchApi.credentials.js +37 -0
- package/dist/credentials/socialfetch.svg +29 -0
- package/dist/nodes/SocialFetch/SocialFetch.node.js +41 -0
- package/dist/nodes/SocialFetch/descriptions/auth.generated.js +45 -0
- package/dist/nodes/SocialFetch/descriptions/facebook.generated.js +1625 -0
- package/dist/nodes/SocialFetch/descriptions/index.generated.js +79 -0
- package/dist/nodes/SocialFetch/descriptions/instagram.generated.js +548 -0
- package/dist/nodes/SocialFetch/descriptions/linkedin.generated.js +201 -0
- package/dist/nodes/SocialFetch/descriptions/reddit.generated.js +634 -0
- package/dist/nodes/SocialFetch/descriptions/spotify.generated.js +195 -0
- package/dist/nodes/SocialFetch/descriptions/telegram.generated.js +156 -0
- package/dist/nodes/SocialFetch/descriptions/threads.generated.js +316 -0
- package/dist/nodes/SocialFetch/descriptions/tiktok.generated.js +1797 -0
- package/dist/nodes/SocialFetch/descriptions/twitter.generated.js +606 -0
- package/dist/nodes/SocialFetch/descriptions/web.generated.js +283 -0
- package/dist/nodes/SocialFetch/descriptions/youtube.generated.js +993 -0
- package/dist/nodes/SocialFetch/shared/pagination.js +37 -0
- package/dist/nodes/SocialFetch/socialfetch.svg +29 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Social Freak Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# n8n-nodes-socialfetch
|
|
2
|
+
|
|
3
|
+
This is an [n8n](https://n8n.io) community node that lets you fetch real-time social media and web data using the [SocialFetch API](https://www.socialfetch.dev).
|
|
4
|
+
|
|
5
|
+
It exposes a single **SocialFetch** node with one resource per platform (TikTok, Twitter/X, Telegram, Facebook, Instagram, Threads, LinkedIn, Reddit, Spotify, YouTube, Web) plus account operations under **Account** (Whoami, Balance). Each operation maps directly to a SocialFetch public API endpoint.
|
|
6
|
+
|
|
7
|
+
[Installation](#installation) · [Credentials](#credentials) · [Operations](#operations) · [Development](#development) · [Publishing](PUBLISHING.md)
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Follow the [community nodes installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) and install the npm package `n8n-nodes-socialfetch`.
|
|
12
|
+
|
|
13
|
+
## Credentials
|
|
14
|
+
|
|
15
|
+
You need a SocialFetch API key (it starts with `sfk_`). Create one in your [SocialFetch dashboard](https://www.socialfetch.dev).
|
|
16
|
+
|
|
17
|
+
In n8n, create a new **SocialFetch API** credential and paste your key. The credential is validated against `GET /v1/whoami` when you save it.
|
|
18
|
+
|
|
19
|
+
## Operations
|
|
20
|
+
|
|
21
|
+
Pick a **Resource** (platform) and an **Operation**. Required inputs appear as direct fields; optional inputs live under **Additional Fields**.
|
|
22
|
+
|
|
23
|
+
### Pagination and “Return All”
|
|
24
|
+
|
|
25
|
+
Only list endpoints that use SocialFetch’s **cursor** query parameter show a **Return All** toggle. When enabled, the node follows `data.page.nextCursor` until `data.page.hasMore` is false. Each page is a separate output item containing the full API JSON body (`data`, `meta`, etc.). Use n8n’s **Item Lists** or **Code** node if you need a single merged array.
|
|
26
|
+
|
|
27
|
+
List endpoints that return everything in one response (no cursor), or that paginate with other parameters such as `page`, do not show **Return All**—you get the first response only unless you pass those parameters under **Additional Fields**.
|
|
28
|
+
|
|
29
|
+
Every request consumes credits from your SocialFetch balance (most endpoints cost 1 credit; some search and media-download options cost more). The credits charged for each call are returned in `meta.creditsCharged`.
|
|
30
|
+
|
|
31
|
+
## Development
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pnpm install
|
|
35
|
+
pnpm run lint:fix
|
|
36
|
+
pnpm run build
|
|
37
|
+
pnpm run dev # local n8n at http://localhost:5678 with this node loaded
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Source of truth for API coverage lives in the [SocialFetch](https://github.com/social-freak-ltd/socialfetch) monorepo (`integrations/n8n/`). Sync generated description files from there when the public API changes.
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
[MIT](./LICENSE)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SocialFetchApi = void 0;
|
|
4
|
+
class SocialFetchApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = "socialFetchApi";
|
|
7
|
+
this.displayName = "SocialFetch API";
|
|
8
|
+
this.documentationUrl = "https://www.socialfetch.dev/docs";
|
|
9
|
+
this.icon = "file:socialfetch.svg";
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: "API Key",
|
|
13
|
+
name: "apiKey",
|
|
14
|
+
type: "string",
|
|
15
|
+
typeOptions: { password: true },
|
|
16
|
+
default: "",
|
|
17
|
+
required: true,
|
|
18
|
+
description: "Your SocialFetch API key (starts with sfk_). Create one in the SocialFetch dashboard.",
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
this.authenticate = {
|
|
22
|
+
type: "generic",
|
|
23
|
+
properties: {
|
|
24
|
+
headers: {
|
|
25
|
+
"x-api-key": "={{$credentials.apiKey}}",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
this.test = {
|
|
30
|
+
request: {
|
|
31
|
+
baseURL: "https://api.socialfetch.dev",
|
|
32
|
+
url: "/v1/whoami",
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.SocialFetchApi = SocialFetchApi;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
width="48"
|
|
3
|
+
height="48"
|
|
4
|
+
viewBox="0 0 48 48"
|
|
5
|
+
fill="none"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
>
|
|
8
|
+
<rect width="48" height="48" fill="#AAF7ED" />
|
|
9
|
+
<g clip-path="url(#clip0_200_7)">
|
|
10
|
+
<path
|
|
11
|
+
d="M25.5245 32.8171H19.6903V38.6513H25.5245L31.3586 32.8171L37.1928 26.983L40.1099 24.0659L37.1928 21.1488L31.3586 15.3146L25.5245 9.48047H19.6903V15.3146H25.5245V21.1488H31.3586V26.983H25.5245V32.8171Z"
|
|
12
|
+
fill="#232023"
|
|
13
|
+
/>
|
|
14
|
+
<path
|
|
15
|
+
d="M19.6903 32.8171V26.983H25.5245V21.1488H19.6903V15.3146H13.8561V21.1488V26.983V32.8171H19.6903Z"
|
|
16
|
+
fill="#232023"
|
|
17
|
+
/>
|
|
18
|
+
</g>
|
|
19
|
+
<defs>
|
|
20
|
+
<clipPath id="clip0_200_7">
|
|
21
|
+
<rect
|
|
22
|
+
width="32.0879"
|
|
23
|
+
height="32.0879"
|
|
24
|
+
fill="white"
|
|
25
|
+
transform="translate(8.02197 8.02197)"
|
|
26
|
+
/>
|
|
27
|
+
</clipPath>
|
|
28
|
+
</defs>
|
|
29
|
+
</svg>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SocialFetch = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const index_generated_1 = require("./descriptions/index.generated");
|
|
6
|
+
class SocialFetch {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.description = {
|
|
9
|
+
displayName: "SocialFetch",
|
|
10
|
+
name: "socialFetch",
|
|
11
|
+
icon: "file:socialfetch.svg",
|
|
12
|
+
group: ["input"],
|
|
13
|
+
version: 1,
|
|
14
|
+
subtitle: '={{$parameter["operation"].replace(/\\./g, " › ").replace(/^[^›]+ › /, "")}}',
|
|
15
|
+
description: "Fetch social media and web data via the SocialFetch API",
|
|
16
|
+
defaults: { name: "SocialFetch" },
|
|
17
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
18
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
19
|
+
credentials: [{ name: "socialFetchApi", required: true }],
|
|
20
|
+
requestDefaults: {
|
|
21
|
+
baseURL: "https://api.socialfetch.dev",
|
|
22
|
+
headers: {
|
|
23
|
+
Accept: "application/json",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
properties: [
|
|
27
|
+
{
|
|
28
|
+
displayName: "Resource",
|
|
29
|
+
name: "resource",
|
|
30
|
+
type: "options",
|
|
31
|
+
noDataExpression: true,
|
|
32
|
+
options: index_generated_1.resourceOptions,
|
|
33
|
+
default: "tiktok",
|
|
34
|
+
},
|
|
35
|
+
...index_generated_1.allResourceProperties,
|
|
36
|
+
],
|
|
37
|
+
usableAsTool: true,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.SocialFetch = SocialFetch;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.auth = void 0;
|
|
4
|
+
exports.auth = [
|
|
5
|
+
{
|
|
6
|
+
"displayName": "Operation",
|
|
7
|
+
"name": "operation",
|
|
8
|
+
"type": "options",
|
|
9
|
+
"noDataExpression": true,
|
|
10
|
+
"displayOptions": {
|
|
11
|
+
"show": {
|
|
12
|
+
"resource": [
|
|
13
|
+
"auth"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"default": "auth.whoami",
|
|
18
|
+
"options": [
|
|
19
|
+
{
|
|
20
|
+
"name": "Whoami",
|
|
21
|
+
"value": "auth.whoami",
|
|
22
|
+
"action": "Whoami",
|
|
23
|
+
"description": "Get the authenticated API account.",
|
|
24
|
+
"routing": {
|
|
25
|
+
"request": {
|
|
26
|
+
"method": "GET",
|
|
27
|
+
"url": "/v1/whoami"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "Balance",
|
|
33
|
+
"value": "billing.balance.get",
|
|
34
|
+
"action": "Get account balance",
|
|
35
|
+
"description": "Get your account credit balance.",
|
|
36
|
+
"routing": {
|
|
37
|
+
"request": {
|
|
38
|
+
"method": "GET",
|
|
39
|
+
"url": "/v1/balance"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
];
|