n8n-nodes-socialfetch 0.1.0 → 0.13.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.
- package/README.md +58 -5
- package/package.json +59 -59
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ This is an [n8n](https://n8n.io) community node that lets you fetch real-time so
|
|
|
4
4
|
|
|
5
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
6
|
|
|
7
|
-
[Installation](#installation) · [Credentials](#credentials) · [Operations](#operations) · [Development](#development) · [Publishing](PUBLISHING.md)
|
|
7
|
+
[Installation](#installation) · [Credentials](#credentials) · [Operations](#operations) · [Example](#example-workflow) · [Development](#development) · [Publishing](PUBLISHING.md)
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -28,16 +28,69 @@ List endpoints that return everything in one response (no cursor), or that pagin
|
|
|
28
28
|
|
|
29
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
30
|
|
|
31
|
+
## Example workflow
|
|
32
|
+
|
|
33
|
+
This example fetches a TikTok creator's recent videos and keeps only the high-performing ones.
|
|
34
|
+
|
|
35
|
+
1. **Manual Trigger** — start the workflow manually for testing.
|
|
36
|
+
2. **SocialFetch** — set **Resource** to `TikTok` and **Operation** to `Profile videos`.
|
|
37
|
+
- **Handle**: `n8n`
|
|
38
|
+
- Turn on **Return All** to page through every video, or leave it off to fetch the first page.
|
|
39
|
+
- Under **Additional Fields**, set **Sort By** to `Popular`.
|
|
40
|
+
3. **Split Out** — field to split out: `data.videos` (one item per video).
|
|
41
|
+
4. **Filter** — keep videos above a view threshold:
|
|
42
|
+
- Condition: `{{ $json.stats.views }}` _is greater than_ `100000`.
|
|
43
|
+
|
|
44
|
+
Each SocialFetch item is one API page. With **Return All** off you get a single page; with it on you get one item per page, each containing `data.videos`, `data.page`, and `meta`. **Split Out** turns the videos array into individual items so the Filter node can evaluate `stats.views` on each video.
|
|
45
|
+
|
|
46
|
+
Example response shape (first video on a page):
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"data": {
|
|
51
|
+
"videos": [
|
|
52
|
+
{
|
|
53
|
+
"id": "7639528062975053069",
|
|
54
|
+
"caption": "…",
|
|
55
|
+
"url": "https://www.tiktok.com/@handle/video/7639528062975053069",
|
|
56
|
+
"stats": {
|
|
57
|
+
"views": 302447,
|
|
58
|
+
"likes": 19880,
|
|
59
|
+
"comments": 339,
|
|
60
|
+
"shares": 2232,
|
|
61
|
+
"saves": 389
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"page": { "nextCursor": "…", "hasMore": true }
|
|
66
|
+
},
|
|
67
|
+
"meta": { "creditsCharged": 1, "requestId": "…", "version": "v1" }
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
A second common pattern is enrichment: use **TikTok → User search** (or **Search videos**) to discover handles, then loop those results back into **Profile videos** or **Profile** to pull full details for each match.
|
|
72
|
+
|
|
31
73
|
## Development
|
|
32
74
|
|
|
75
|
+
The node descriptions are generated from the SocialFetch OpenAPI spec.
|
|
76
|
+
|
|
33
77
|
```bash
|
|
34
|
-
|
|
35
|
-
pnpm
|
|
78
|
+
# from the repo root (codegen + eslint fix on generated descriptions)
|
|
79
|
+
pnpm generate:n8n
|
|
80
|
+
|
|
81
|
+
# full derived check before a PR (openapi, sdk, zapier, n8n, …)
|
|
82
|
+
pnpm check:derived
|
|
83
|
+
|
|
84
|
+
# local dev (standalone pnpm project — not part of the root pnpm workspace)
|
|
85
|
+
cd integrations/n8n
|
|
86
|
+
pnpm install --ignore-workspace
|
|
36
87
|
pnpm run build
|
|
37
|
-
pnpm run dev #
|
|
88
|
+
pnpm run dev # http://localhost:5678
|
|
38
89
|
```
|
|
39
90
|
|
|
40
|
-
|
|
91
|
+
`generate:n8n` syncs the package **version** from `@socialfetch/sdk`, regenerates descriptions, and runs `lint:fix`. `check:derived` also runs `check:n8n` (install, lint, build).
|
|
92
|
+
|
|
93
|
+
Releases and syncing to [n8n-nodes-socialfetch](https://github.com/social-freak-ltd/n8n-nodes-socialfetch) are automated from the monorepo — see [PUBLISHING.md](PUBLISHING.md).
|
|
41
94
|
|
|
42
95
|
## License
|
|
43
96
|
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
2
|
+
"name": "n8n-nodes-socialfetch",
|
|
3
|
+
"version": "0.13.3",
|
|
4
|
+
"description": "Fetch social media and web data with the SocialFetch API.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package",
|
|
7
|
+
"socialfetch",
|
|
8
|
+
"social-media",
|
|
9
|
+
"tiktok",
|
|
10
|
+
"instagram",
|
|
11
|
+
"youtube",
|
|
12
|
+
"twitter"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"homepage": "https://www.socialfetch.dev",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Social Fetch"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/social-freak-ltd/n8n-nodes-socialfetch.git"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"packageManager": "pnpm@10.33.0",
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=22"
|
|
29
|
+
},
|
|
30
|
+
"main": "dist/index.js",
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "n8n-node build",
|
|
33
|
+
"dev": "n8n-node dev",
|
|
34
|
+
"lint": "n8n-node lint",
|
|
35
|
+
"lint:fix": "n8n-node lint --fix",
|
|
36
|
+
"release": "n8n-node release",
|
|
37
|
+
"prepublishOnly": "n8n-node prerelease"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist"
|
|
41
|
+
],
|
|
42
|
+
"n8n": {
|
|
43
|
+
"n8nNodesApiVersion": 1,
|
|
44
|
+
"credentials": [
|
|
45
|
+
"dist/credentials/SocialFetchApi.credentials.js"
|
|
46
|
+
],
|
|
47
|
+
"nodes": [
|
|
48
|
+
"dist/nodes/SocialFetch/SocialFetch.node.js"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@n8n/node-cli": "0.32.1",
|
|
53
|
+
"eslint": "9.39.4",
|
|
54
|
+
"n8n-workflow": "2.16.0",
|
|
55
|
+
"prettier": "3.8.3",
|
|
56
|
+
"typescript": "5.9.3"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"n8n-workflow": "*"
|
|
60
|
+
}
|
|
61
61
|
}
|