socialdatax-skills 0.2.12 → 0.2.14
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
CHANGED
|
@@ -46,12 +46,12 @@ Common search phrases for this skill package:
|
|
|
46
46
|
|
|
47
47
|
## Platform MCPs
|
|
48
48
|
|
|
49
|
-
- XHS hosted MCP endpoint: `https://mcp.
|
|
50
|
-
- Douyin hosted MCP endpoint: `https://mcp.
|
|
51
|
-
- Kuaishou hosted MCP endpoint: `https://mcp.
|
|
52
|
-
- Weibo hosted MCP endpoint: `https://mcp.
|
|
53
|
-
- WeChat Channels hosted MCP endpoint: `https://mcp.
|
|
54
|
-
- Sensitive Check hosted MCP endpoint: `https://mcp.
|
|
49
|
+
- XHS hosted MCP endpoint: `https://mcp.socialdatax.com/xhs/mcp`
|
|
50
|
+
- Douyin hosted MCP endpoint: `https://mcp.socialdatax.com/douyin/mcp`
|
|
51
|
+
- Kuaishou hosted MCP endpoint: `https://mcp.socialdatax.com/kuaishou/mcp`
|
|
52
|
+
- Weibo hosted MCP endpoint: `https://mcp.socialdatax.com/weibo/mcp`
|
|
53
|
+
- WeChat Channels hosted MCP endpoint: `https://mcp.socialdatax.com/wechat/mcp`
|
|
54
|
+
- Sensitive Check hosted MCP endpoint: `https://mcp.socialdatax.com/sensitive-check/mcp`
|
|
55
55
|
- Hosted transport: `streamable-http`
|
|
56
56
|
- Authentication: `Authorization: Bearer <SOCIALDATAX_API_KEY>`
|
|
57
57
|
- Website: <https://socialdatax.com>
|
|
@@ -68,7 +68,7 @@ Common search phrases for this skill package:
|
|
|
68
68
|
- Sensitive Check MCP server name: `sensitive-check`
|
|
69
69
|
- Sensitive Check future MCP registry name: `com.socialdatax/sensitive-check`
|
|
70
70
|
- Unified MCP registry name: none; this package installs skills and calls explicit platform services.
|
|
71
|
-
- Current public capability version: `0.2.
|
|
71
|
+
- Current public capability version: `0.2.14`
|
|
72
72
|
|
|
73
73
|
## Direct CLI
|
|
74
74
|
|
|
@@ -78,6 +78,7 @@ Examples:
|
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
80
|
npx -y socialdatax-skills@latest xhs search --keyword "露营" --pretty
|
|
81
|
+
npx -y socialdatax-skills@latest xhs search --keyword "露营" --since-days 7 --pages 2 --pretty
|
|
81
82
|
npx -y socialdatax-skills@latest xhs hot-search --pretty
|
|
82
83
|
npx -y socialdatax-skills@latest xhs detail --note-id "<note_id>" --pretty
|
|
83
84
|
npx -y socialdatax-skills@latest xhs comments --note-id "<note_id>" --pretty
|
|
@@ -85,6 +86,7 @@ npx -y socialdatax-skills@latest xhs comments --note-id "<note_id>" --all --incl
|
|
|
85
86
|
npx -y socialdatax-skills@latest xhs sub-comments --note-id "<note_id>" --comment-id "<comment_id>" --pretty
|
|
86
87
|
npx -y socialdatax-skills@latest xhs user-info --user-id "<user_id>" --pretty
|
|
87
88
|
npx -y socialdatax-skills@latest xhs user-posts --user-id "<user_id>" --pretty
|
|
89
|
+
npx -y socialdatax-skills@latest xhs user-posts --user-id "<user_id>" --since-days 30 --pretty
|
|
88
90
|
npx -y socialdatax-skills@latest douyin hot-search --pretty
|
|
89
91
|
npx -y socialdatax-skills@latest douyin search --keyword "露营" --pretty
|
|
90
92
|
npx -y socialdatax-skills@latest douyin detail --aweme-id "<aweme_id>" --pretty
|
|
@@ -97,8 +99,8 @@ npx -y socialdatax-skills@latest douyin user-posts --sec-user-id "<sec_user_id>"
|
|
|
97
99
|
npx -y socialdatax-skills@latest douyin user-posts --profile-url "<profile_url_or_share_text>" --pretty
|
|
98
100
|
npx -y socialdatax-skills@latest douyin user-series --sec-user-id "<sec_user_id>" --pretty
|
|
99
101
|
npx -y socialdatax-skills@latest douyin user-series --profile-url "<profile_url_or_share_text>" --pretty
|
|
100
|
-
npx -y socialdatax-skills@latest kuaishou hot-search --pretty
|
|
101
102
|
npx -y socialdatax-skills@latest kuaishou search --keyword "露营" --pretty
|
|
103
|
+
npx -y socialdatax-skills@latest kuaishou user-search --keyword "露营" --pretty
|
|
102
104
|
npx -y socialdatax-skills@latest kuaishou detail --photo-id "<photo_id>" --pretty
|
|
103
105
|
npx -y socialdatax-skills@latest kuaishou detail --url "<kuaishou_content_url_or_share_text>" --pretty
|
|
104
106
|
npx -y socialdatax-skills@latest kuaishou comments --photo-id "<photo_id>" --pretty
|
|
@@ -118,7 +120,9 @@ npx -y socialdatax-skills@latest weibo comments --post-id "<post_id>" --all --in
|
|
|
118
120
|
npx -y socialdatax-skills@latest weibo comments --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
119
121
|
npx -y socialdatax-skills@latest weibo replies --post-id "<post_id>" --comment-id "<comment_id>" --pretty
|
|
120
122
|
npx -y socialdatax-skills@latest weibo likers --post-id "<post_id>" --pretty
|
|
123
|
+
npx -y socialdatax-skills@latest weibo likers --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
121
124
|
npx -y socialdatax-skills@latest weibo reposts --post-id "<post_id>" --pretty
|
|
125
|
+
npx -y socialdatax-skills@latest weibo reposts --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
122
126
|
npx -y socialdatax-skills@latest weibo user-info --user-id "<user_id>" --pretty
|
|
123
127
|
npx -y socialdatax-skills@latest weibo user-info --profile-url "<profile_url_or_share_text>" --pretty
|
|
124
128
|
npx -y socialdatax-skills@latest weibo user-posts --user-id "<user_id>" --pretty
|
|
@@ -143,6 +147,8 @@ For XHS outputs with a returned `note_url` field, when `note_url` is non-null, p
|
|
|
143
147
|
|
|
144
148
|
For list-style commands, use `--pages <n>` to fetch N pages from the current starting point and `--max-items <n>` to cap the merged `data.items` output. Search commands support `--pages` but not `--all`, because search has no stable complete-result boundary.
|
|
145
149
|
|
|
150
|
+
For search and creator content-list commands, use `--since-days <1-365>` to keep only items whose public `publish_time` is within the last N days. Search remains bounded by `--pages` and does not promise complete platform coverage; creator content lists continue until the publish-time boundary when `--pages` is omitted.
|
|
151
|
+
|
|
146
152
|
For comments, replies, creator content lists, and Douyin creator series, use `--all` to continue until the returned `next_page_token` is empty. `--all` has no default item or page cap; add `--max-items <n>` or use `--pages <n>` when you want a bounded run.
|
|
147
153
|
|
|
148
154
|
For first-level comments, add `--include-replies` to fetch the second-level replies under each returned first-level comment. Multi-page output keeps `data.items` as the merged first-level list; each item gets `replies`, `replies_page_count`, and `replies_next_page_token`.
|
|
@@ -152,7 +158,7 @@ For commands that accept `--page-token`, continue only with the complete returne
|
|
|
152
158
|
Search pagination uses `--page-token` when continuing with a returned `next_page_token`. Omit `--page-token` on the first search request and pass the complete returned `next_page_token` only when continuing the same search chain.
|
|
153
159
|
|
|
154
160
|
XHS, Douyin, Kuaishou, Weibo, and WeChat Channels search use `--keyword` and optional `--page-token`.
|
|
155
|
-
Kuaishou search uses `--keyword` and optional `--page-token`. Kuaishou search does not accept Douyin semantic filters
|
|
161
|
+
Kuaishou work search uses `kuaishou search --keyword` and optional `--page-token`; Kuaishou creator search uses `kuaishou user-search --keyword` and optional `--page-token`. Kuaishou search does not accept Douyin semantic filters, and `kuaishou user-search` does not support `--since-days`.
|
|
156
162
|
Weibo and WeChat Channels search use `--keyword` and optional `--page-token`.
|
|
157
163
|
|
|
158
164
|
Douyin search filters use semantic values: `--sort-type` supports `general`,
|
|
@@ -162,8 +168,8 @@ Douyin search filters use semantic values: `--sort-type` supports `general`,
|
|
|
162
168
|
supports `all`, `video`, and `image`.
|
|
163
169
|
|
|
164
170
|
WeChat Channels search filters use semantic values: `--sort-type` supports
|
|
165
|
-
`
|
|
166
|
-
`under_5_min`, `between_5_and_20_min`, and `over_20_min`.
|
|
171
|
+
`general`, `time_descending`, and `popularity_descending`; `--duration-range`
|
|
172
|
+
supports `all`, `under_5_min`, `between_5_and_20_min`, and `over_20_min`.
|
|
167
173
|
|
|
168
174
|
### Runtime Requirements
|
|
169
175
|
|
|
@@ -249,7 +255,6 @@ npx -y socialdatax-skills@latest xhs hot-search --pretty
|
|
|
249
255
|
npx -y socialdatax-skills@latest douyin hot-search --pretty
|
|
250
256
|
npx -y socialdatax-skills@latest douyin search --keyword "露营" --pretty
|
|
251
257
|
npx -y socialdatax-skills@latest douyin user-series --sec-user-id "<sec_user_id>" --pretty
|
|
252
|
-
npx -y socialdatax-skills@latest kuaishou hot-search --pretty
|
|
253
258
|
npx -y socialdatax-skills@latest kuaishou search --keyword "露营" --pretty
|
|
254
259
|
npx -y socialdatax-skills@latest weibo hot-search --pretty
|
|
255
260
|
npx -y socialdatax-skills@latest weibo search --keyword "露营" --pretty
|
|
@@ -301,8 +306,8 @@ Current XHS workflows include:
|
|
|
301
306
|
|
|
302
307
|
Current Kuaishou workflows include:
|
|
303
308
|
|
|
304
|
-
- Fetch the current Kuaishou / 快手 short-video hot list.
|
|
305
309
|
- Search related Kuaishou works by keyword.
|
|
310
|
+
- Search Kuaishou creator or account candidates by keyword before profile lookup.
|
|
306
311
|
- Resolve a Kuaishou work page link, short link, share text, or photo_id into structured work details.
|
|
307
312
|
- Fetch paginated first-level comments for comment analysis.
|
|
308
313
|
- Fetch paginated replies under a first-level comment.
|
|
@@ -331,9 +336,10 @@ Current Weibo workflows include:
|
|
|
331
336
|
- Resolve a Weibo post URL, short link, share text, or post_id into structured post details.
|
|
332
337
|
- Fetch paginated first-level comments for comment analysis.
|
|
333
338
|
- Fetch paginated replies under a first-level comment.
|
|
339
|
+
- Fetch paginated liker and repost lists from a post_id, post URL, short link, or share text.
|
|
334
340
|
- Continue Weibo list pagination only when `next_page_token` is non-empty; an empty string means there are no more results to request.
|
|
335
|
-
- Read
|
|
336
|
-
- Fetch paginated
|
|
341
|
+
- Read user profile data from a profile link, short link, share text, or user_id.
|
|
342
|
+
- Fetch paginated user post lists from a user_id, profile link, short link, or share text.
|
|
337
343
|
- Submit and check Weibo video 口播转文字 / speech-to-text transcript jobs; submit tools 提交完成后最多短等 15 秒.
|
|
338
344
|
|
|
339
345
|
Current WeChat Channels / 视频号 workflows include:
|
|
@@ -399,8 +405,8 @@ Current Sensitive Check workflows include:
|
|
|
399
405
|
|
|
400
406
|
| Tool | Public purpose |
|
|
401
407
|
| --- | --- |
|
|
402
|
-
| `kuaishou_get_hot_search_list` | Get the current Kuaishou / 快手 short-video hot list. |
|
|
403
408
|
| `kuaishou_search_videos` | Search Kuaishou works by natural-language keyword with optional `page_token` continuation; do not pass `page`. |
|
|
409
|
+
| `kuaishou_search_users` | Search Kuaishou creators by keyword with optional `page_token` continuation; do not pass `page`. |
|
|
404
410
|
| `kuaishou_get_video_detail_by_photo_id` | Fetch structured work details when the caller already has a photo_id. |
|
|
405
411
|
| `kuaishou_get_video_detail_by_url` | Resolve a Kuaishou work page link, short link, or share text into structured work details. |
|
|
406
412
|
| `kuaishou_get_video_comments_by_photo_id` | Fetch paginated first-level comments when the caller already has a photo_id. |
|
|
@@ -425,10 +431,14 @@ Current Sensitive Check workflows include:
|
|
|
425
431
|
| `weibo_get_post_comments_by_post_id` | Fetch paginated first-level comments when the caller already has a post_id. |
|
|
426
432
|
| `weibo_get_post_comments_by_post_url` | Fetch paginated first-level comments directly from a Weibo post URL, short link, or share text. |
|
|
427
433
|
| `weibo_get_post_comment_replies_by_comment_id` | Fetch paginated replies under a first-level comment by post_id and comment_id. |
|
|
428
|
-
| `
|
|
429
|
-
| `
|
|
430
|
-
| `
|
|
431
|
-
| `
|
|
434
|
+
| `weibo_get_post_liker_list_by_post_id` | Fetch paginated users who liked a Weibo post by post_id. |
|
|
435
|
+
| `weibo_get_post_liker_list_by_post_url` | Fetch paginated users who liked a Weibo post from a post URL, short link, or share text. |
|
|
436
|
+
| `weibo_get_post_repost_list_by_post_id` | Fetch paginated reposts for a Weibo post by post_id. |
|
|
437
|
+
| `weibo_get_post_repost_list_by_post_url` | Fetch paginated reposts for a Weibo post from a post URL, short link, or share text. |
|
|
438
|
+
| `weibo_get_user_info_by_user_id` | Fetch user profile data when the caller already has a user_id. |
|
|
439
|
+
| `weibo_get_user_info_by_profile_url` | Resolve a Weibo profile link, short link, or share text into user profile data. |
|
|
440
|
+
| `weibo_get_user_posts_by_user_id` | Fetch a paginated list of posts published by a user when the caller already has a user_id. |
|
|
441
|
+
| `weibo_get_user_posts_by_profile_url` | Fetch a paginated list of posts published by a user from a profile link, short link, or share text. |
|
|
432
442
|
| `weibo_submit_video_speech_text_by_post_url` | Submit a Weibo video speech-to-text transcript job from a post URL, short link, or share text; submit waits up to 15 seconds. |
|
|
433
443
|
| `weibo_submit_video_speech_text_by_post_id` | Submit a Weibo video speech-to-text transcript job when the caller already has a post_id; submit waits up to 15 seconds. |
|
|
434
444
|
| `weibo_get_video_speech_text_job` | Check a Weibo speech-to-text transcript job by job_id without creating a new task. |
|
package/cli.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { dirname, join, resolve } from "node:path";
|
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
9
9
|
const PACKAGE_NAME = "socialdatax-skills";
|
|
10
|
-
const PACKAGE_VERSION = "0.2.
|
|
10
|
+
const PACKAGE_VERSION = "0.2.14";
|
|
11
11
|
const PACKAGE_SPEC = `${PACKAGE_NAME}@latest`;
|
|
12
12
|
const LOG_PREFIX = `[${PACKAGE_NAME}]`;
|
|
13
13
|
const MIN_NODE_VERSION = "20.18.1";
|
|
@@ -85,6 +85,7 @@ const XHS_DIRECT_ACTION_OPTIONS = {
|
|
|
85
85
|
"pages",
|
|
86
86
|
"all",
|
|
87
87
|
"maxItems",
|
|
88
|
+
"sinceDays",
|
|
88
89
|
"sortType",
|
|
89
90
|
"noteType",
|
|
90
91
|
"publishTimeRange",
|
|
@@ -112,7 +113,16 @@ const XHS_DIRECT_ACTION_OPTIONS = {
|
|
|
112
113
|
"pretty",
|
|
113
114
|
],
|
|
114
115
|
"user-info": ["userId", "profileUrl", "pretty"],
|
|
115
|
-
"user-posts": [
|
|
116
|
+
"user-posts": [
|
|
117
|
+
"userId",
|
|
118
|
+
"profileUrl",
|
|
119
|
+
"pageToken",
|
|
120
|
+
"pages",
|
|
121
|
+
"all",
|
|
122
|
+
"maxItems",
|
|
123
|
+
"sinceDays",
|
|
124
|
+
"pretty",
|
|
125
|
+
],
|
|
116
126
|
};
|
|
117
127
|
const XHS_DIRECT_ACTION_NAMES = Object.keys(XHS_DIRECT_ACTION_OPTIONS).join(", ");
|
|
118
128
|
const XHS_OPTION_DISPLAY_NAMES = {
|
|
@@ -126,6 +136,7 @@ const XHS_OPTION_DISPLAY_NAMES = {
|
|
|
126
136
|
pageToken: "--page-token",
|
|
127
137
|
pages: "--pages",
|
|
128
138
|
maxItems: "--max-items",
|
|
139
|
+
sinceDays: "--since-days",
|
|
129
140
|
all: "--all",
|
|
130
141
|
includeReplies: "--include-replies",
|
|
131
142
|
profileUrl: "--profile-url",
|
|
@@ -151,6 +162,7 @@ const DOUYIN_DIRECT_ACTION_OPTIONS = {
|
|
|
151
162
|
"pages",
|
|
152
163
|
"all",
|
|
153
164
|
"maxItems",
|
|
165
|
+
"sinceDays",
|
|
154
166
|
"sortType",
|
|
155
167
|
"publishTimeRange",
|
|
156
168
|
"durationRange",
|
|
@@ -179,7 +191,16 @@ const DOUYIN_DIRECT_ACTION_OPTIONS = {
|
|
|
179
191
|
"pretty",
|
|
180
192
|
],
|
|
181
193
|
"user-info": ["secUserId", "profileUrl", "pretty"],
|
|
182
|
-
"user-posts": [
|
|
194
|
+
"user-posts": [
|
|
195
|
+
"secUserId",
|
|
196
|
+
"profileUrl",
|
|
197
|
+
"pageToken",
|
|
198
|
+
"pages",
|
|
199
|
+
"all",
|
|
200
|
+
"maxItems",
|
|
201
|
+
"sinceDays",
|
|
202
|
+
"pretty",
|
|
203
|
+
],
|
|
183
204
|
"user-series": ["secUserId", "profileUrl", "pageToken", "pages", "all", "maxItems", "pretty"],
|
|
184
205
|
};
|
|
185
206
|
const DOUYIN_DIRECT_ACTION_NAMES = Object.keys(DOUYIN_DIRECT_ACTION_OPTIONS).join(", ");
|
|
@@ -197,6 +218,7 @@ const DOUYIN_OPTION_DISPLAY_NAMES = {
|
|
|
197
218
|
pageToken: "--page-token",
|
|
198
219
|
pages: "--pages",
|
|
199
220
|
maxItems: "--max-items",
|
|
221
|
+
sinceDays: "--since-days",
|
|
200
222
|
all: "--all",
|
|
201
223
|
includeReplies: "--include-replies",
|
|
202
224
|
sortType: "--sort-type",
|
|
@@ -210,8 +232,8 @@ const DOUYIN_OPTION_DISPLAY_NAMES = {
|
|
|
210
232
|
secUserId: "--sec-user-id",
|
|
211
233
|
};
|
|
212
234
|
const KUAISHOU_DIRECT_ACTION_OPTIONS = {
|
|
213
|
-
|
|
214
|
-
search: ["keyword", "pageToken", "pages", "
|
|
235
|
+
search: ["keyword", "pageToken", "pages", "all", "maxItems", "sinceDays", "pretty"],
|
|
236
|
+
"user-search": ["keyword", "pageToken", "pages", "maxItems", "pretty"],
|
|
215
237
|
detail: ["photoId", "url", "pretty"],
|
|
216
238
|
comments: [
|
|
217
239
|
"photoId",
|
|
@@ -234,7 +256,16 @@ const KUAISHOU_DIRECT_ACTION_OPTIONS = {
|
|
|
234
256
|
"pretty",
|
|
235
257
|
],
|
|
236
258
|
"user-info": ["userId", "profileUrl", "pretty"],
|
|
237
|
-
"user-posts": [
|
|
259
|
+
"user-posts": [
|
|
260
|
+
"userId",
|
|
261
|
+
"profileUrl",
|
|
262
|
+
"pageToken",
|
|
263
|
+
"pages",
|
|
264
|
+
"all",
|
|
265
|
+
"maxItems",
|
|
266
|
+
"sinceDays",
|
|
267
|
+
"pretty",
|
|
268
|
+
],
|
|
238
269
|
};
|
|
239
270
|
const KUAISHOU_DIRECT_ACTION_NAMES = Object.keys(KUAISHOU_DIRECT_ACTION_OPTIONS).join(", ");
|
|
240
271
|
const KUAISHOU_OPTION_DISPLAY_NAMES = {
|
|
@@ -242,6 +273,7 @@ const KUAISHOU_OPTION_DISPLAY_NAMES = {
|
|
|
242
273
|
pageToken: "--page-token",
|
|
243
274
|
pages: "--pages",
|
|
244
275
|
maxItems: "--max-items",
|
|
276
|
+
sinceDays: "--since-days",
|
|
245
277
|
all: "--all",
|
|
246
278
|
includeReplies: "--include-replies",
|
|
247
279
|
url: "--url",
|
|
@@ -252,7 +284,7 @@ const KUAISHOU_OPTION_DISPLAY_NAMES = {
|
|
|
252
284
|
};
|
|
253
285
|
const WEIBO_DIRECT_ACTION_OPTIONS = {
|
|
254
286
|
"hot-search": ["pretty"],
|
|
255
|
-
search: ["keyword", "pageToken", "pages", "all", "maxItems", "pretty"],
|
|
287
|
+
search: ["keyword", "pageToken", "pages", "all", "maxItems", "sinceDays", "pretty"],
|
|
256
288
|
detail: ["postId", "postUrl", "pretty"],
|
|
257
289
|
comments: [
|
|
258
290
|
"postId",
|
|
@@ -274,10 +306,19 @@ const WEIBO_DIRECT_ACTION_OPTIONS = {
|
|
|
274
306
|
"includeReplies",
|
|
275
307
|
"pretty",
|
|
276
308
|
],
|
|
277
|
-
likers: ["postId", "pageToken", "pages", "all", "maxItems", "pretty"],
|
|
278
|
-
reposts: ["postId", "pageToken", "pages", "all", "maxItems", "pretty"],
|
|
309
|
+
likers: ["postId", "postUrl", "pageToken", "pages", "all", "maxItems", "pretty"],
|
|
310
|
+
reposts: ["postId", "postUrl", "pageToken", "pages", "all", "maxItems", "pretty"],
|
|
279
311
|
"user-info": ["userId", "profileUrl", "pretty"],
|
|
280
|
-
"user-posts": [
|
|
312
|
+
"user-posts": [
|
|
313
|
+
"userId",
|
|
314
|
+
"profileUrl",
|
|
315
|
+
"pageToken",
|
|
316
|
+
"pages",
|
|
317
|
+
"all",
|
|
318
|
+
"maxItems",
|
|
319
|
+
"sinceDays",
|
|
320
|
+
"pretty",
|
|
321
|
+
],
|
|
281
322
|
};
|
|
282
323
|
const WEIBO_DIRECT_ACTION_NAMES = Object.keys(WEIBO_DIRECT_ACTION_OPTIONS).join(", ");
|
|
283
324
|
const WEIBO_OPTION_DISPLAY_NAMES = {
|
|
@@ -285,6 +326,7 @@ const WEIBO_OPTION_DISPLAY_NAMES = {
|
|
|
285
326
|
pageToken: "--page-token",
|
|
286
327
|
pages: "--pages",
|
|
287
328
|
maxItems: "--max-items",
|
|
329
|
+
sinceDays: "--since-days",
|
|
288
330
|
all: "--all",
|
|
289
331
|
includeReplies: "--include-replies",
|
|
290
332
|
postId: "--post-id",
|
|
@@ -301,6 +343,7 @@ const WECHAT_DIRECT_ACTION_OPTIONS = {
|
|
|
301
343
|
"pages",
|
|
302
344
|
"all",
|
|
303
345
|
"maxItems",
|
|
346
|
+
"sinceDays",
|
|
304
347
|
"sortType",
|
|
305
348
|
"durationRange",
|
|
306
349
|
"pretty",
|
|
@@ -329,10 +372,23 @@ const WECHAT_DIRECT_ACTION_OPTIONS = {
|
|
|
329
372
|
"pretty",
|
|
330
373
|
],
|
|
331
374
|
"user-info": ["userId", "pretty"],
|
|
332
|
-
"user-posts": [
|
|
375
|
+
"user-posts": [
|
|
376
|
+
"userId",
|
|
377
|
+
"url",
|
|
378
|
+
"pageToken",
|
|
379
|
+
"pages",
|
|
380
|
+
"all",
|
|
381
|
+
"maxItems",
|
|
382
|
+
"sinceDays",
|
|
383
|
+
"pretty",
|
|
384
|
+
],
|
|
333
385
|
};
|
|
334
386
|
const WECHAT_DIRECT_ACTION_NAMES = Object.keys(WECHAT_DIRECT_ACTION_OPTIONS).join(", ");
|
|
335
|
-
const WECHAT_SEARCH_SORT_TYPES = [
|
|
387
|
+
const WECHAT_SEARCH_SORT_TYPES = [
|
|
388
|
+
"general",
|
|
389
|
+
"time_descending",
|
|
390
|
+
"popularity_descending",
|
|
391
|
+
];
|
|
336
392
|
const WECHAT_SEARCH_DURATION_RANGES = [
|
|
337
393
|
"all",
|
|
338
394
|
"under_5_min",
|
|
@@ -344,6 +400,7 @@ const WECHAT_OPTION_DISPLAY_NAMES = {
|
|
|
344
400
|
pageToken: "--page-token",
|
|
345
401
|
pages: "--pages",
|
|
346
402
|
maxItems: "--max-items",
|
|
403
|
+
sinceDays: "--since-days",
|
|
347
404
|
all: "--all",
|
|
348
405
|
includeReplies: "--include-replies",
|
|
349
406
|
sortType: "--sort-type",
|
|
@@ -373,7 +430,7 @@ const PLATFORMS = {
|
|
|
373
430
|
status: "public",
|
|
374
431
|
registryName: "com.52choujiang/xhs-insights",
|
|
375
432
|
futureRegistryName: "com.socialdatax/xhs-insights",
|
|
376
|
-
endpoint: "https://mcp.
|
|
433
|
+
endpoint: "https://mcp.socialdatax.com/xhs/mcp",
|
|
377
434
|
apiKeyEnv: API_KEY_ENV_NAMES,
|
|
378
435
|
upstreamEnv: [
|
|
379
436
|
"SOCIAL_MEDIA_XHS_MCP_UPSTREAM_URL",
|
|
@@ -455,7 +512,7 @@ const PLATFORMS = {
|
|
|
455
512
|
status: "public",
|
|
456
513
|
registryName: "com.52choujiang/douyin-insights",
|
|
457
514
|
futureRegistryName: "com.socialdatax/douyin-insights",
|
|
458
|
-
endpoint: "https://mcp.
|
|
515
|
+
endpoint: "https://mcp.socialdatax.com/douyin/mcp",
|
|
459
516
|
apiKeyEnv: API_KEY_ENV_NAMES,
|
|
460
517
|
upstreamEnv: [
|
|
461
518
|
"SOCIAL_MEDIA_DOUYIN_MCP_UPSTREAM_URL",
|
|
@@ -539,7 +596,7 @@ const PLATFORMS = {
|
|
|
539
596
|
status: "public",
|
|
540
597
|
registryName: "com.52choujiang/kuaishou-insights",
|
|
541
598
|
futureRegistryName: "com.socialdatax/kuaishou-insights",
|
|
542
|
-
endpoint: "https://mcp.
|
|
599
|
+
endpoint: "https://mcp.socialdatax.com/kuaishou/mcp",
|
|
543
600
|
apiKeyEnv: API_KEY_ENV_NAMES,
|
|
544
601
|
upstreamEnv: [
|
|
545
602
|
"SOCIAL_MEDIA_KUAISHOU_MCP_UPSTREAM_URL",
|
|
@@ -547,15 +604,16 @@ const PLATFORMS = {
|
|
|
547
604
|
"KUAISHOU_MCP_UPSTREAM_URL",
|
|
548
605
|
],
|
|
549
606
|
tools: [
|
|
550
|
-
{
|
|
551
|
-
name: "kuaishou_get_hot_search_list",
|
|
552
|
-
description: "Get the current Kuaishou / 快手 short-video hot list.",
|
|
553
|
-
},
|
|
554
607
|
{
|
|
555
608
|
name: "kuaishou_search_videos",
|
|
556
609
|
description:
|
|
557
610
|
"Search Kuaishou works by natural-language keyword with optional page_token continuation; do not pass page.",
|
|
558
611
|
},
|
|
612
|
+
{
|
|
613
|
+
name: "kuaishou_search_users",
|
|
614
|
+
description:
|
|
615
|
+
"Search Kuaishou creators by keyword with optional page_token continuation; do not pass page.",
|
|
616
|
+
},
|
|
559
617
|
{
|
|
560
618
|
name: "kuaishou_get_video_detail_by_photo_id",
|
|
561
619
|
description: "Fetch structured Kuaishou work details when the caller already has a photo_id.",
|
|
@@ -615,7 +673,7 @@ const PLATFORMS = {
|
|
|
615
673
|
status: "public",
|
|
616
674
|
registryName: "com.52choujiang/weibo-insights",
|
|
617
675
|
futureRegistryName: "com.socialdatax/weibo-insights",
|
|
618
|
-
endpoint: "https://mcp.
|
|
676
|
+
endpoint: "https://mcp.socialdatax.com/weibo/mcp",
|
|
619
677
|
apiKeyEnv: API_KEY_ENV_NAMES,
|
|
620
678
|
upstreamEnv: [
|
|
621
679
|
"SOCIAL_MEDIA_WEIBO_MCP_UPSTREAM_URL",
|
|
@@ -656,10 +714,20 @@ const PLATFORMS = {
|
|
|
656
714
|
name: "weibo_get_post_liker_list_by_post_id",
|
|
657
715
|
description: "Fetch a paginated list of users who liked a Weibo post by post_id.",
|
|
658
716
|
},
|
|
717
|
+
{
|
|
718
|
+
name: "weibo_get_post_liker_list_by_post_url",
|
|
719
|
+
description:
|
|
720
|
+
"Fetch a paginated list of users who liked a Weibo post from a post URL, short link, or share text.",
|
|
721
|
+
},
|
|
659
722
|
{
|
|
660
723
|
name: "weibo_get_post_repost_list_by_post_id",
|
|
661
724
|
description: "Fetch a paginated repost list for a Weibo post by post_id.",
|
|
662
725
|
},
|
|
726
|
+
{
|
|
727
|
+
name: "weibo_get_post_repost_list_by_post_url",
|
|
728
|
+
description:
|
|
729
|
+
"Fetch a paginated repost list for a Weibo post from a post URL, short link, or share text.",
|
|
730
|
+
},
|
|
663
731
|
{
|
|
664
732
|
name: "weibo_get_user_info_by_user_id",
|
|
665
733
|
description: "Fetch creator profile data when the caller already has a user_id.",
|
|
@@ -699,7 +767,7 @@ const PLATFORMS = {
|
|
|
699
767
|
status: "public",
|
|
700
768
|
registryName: "com.52choujiang/wechat-channels-insights",
|
|
701
769
|
futureRegistryName: "com.socialdatax/wechat-channels-insights",
|
|
702
|
-
endpoint: "https://mcp.
|
|
770
|
+
endpoint: "https://mcp.socialdatax.com/wechat/mcp",
|
|
703
771
|
apiKeyEnv: API_KEY_ENV_NAMES,
|
|
704
772
|
upstreamEnv: [
|
|
705
773
|
"SOCIAL_MEDIA_WECHAT_MCP_UPSTREAM_URL",
|
|
@@ -771,7 +839,7 @@ const PLATFORMS = {
|
|
|
771
839
|
status: "public",
|
|
772
840
|
registryName: "sensitive-check",
|
|
773
841
|
futureRegistryName: "com.socialdatax/sensitive-check",
|
|
774
|
-
endpoint: "https://mcp.
|
|
842
|
+
endpoint: "https://mcp.socialdatax.com/sensitive-check/mcp",
|
|
775
843
|
apiKeyEnv: API_KEY_ENV_NAMES,
|
|
776
844
|
upstreamEnv: [
|
|
777
845
|
"SOCIALDATAX_SENSITIVE_CHECK_MCP_UPSTREAM_URL",
|
|
@@ -1015,6 +1083,9 @@ function validateDirectPaginationOptions(platformId, action, options) {
|
|
|
1015
1083
|
if (options.maxItems !== undefined) {
|
|
1016
1084
|
parsePositiveIntegerOption(options.maxItems, "--max-items");
|
|
1017
1085
|
}
|
|
1086
|
+
if (options.sinceDays !== undefined) {
|
|
1087
|
+
parseSinceDaysOption(options.sinceDays);
|
|
1088
|
+
}
|
|
1018
1089
|
if (options.all && action === "search") {
|
|
1019
1090
|
throw new Error(`--all is not supported for ${platformId} search. Use --pages instead.`);
|
|
1020
1091
|
}
|
|
@@ -1035,6 +1106,37 @@ function parsePositiveIntegerOption(value, displayName) {
|
|
|
1035
1106
|
return parsed;
|
|
1036
1107
|
}
|
|
1037
1108
|
|
|
1109
|
+
function parseSinceDaysOption(value) {
|
|
1110
|
+
const text = String(value);
|
|
1111
|
+
if (!/^\d+$/.test(text)) {
|
|
1112
|
+
throw new Error("--since-days must be an integer between 1 and 365.");
|
|
1113
|
+
}
|
|
1114
|
+
const parsed = Number(text);
|
|
1115
|
+
if (!Number.isSafeInteger(parsed) || parsed < 1 || parsed > 365) {
|
|
1116
|
+
throw new Error("--since-days must be an integer between 1 and 365.");
|
|
1117
|
+
}
|
|
1118
|
+
return parsed;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
function parseOptionalSinceDays(options) {
|
|
1122
|
+
return options.sinceDays === undefined
|
|
1123
|
+
? undefined
|
|
1124
|
+
: parseSinceDaysOption(options.sinceDays);
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
function nativePublishTimeRangeForSinceDays(sinceDays) {
|
|
1128
|
+
if (sinceDays <= 1) {
|
|
1129
|
+
return "day";
|
|
1130
|
+
}
|
|
1131
|
+
if (sinceDays <= 7) {
|
|
1132
|
+
return "week";
|
|
1133
|
+
}
|
|
1134
|
+
if (sinceDays <= 180) {
|
|
1135
|
+
return "half_year";
|
|
1136
|
+
}
|
|
1137
|
+
return undefined;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1038
1140
|
function parseAllowedStringOption(value, displayName, allowedValues, label) {
|
|
1039
1141
|
const normalized = String(value).trim();
|
|
1040
1142
|
if (!allowedValues.includes(normalized)) {
|
|
@@ -1500,6 +1602,9 @@ function printHelp() {
|
|
|
1500
1602
|
console.log(` npx -y ${PACKAGE_SPEC} xhs search --keyword "露营" --pretty`);
|
|
1501
1603
|
console.log(" Call the XHS search tool directly and print JSON.");
|
|
1502
1604
|
console.log("");
|
|
1605
|
+
console.log(` npx -y ${PACKAGE_SPEC} xhs search --keyword "露营" --since-days 7 --pages 2 --pretty`);
|
|
1606
|
+
console.log(" Search recent XHS results and keep items published in the last 7 days.");
|
|
1607
|
+
console.log("");
|
|
1503
1608
|
console.log(` npx -y ${PACKAGE_SPEC} xhs hot-search --pretty`);
|
|
1504
1609
|
console.log(" Call the XHS search hot list tool directly and print JSON.");
|
|
1505
1610
|
console.log("");
|
|
@@ -1523,6 +1628,9 @@ function printHelp() {
|
|
|
1523
1628
|
console.log(` npx -y ${PACKAGE_SPEC} xhs user-posts --user-id "<user_id>" --pretty`);
|
|
1524
1629
|
console.log(" Call the XHS creator posts tool directly and print JSON.");
|
|
1525
1630
|
console.log("");
|
|
1631
|
+
console.log(` npx -y ${PACKAGE_SPEC} xhs user-posts --user-id "<user_id>" --since-days 30 --pretty`);
|
|
1632
|
+
console.log(" Fetch recent creator posts until the publish-time boundary is reached.");
|
|
1633
|
+
console.log("");
|
|
1526
1634
|
console.log(` npx -y ${PACKAGE_SPEC} douyin hot-search --pretty`);
|
|
1527
1635
|
console.log(" Call the Douyin main hot search list tool directly and print JSON.");
|
|
1528
1636
|
console.log("");
|
|
@@ -1561,12 +1669,12 @@ function printHelp() {
|
|
|
1561
1669
|
console.log(` npx -y ${PACKAGE_SPEC} douyin user-series --profile-url "<profile_url_or_share_text>" --pretty`);
|
|
1562
1670
|
console.log(" Call the Douyin creator short-drama series tool from a profile link or share text.");
|
|
1563
1671
|
console.log("");
|
|
1564
|
-
console.log(` npx -y ${PACKAGE_SPEC} kuaishou hot-search --pretty`);
|
|
1565
|
-
console.log(" Call the Kuaishou short-video hot list tool directly and print JSON.");
|
|
1566
|
-
console.log("");
|
|
1567
1672
|
console.log(` npx -y ${PACKAGE_SPEC} kuaishou search --keyword "露营" --pretty`);
|
|
1568
1673
|
console.log(" Call the Kuaishou work search tool directly and print JSON.");
|
|
1569
1674
|
console.log("");
|
|
1675
|
+
console.log(` npx -y ${PACKAGE_SPEC} kuaishou user-search --keyword "露营" --pretty`);
|
|
1676
|
+
console.log(" Call the Kuaishou creator search tool directly and print JSON.");
|
|
1677
|
+
console.log("");
|
|
1570
1678
|
console.log(` npx -y ${PACKAGE_SPEC} kuaishou detail --photo-id "<photo_id>" --pretty`);
|
|
1571
1679
|
console.log(" Call the Kuaishou work detail tool directly and print JSON.");
|
|
1572
1680
|
console.log("");
|
|
@@ -1623,9 +1731,15 @@ function printHelp() {
|
|
|
1623
1731
|
console.log(` npx -y ${PACKAGE_SPEC} weibo likers --post-id "<post_id>" --pretty`);
|
|
1624
1732
|
console.log(" Call the Weibo post liker list tool directly and print JSON.");
|
|
1625
1733
|
console.log("");
|
|
1734
|
+
console.log(` npx -y ${PACKAGE_SPEC} weibo likers --post-url "<weibo_post_url_or_share_text>" --pretty`);
|
|
1735
|
+
console.log(" Call the Weibo post liker list tool from a post link or share text.");
|
|
1736
|
+
console.log("");
|
|
1626
1737
|
console.log(` npx -y ${PACKAGE_SPEC} weibo reposts --post-id "<post_id>" --pretty`);
|
|
1627
1738
|
console.log(" Call the Weibo post repost list tool directly and print JSON.");
|
|
1628
1739
|
console.log("");
|
|
1740
|
+
console.log(` npx -y ${PACKAGE_SPEC} weibo reposts --post-url "<weibo_post_url_or_share_text>" --pretty`);
|
|
1741
|
+
console.log(" Call the Weibo post repost list tool from a post link or share text.");
|
|
1742
|
+
console.log("");
|
|
1629
1743
|
console.log(` npx -y ${PACKAGE_SPEC} weibo user-info --user-id "<user_id>" --pretty`);
|
|
1630
1744
|
console.log(" Call the Weibo creator profile tool directly and print JSON.");
|
|
1631
1745
|
console.log("");
|
|
@@ -1757,11 +1871,13 @@ function printHelp() {
|
|
|
1757
1871
|
console.log(" --platform <generic|xhs|douyin|kuaishou>");
|
|
1758
1872
|
console.log(" Target platform for sensitive-check text; default is generic.");
|
|
1759
1873
|
console.log(" --pages <number>");
|
|
1760
|
-
console.log(" Fetch and merge N pages from the current starting point for search, comments, replies, creator content lists, and creator series.");
|
|
1874
|
+
console.log(" Fetch and merge N pages from the current starting point for search, Kuaishou creator search, comments, replies, creator content lists, and creator series.");
|
|
1761
1875
|
console.log(" --all");
|
|
1762
1876
|
console.log(" Continue comments, replies, creator content lists, and creator series until next_page_token is empty; not supported for search.");
|
|
1763
1877
|
console.log(" --max-items <number>");
|
|
1764
1878
|
console.log(" Stop after collecting this many primary items.");
|
|
1879
|
+
console.log(" --since-days <1-365>");
|
|
1880
|
+
console.log(" Keep search or creator content-list items with publish_time in the last N days. Search stays bounded by --pages; creator lists continue until the time boundary when --pages is omitted.");
|
|
1765
1881
|
console.log(" --include-replies");
|
|
1766
1882
|
console.log(" For comments commands, also fetch nested second-level replies for each returned first-level comment.");
|
|
1767
1883
|
console.log(" --sort-type <general|time_descending|like_count_descending|comment_count_descending|collect_count_descending>");
|
|
@@ -1779,7 +1895,7 @@ function printHelp() {
|
|
|
1779
1895
|
console.log(" Douyin content type filter; omit for all content types.");
|
|
1780
1896
|
console.log(" --page-token <token>");
|
|
1781
1897
|
console.log(" Continue token-paginated commands with the complete returned next_page_token. For search, omit it on the first request.");
|
|
1782
|
-
console.log(" --sort-type <
|
|
1898
|
+
console.log(" --sort-type <general|time_descending|popularity_descending>");
|
|
1783
1899
|
console.log(" WeChat Channels / 视频号 search sort; omit for default sort.");
|
|
1784
1900
|
console.log(" --duration-range <all|under_5_min|between_5_and_20_min|over_20_min>");
|
|
1785
1901
|
console.log(" WeChat Channels / 视频号 duration filter; omit for no duration filter.");
|
|
@@ -1811,18 +1927,18 @@ function printRemovedMcpConfigHelp(command) {
|
|
|
1811
1927
|
console.error(" com.socialdatax/wechat-channels-insights");
|
|
1812
1928
|
console.error("");
|
|
1813
1929
|
console.error("Use hosted streamable HTTP when your client supports remote MCP:");
|
|
1814
|
-
console.error(" https://mcp.
|
|
1815
|
-
console.error(" https://mcp.
|
|
1816
|
-
console.error(" https://mcp.
|
|
1817
|
-
console.error(" https://mcp.
|
|
1818
|
-
console.error(" https://mcp.
|
|
1930
|
+
console.error(" https://mcp.socialdatax.com/xhs/mcp");
|
|
1931
|
+
console.error(" https://mcp.socialdatax.com/douyin/mcp");
|
|
1932
|
+
console.error(" https://mcp.socialdatax.com/kuaishou/mcp");
|
|
1933
|
+
console.error(" https://mcp.socialdatax.com/weibo/mcp");
|
|
1934
|
+
console.error(" https://mcp.socialdatax.com/wechat/mcp");
|
|
1819
1935
|
console.error("");
|
|
1820
1936
|
console.error("For command/stdio-only clients, use mcp-remote:");
|
|
1821
|
-
console.error(` npx -y mcp-remote https://mcp.
|
|
1822
|
-
console.error(` npx -y mcp-remote https://mcp.
|
|
1823
|
-
console.error(` npx -y mcp-remote https://mcp.
|
|
1824
|
-
console.error(` npx -y mcp-remote https://mcp.
|
|
1825
|
-
console.error(` npx -y mcp-remote https://mcp.
|
|
1937
|
+
console.error(` npx -y mcp-remote https://mcp.socialdatax.com/xhs/mcp --header "Authorization: Bearer <${PRIMARY_API_KEY_ENV}>"`);
|
|
1938
|
+
console.error(` npx -y mcp-remote https://mcp.socialdatax.com/douyin/mcp --header "Authorization: Bearer <${PRIMARY_API_KEY_ENV}>"`);
|
|
1939
|
+
console.error(` npx -y mcp-remote https://mcp.socialdatax.com/kuaishou/mcp --header "Authorization: Bearer <${PRIMARY_API_KEY_ENV}>"`);
|
|
1940
|
+
console.error(` npx -y mcp-remote https://mcp.socialdatax.com/weibo/mcp --header "Authorization: Bearer <${PRIMARY_API_KEY_ENV}>"`);
|
|
1941
|
+
console.error(` npx -y mcp-remote https://mcp.socialdatax.com/wechat/mcp --header "Authorization: Bearer <${PRIMARY_API_KEY_ENV}>"`);
|
|
1826
1942
|
}
|
|
1827
1943
|
|
|
1828
1944
|
async function runXhsDirectCommand(args) {
|
|
@@ -2173,21 +2289,18 @@ function buildDouyinOperation(action, options) {
|
|
|
2173
2289
|
|
|
2174
2290
|
function buildKuaishouOperation(action, options) {
|
|
2175
2291
|
switch (action) {
|
|
2176
|
-
case "hot-search":
|
|
2177
|
-
return buildDirectOperation(
|
|
2178
|
-
"hot-search",
|
|
2179
|
-
{
|
|
2180
|
-
tool: "kuaishou_get_hot_search_list",
|
|
2181
|
-
toolArguments: {},
|
|
2182
|
-
},
|
|
2183
|
-
PLATFORMS.kuaishou
|
|
2184
|
-
);
|
|
2185
2292
|
case "search":
|
|
2186
2293
|
return buildDirectOperation(
|
|
2187
2294
|
"search",
|
|
2188
2295
|
buildKuaishouSearchCall(options),
|
|
2189
2296
|
PLATFORMS.kuaishou
|
|
2190
2297
|
);
|
|
2298
|
+
case "user-search":
|
|
2299
|
+
return buildDirectOperation(
|
|
2300
|
+
"user-search",
|
|
2301
|
+
buildKuaishouUserSearchCall(options),
|
|
2302
|
+
PLATFORMS.kuaishou
|
|
2303
|
+
);
|
|
2191
2304
|
case "detail":
|
|
2192
2305
|
return buildDirectOperation(
|
|
2193
2306
|
"detail",
|
|
@@ -2320,13 +2433,33 @@ function buildWeiboOperation(action, options) {
|
|
|
2320
2433
|
case "likers":
|
|
2321
2434
|
return buildDirectOperation(
|
|
2322
2435
|
"likers",
|
|
2323
|
-
|
|
2436
|
+
buildOneOfCall(options, {
|
|
2437
|
+
idOption: "postId",
|
|
2438
|
+
urlOption: "postUrl",
|
|
2439
|
+
idTool: "weibo_get_post_liker_list_by_post_id",
|
|
2440
|
+
urlTool: "weibo_get_post_liker_list_by_post_url",
|
|
2441
|
+
idArgument: "post_id",
|
|
2442
|
+
urlArgument: "post_url",
|
|
2443
|
+
idDisplay: "--post-id",
|
|
2444
|
+
urlDisplay: "--post-url",
|
|
2445
|
+
pageToken: options.pageToken,
|
|
2446
|
+
}),
|
|
2324
2447
|
PLATFORMS.weibo
|
|
2325
2448
|
);
|
|
2326
2449
|
case "reposts":
|
|
2327
2450
|
return buildDirectOperation(
|
|
2328
2451
|
"reposts",
|
|
2329
|
-
|
|
2452
|
+
buildOneOfCall(options, {
|
|
2453
|
+
idOption: "postId",
|
|
2454
|
+
urlOption: "postUrl",
|
|
2455
|
+
idTool: "weibo_get_post_repost_list_by_post_id",
|
|
2456
|
+
urlTool: "weibo_get_post_repost_list_by_post_url",
|
|
2457
|
+
idArgument: "post_id",
|
|
2458
|
+
urlArgument: "post_url",
|
|
2459
|
+
idDisplay: "--post-id",
|
|
2460
|
+
urlDisplay: "--post-url",
|
|
2461
|
+
pageToken: options.pageToken,
|
|
2462
|
+
}),
|
|
2330
2463
|
PLATFORMS.weibo
|
|
2331
2464
|
);
|
|
2332
2465
|
case "user-info":
|
|
@@ -2475,8 +2608,13 @@ function buildXhsSearchCall(options) {
|
|
|
2475
2608
|
if (!options.keyword) {
|
|
2476
2609
|
throw new Error("Missing --keyword for xhs search.");
|
|
2477
2610
|
}
|
|
2611
|
+
const sinceDays = parseOptionalSinceDays(options);
|
|
2612
|
+
const requestedSortType =
|
|
2613
|
+
options.sortType === undefined && sinceDays !== undefined
|
|
2614
|
+
? "time_descending"
|
|
2615
|
+
: options.sortType || "general";
|
|
2478
2616
|
const sortType = parseSemanticOption(
|
|
2479
|
-
|
|
2617
|
+
requestedSortType,
|
|
2480
2618
|
"--sort-type",
|
|
2481
2619
|
XHS_SEARCH_SORT_TYPES,
|
|
2482
2620
|
XHS_LEGACY_SEARCH_SORT_TYPE_ALIASES,
|
|
@@ -2504,12 +2642,19 @@ function buildXhsSearchCall(options) {
|
|
|
2504
2642
|
}
|
|
2505
2643
|
if (options.sortType !== undefined) {
|
|
2506
2644
|
toolArguments.sort_type = sortType;
|
|
2645
|
+
} else if (sinceDays !== undefined) {
|
|
2646
|
+
toolArguments.sort_type = "time_descending";
|
|
2507
2647
|
}
|
|
2508
2648
|
if (options.noteType !== undefined) {
|
|
2509
2649
|
toolArguments.note_type = noteType;
|
|
2510
2650
|
}
|
|
2511
2651
|
if (options.publishTimeRange !== undefined) {
|
|
2512
2652
|
toolArguments.publish_time_range = publishTimeRange;
|
|
2653
|
+
} else if (sinceDays !== undefined) {
|
|
2654
|
+
const nativeRange = nativePublishTimeRangeForSinceDays(sinceDays);
|
|
2655
|
+
if (nativeRange) {
|
|
2656
|
+
toolArguments.publish_time_range = nativeRange;
|
|
2657
|
+
}
|
|
2513
2658
|
}
|
|
2514
2659
|
return {
|
|
2515
2660
|
tool: "xhs_search_notes",
|
|
@@ -2576,6 +2721,7 @@ function buildDouyinSearchCall(options) {
|
|
|
2576
2721
|
if (!options.keyword) {
|
|
2577
2722
|
throw new Error("Missing --keyword for douyin search.");
|
|
2578
2723
|
}
|
|
2724
|
+
const sinceDays = parseOptionalSinceDays(options);
|
|
2579
2725
|
const toolArguments = {
|
|
2580
2726
|
keyword: options.keyword,
|
|
2581
2727
|
};
|
|
@@ -2586,6 +2732,8 @@ function buildDouyinSearchCall(options) {
|
|
|
2586
2732
|
DOUYIN_SEARCH_SORT_TYPES,
|
|
2587
2733
|
DOUYIN_SEARCH_SORT_TYPES.join(", ")
|
|
2588
2734
|
);
|
|
2735
|
+
} else if (sinceDays !== undefined) {
|
|
2736
|
+
toolArguments.sort_type = "time_descending";
|
|
2589
2737
|
}
|
|
2590
2738
|
if (options.publishTimeRange !== undefined) {
|
|
2591
2739
|
toolArguments.publish_time_range = parseAllowedStringOption(
|
|
@@ -2594,6 +2742,11 @@ function buildDouyinSearchCall(options) {
|
|
|
2594
2742
|
DOUYIN_SEARCH_PUBLISH_TIME_RANGES,
|
|
2595
2743
|
DOUYIN_SEARCH_PUBLISH_TIME_RANGES.join(", ")
|
|
2596
2744
|
);
|
|
2745
|
+
} else if (sinceDays !== undefined) {
|
|
2746
|
+
const nativeRange = nativePublishTimeRangeForSinceDays(sinceDays);
|
|
2747
|
+
if (nativeRange) {
|
|
2748
|
+
toolArguments.publish_time_range = nativeRange;
|
|
2749
|
+
}
|
|
2597
2750
|
}
|
|
2598
2751
|
if (options.durationRange !== undefined) {
|
|
2599
2752
|
toolArguments.duration_range = parseAllowedStringOption(
|
|
@@ -2636,6 +2789,22 @@ function buildKuaishouSearchCall(options) {
|
|
|
2636
2789
|
};
|
|
2637
2790
|
}
|
|
2638
2791
|
|
|
2792
|
+
function buildKuaishouUserSearchCall(options) {
|
|
2793
|
+
if (!options.keyword) {
|
|
2794
|
+
throw new Error("Missing --keyword for kuaishou user-search.");
|
|
2795
|
+
}
|
|
2796
|
+
const toolArguments = {
|
|
2797
|
+
keyword: options.keyword,
|
|
2798
|
+
};
|
|
2799
|
+
if (options.pageToken) {
|
|
2800
|
+
toolArguments.page_token = options.pageToken;
|
|
2801
|
+
}
|
|
2802
|
+
return {
|
|
2803
|
+
tool: "kuaishou_search_users",
|
|
2804
|
+
toolArguments,
|
|
2805
|
+
};
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2639
2808
|
function buildWeiboSearchCall(options) {
|
|
2640
2809
|
if (!options.keyword) {
|
|
2641
2810
|
throw new Error("Missing --keyword for weibo search.");
|
|
@@ -2656,6 +2825,7 @@ function buildWechatSearchCall(options) {
|
|
|
2656
2825
|
if (!options.keyword) {
|
|
2657
2826
|
throw new Error("Missing --keyword for wechat search.");
|
|
2658
2827
|
}
|
|
2828
|
+
const sinceDays = parseOptionalSinceDays(options);
|
|
2659
2829
|
const toolArguments = {
|
|
2660
2830
|
keyword: options.keyword,
|
|
2661
2831
|
};
|
|
@@ -2666,6 +2836,8 @@ function buildWechatSearchCall(options) {
|
|
|
2666
2836
|
WECHAT_SEARCH_SORT_TYPES,
|
|
2667
2837
|
WECHAT_SEARCH_SORT_TYPES.join(", ")
|
|
2668
2838
|
);
|
|
2839
|
+
} else if (sinceDays !== undefined) {
|
|
2840
|
+
toolArguments.sort_type = "time_descending";
|
|
2669
2841
|
}
|
|
2670
2842
|
if (options.durationRange !== undefined) {
|
|
2671
2843
|
toolArguments.duration_range = parseAllowedStringOption(
|
|
@@ -2763,22 +2935,6 @@ function buildWeiboRepliesCall(options) {
|
|
|
2763
2935
|
};
|
|
2764
2936
|
}
|
|
2765
2937
|
|
|
2766
|
-
function buildWeiboPostListByPostIdCall(options, action, tool) {
|
|
2767
|
-
if (!options.postId) {
|
|
2768
|
-
throw new Error(`Missing --post-id for weibo ${action}.`);
|
|
2769
|
-
}
|
|
2770
|
-
const toolArguments = {
|
|
2771
|
-
post_id: options.postId,
|
|
2772
|
-
};
|
|
2773
|
-
if (options.pageToken) {
|
|
2774
|
-
toolArguments.page_token = options.pageToken;
|
|
2775
|
-
}
|
|
2776
|
-
return {
|
|
2777
|
-
tool,
|
|
2778
|
-
toolArguments,
|
|
2779
|
-
};
|
|
2780
|
-
}
|
|
2781
|
-
|
|
2782
2938
|
function buildWechatCommentsCall(options) {
|
|
2783
2939
|
const hasObjectInput = Boolean(options.objectId || options.objectNonceId);
|
|
2784
2940
|
const hasUrlInput = Boolean(options.url);
|
|
@@ -2875,7 +3031,8 @@ function shouldUsePaginatedDirectOutput(options) {
|
|
|
2875
3031
|
options.all ||
|
|
2876
3032
|
options.pages !== undefined ||
|
|
2877
3033
|
options.maxItems !== undefined ||
|
|
2878
|
-
options.includeReplies
|
|
3034
|
+
options.includeReplies ||
|
|
3035
|
+
options.sinceDays !== undefined
|
|
2879
3036
|
);
|
|
2880
3037
|
}
|
|
2881
3038
|
|
|
@@ -2897,6 +3054,7 @@ function parseDirectPaginationOptions(options) {
|
|
|
2897
3054
|
options.maxItems === undefined
|
|
2898
3055
|
? undefined
|
|
2899
3056
|
: parsePositiveIntegerOption(options.maxItems, "--max-items"),
|
|
3057
|
+
sinceDays: parseOptionalSinceDays(options),
|
|
2900
3058
|
};
|
|
2901
3059
|
}
|
|
2902
3060
|
|
|
@@ -2905,7 +3063,14 @@ async function collectPaginatedDirectData(
|
|
|
2905
3063
|
pagination,
|
|
2906
3064
|
{ includeReplies = false } = {}
|
|
2907
3065
|
) {
|
|
2908
|
-
const pageLimit =
|
|
3066
|
+
const pageLimit =
|
|
3067
|
+
pagination.all || shouldAutoPaginateSinceDays(operation, pagination)
|
|
3068
|
+
? Number.POSITIVE_INFINITY
|
|
3069
|
+
: pagination.pages || 1;
|
|
3070
|
+
const sinceDaysCutoff =
|
|
3071
|
+
pagination.sinceDays === undefined
|
|
3072
|
+
? undefined
|
|
3073
|
+
: cutoffPublishTimeForSinceDays(pagination.sinceDays);
|
|
2909
3074
|
const collectedItems = [];
|
|
2910
3075
|
const itemDedupeState = createPaginatedItemDedupeState();
|
|
2911
3076
|
const seenNextMarkers = initialPaginationMarkers(operation);
|
|
@@ -2914,6 +3079,7 @@ async function collectPaginatedDirectData(
|
|
|
2914
3079
|
let nextMarker;
|
|
2915
3080
|
let parentContextData = {};
|
|
2916
3081
|
let currentOperation = cloneDirectOperation(operation);
|
|
3082
|
+
let stoppedBySinceDays = false;
|
|
2917
3083
|
|
|
2918
3084
|
while (pageCount < pageLimit) {
|
|
2919
3085
|
const pageData = await callDirectOperation(currentOperation);
|
|
@@ -2926,8 +3092,12 @@ async function collectPaginatedDirectData(
|
|
|
2926
3092
|
directPageItems(pageData),
|
|
2927
3093
|
itemDedupeState
|
|
2928
3094
|
);
|
|
3095
|
+
const filteredPage = filterItemsBySinceDays(pageItems, sinceDaysCutoff);
|
|
3096
|
+
if (shouldStopAtSinceDaysBoundary(operation, sinceDaysCutoff, pageItems)) {
|
|
3097
|
+
stoppedBySinceDays = true;
|
|
3098
|
+
}
|
|
2929
3099
|
const candidateItems = itemsForRemainingLimit(
|
|
2930
|
-
|
|
3100
|
+
filteredPage.items,
|
|
2931
3101
|
collectedItems.length,
|
|
2932
3102
|
pagination.maxItems
|
|
2933
3103
|
);
|
|
@@ -2948,6 +3118,7 @@ async function collectPaginatedDirectData(
|
|
|
2948
3118
|
if (
|
|
2949
3119
|
!nextMarker ||
|
|
2950
3120
|
reachedMaxItems(collectedItems, pagination.maxItems) ||
|
|
3121
|
+
stoppedBySinceDays ||
|
|
2951
3122
|
pageCount >= pageLimit
|
|
2952
3123
|
) {
|
|
2953
3124
|
if (markerRepeated) {
|
|
@@ -2971,6 +3142,7 @@ async function collectPaginatedDirectData(
|
|
|
2971
3142
|
items: collectedItems,
|
|
2972
3143
|
pageCount,
|
|
2973
3144
|
nextMarker,
|
|
3145
|
+
stoppedBySinceDays,
|
|
2974
3146
|
});
|
|
2975
3147
|
}
|
|
2976
3148
|
|
|
@@ -2985,6 +3157,54 @@ function directPageItems(pageData) {
|
|
|
2985
3157
|
return Array.isArray(pageData?.items) ? pageData.items : [];
|
|
2986
3158
|
}
|
|
2987
3159
|
|
|
3160
|
+
function shouldAutoPaginateSinceDays(operation, pagination) {
|
|
3161
|
+
return (
|
|
3162
|
+
operation.operation === "user-posts" &&
|
|
3163
|
+
pagination.sinceDays !== undefined &&
|
|
3164
|
+
pagination.pages === undefined
|
|
3165
|
+
);
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
function cutoffPublishTimeForSinceDays(sinceDays) {
|
|
3169
|
+
return Math.floor(Date.now() / 1000) - sinceDays * 86400;
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
function itemPublishTimeSeconds(item) {
|
|
3173
|
+
const value = item?.publish_time;
|
|
3174
|
+
const timestamp =
|
|
3175
|
+
typeof value === "number"
|
|
3176
|
+
? value
|
|
3177
|
+
: typeof value === "string"
|
|
3178
|
+
? Number(value)
|
|
3179
|
+
: NaN;
|
|
3180
|
+
if (!Number.isFinite(timestamp) || timestamp <= 0) {
|
|
3181
|
+
return undefined;
|
|
3182
|
+
}
|
|
3183
|
+
return timestamp;
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3186
|
+
function filterItemsBySinceDays(items, cutoffPublishTime) {
|
|
3187
|
+
if (cutoffPublishTime === undefined) {
|
|
3188
|
+
return { items };
|
|
3189
|
+
}
|
|
3190
|
+
return {
|
|
3191
|
+
items: items.filter((item) => {
|
|
3192
|
+
const publishTime = itemPublishTimeSeconds(item);
|
|
3193
|
+
return publishTime !== undefined && publishTime >= cutoffPublishTime;
|
|
3194
|
+
}),
|
|
3195
|
+
};
|
|
3196
|
+
}
|
|
3197
|
+
|
|
3198
|
+
function shouldStopAtSinceDaysBoundary(operation, cutoffPublishTime, items) {
|
|
3199
|
+
if (operation.operation !== "user-posts" || cutoffPublishTime === undefined) {
|
|
3200
|
+
return false;
|
|
3201
|
+
}
|
|
3202
|
+
return items.some((item) => {
|
|
3203
|
+
const publishTime = itemPublishTimeSeconds(item);
|
|
3204
|
+
return publishTime !== undefined && publishTime < cutoffPublishTime;
|
|
3205
|
+
});
|
|
3206
|
+
}
|
|
3207
|
+
|
|
2988
3208
|
function createPaginatedItemDedupeState() {
|
|
2989
3209
|
return { seenKeys: new Set() };
|
|
2990
3210
|
}
|
|
@@ -3014,6 +3234,10 @@ function recordPaginatedItemDedupeKeys(itemDedupeState, dedupeKeys) {
|
|
|
3014
3234
|
}
|
|
3015
3235
|
|
|
3016
3236
|
function paginatedItemDedupeKeys(operation, item) {
|
|
3237
|
+
if (operation.operation === "user-search") {
|
|
3238
|
+
const userId = itemStringField(item, "user_id");
|
|
3239
|
+
return userId ? [`${operation.operation}:${operation.platform.id}:user_id:${userId}`] : [];
|
|
3240
|
+
}
|
|
3017
3241
|
if (shouldDeduplicateCommentItems(operation)) {
|
|
3018
3242
|
const commentId = itemStringField(item, "comment_id");
|
|
3019
3243
|
return commentId ? [`comment:${commentId}`] : [];
|
|
@@ -3204,6 +3428,7 @@ function buildPaginatedData({
|
|
|
3204
3428
|
items,
|
|
3205
3429
|
pageCount,
|
|
3206
3430
|
nextMarker,
|
|
3431
|
+
stoppedBySinceDays,
|
|
3207
3432
|
}) {
|
|
3208
3433
|
const data = {
|
|
3209
3434
|
...(lastPageData && typeof lastPageData === "object" ? lastPageData : {}),
|
|
@@ -3214,6 +3439,9 @@ function buildPaginatedData({
|
|
|
3214
3439
|
};
|
|
3215
3440
|
delete data.next_page;
|
|
3216
3441
|
data.next_page_token = nextMarker || "";
|
|
3442
|
+
if (stoppedBySinceDays) {
|
|
3443
|
+
data.stopped_by_since_days = true;
|
|
3444
|
+
}
|
|
3217
3445
|
return data;
|
|
3218
3446
|
}
|
|
3219
3447
|
|
package/package.json
CHANGED
|
@@ -76,11 +76,12 @@ Optional arguments:
|
|
|
76
76
|
- Douyin `--pages <n>`: fetch and merge N search pages from the current starting point; continue with returned `next_page_token`.
|
|
77
77
|
- Kuaishou `--pages <n>`: fetch and merge N search pages from the current starting point; continue with returned `next_page_token`.
|
|
78
78
|
- `--max-items <n>`: stop after collecting N search results.
|
|
79
|
+
- `--since-days <1-365>`: keep only results whose public `publish_time` is within the last N days. Search remains bounded by `--pages` and does not promise complete platform coverage.
|
|
79
80
|
- `--pretty`: output formatting only.
|
|
80
81
|
- Kuaishou `--page-token <next_page_token>`: opaque pagination token; omit it on the first search request. Continue only with the complete returned `next_page_token` from the same search pagination chain. Do not modify, truncate, redact, mask, omit, normalize, rebuild, generate, or replace the middle with ellipses.
|
|
81
82
|
- Weibo `--page-token <next_page_token>`: opaque pagination token; omit it on the first search request. Continue only with the complete returned `next_page_token` from the same search pagination chain. Do not modify, truncate, redact, mask, omit, normalize, rebuild, generate, or replace the middle with ellipses.
|
|
82
83
|
- WeChat Channels / 视频号 `--page-token <next_page_token>`: opaque pagination token; omit it on the first search request. Continue only with the complete returned `next_page_token` from the same search pagination chain. Do not modify, truncate, redact, mask, omit, normalize, rebuild, generate, or replace the middle with ellipses.
|
|
83
|
-
- WeChat Channels / 视频号 `--sort-type <
|
|
84
|
+
- WeChat Channels / 视频号 `--sort-type <general|time_descending|popularity_descending>`: optional sort value; omit it for the default sort.
|
|
84
85
|
- WeChat Channels / 视频号 `--duration-range <all|under_5_min|between_5_and_20_min|over_20_min>`: optional duration filter; omit it for no duration filter.
|
|
85
86
|
- Weibo `--pages <n>`: fetch and merge N search pages from the current starting point; continue with returned `next_page_token`.
|
|
86
87
|
- WeChat Channels / 视频号 `--pages <n>`: fetch and merge N search pages from the current starting point; continue with returned `next_page_token`.
|
|
@@ -126,14 +127,15 @@ Douyin content type filter values:
|
|
|
126
127
|
- `image`: image/text posts.
|
|
127
128
|
|
|
128
129
|
The command prints JSON with `platform`, `tool`, `arguments`, and `data`. Search supports `--pages` and `--max-items`, but not `--all`, because search has no stable complete-result boundary. Multi-page output keeps merged results in `data.items` and adds `page_count`, `item_count`, and the next-page marker.
|
|
130
|
+
With CLI `--since-days <n>`, XHS and Douyin search automatically prefer newest-first sorting and the closest native publish-time range unless the user explicitly sets sort or publish-time filters; WeChat Channels search defaults to `time_descending`; Kuaishou and Weibo only apply CLI-side `publish_time` filtering.
|
|
129
131
|
Kuaishou search pagination:
|
|
130
132
|
- Continue only when `next_page_token` is not empty.
|
|
131
133
|
- Pass the complete returned `next_page_token` back unchanged as `page_token` for the same search pagination chain. Do not modify, truncate, redact, mask, omit, normalize, rebuild, generate, or replace the middle with ellipses.
|
|
132
134
|
|
|
133
135
|
WeChat Channels / 视频号 sort values:
|
|
134
|
-
- `
|
|
135
|
-
- `
|
|
136
|
-
- `
|
|
136
|
+
- `general`: default sorting.
|
|
137
|
+
- `time_descending`: newest first.
|
|
138
|
+
- `popularity_descending`: platform heat first.
|
|
137
139
|
|
|
138
140
|
WeChat Channels / 视频号 duration filter values:
|
|
139
141
|
- `all`: no duration filter.
|
|
@@ -195,9 +197,10 @@ For WeChat Channels / 视频号, call `wechat_search_videos` with:
|
|
|
195
197
|
- `keyword`: required search phrase or topic.
|
|
196
198
|
- `page_token`: optional opaque pagination token. Continue only with the complete returned `next_page_token` from the same search pagination chain. Do not modify, truncate, redact, mask, omit, normalize, rebuild, generate, or replace the middle with ellipses.
|
|
197
199
|
Do not pass `page` to `wechat_search_videos`; omit `page_token` on the first request.
|
|
198
|
-
- `sort_type`: optional, one of `
|
|
200
|
+
- `sort_type`: optional, one of `general`, `time_descending`, `popularity_descending`; omit it for the default sort.
|
|
199
201
|
- `duration_range`: optional duration filter, one of `all`, `under_5_min`, `between_5_and_20_min`, `over_20_min`; omit it for no duration filter.
|
|
200
202
|
Continue WeChat Channels pagination only when `next_page_token` is not empty. Pass the complete returned `next_page_token` back unchanged as `page_token` for the same keyword and filter chain.
|
|
203
|
+
`--since-days` uses CLI-side filtering only and is not an MCP tool argument; for MCP-only calls, request newest-first/native publish-time filters where available and filter returned `publish_time` values in your analysis.
|
|
201
204
|
|
|
202
205
|
## Output Guidance
|
|
203
206
|
|
|
@@ -28,6 +28,7 @@ Current platform support:
|
|
|
28
28
|
- Xiaohongshu / XHS / RedNote creators through the `xhs_get_user_info_by_*` tools.
|
|
29
29
|
- Douyin / 抖音 creators through the `douyin_get_user_info_by_*` tools.
|
|
30
30
|
- Kuaishou / 快手 creators through the `kuaishou_get_user_info_by_*` tools.
|
|
31
|
+
- Kuaishou / 快手 creator discovery through `kuaishou_search_users` before profile lookup when only an account keyword or niche is known.
|
|
31
32
|
- Weibo / 微博 creators through the `weibo_get_user_info_by_*` tools.
|
|
32
33
|
- WeChat Channels / 视频号 creators through `wechat_get_user_info_by_user_id`.
|
|
33
34
|
|
|
@@ -45,6 +46,7 @@ npx -y socialdatax-skills@latest xhs user-info --user-id "<user_id>" --pretty
|
|
|
45
46
|
npx -y socialdatax-skills@latest xhs user-info --profile-url "<profile_url_or_share_text>" --pretty
|
|
46
47
|
npx -y socialdatax-skills@latest douyin user-info --sec-user-id "<sec_user_id>" --pretty
|
|
47
48
|
npx -y socialdatax-skills@latest douyin user-info --profile-url "<profile_url_or_share_text>" --pretty
|
|
49
|
+
npx -y socialdatax-skills@latest kuaishou user-search --keyword "<creator_keyword>" --pretty
|
|
48
50
|
npx -y socialdatax-skills@latest kuaishou user-info --user-id "<user_id>" --pretty
|
|
49
51
|
npx -y socialdatax-skills@latest kuaishou user-info --profile-url "<profile_url_or_share_text>" --pretty
|
|
50
52
|
npx -y socialdatax-skills@latest weibo user-info --user-id "<user_id>" --pretty
|
|
@@ -59,6 +61,9 @@ Optional arguments:
|
|
|
59
61
|
- Douyin `--sec-user-id <sec_user_id>`: preferred when the creator sec_user_id is already known.
|
|
60
62
|
- Douyin `--profile-url <profile_url_or_share_text>`: use for a profile URL, short link, or profile share text.
|
|
61
63
|
- `--pretty`: output formatting only.
|
|
64
|
+
- Kuaishou `user-search --keyword <creator_keyword>`: use when the user only has a creator name, account keyword, or niche and needs possible Kuaishou user_id candidates before profile lookup.
|
|
65
|
+
- Kuaishou user-search `--page-token <next_page_token>`: opaque pagination token; omit it on the first request and continue only with the complete returned `next_page_token` from the same creator-search chain.
|
|
66
|
+
- Kuaishou user-search `--pages <n>` and `--max-items <n>`: fetch and merge bounded creator-search pages; user-search does not support `--since-days` because creator search results are accounts, not published content items.
|
|
62
67
|
- Kuaishou `--user-id <user_id>`: preferred when the creator user_id is already known.
|
|
63
68
|
- Kuaishou `--profile-url <profile_url_or_share_text>`: use for a profile URL, short link, or profile share text.
|
|
64
69
|
- Weibo `--user-id <user_id>`: preferred when the creator user_id is already known.
|
|
@@ -81,6 +86,7 @@ MCP tools matching the direct CLI commands above:
|
|
|
81
86
|
- `xhs_get_user_info_by_profile_url`
|
|
82
87
|
- `douyin_get_user_info_by_sec_user_id`
|
|
83
88
|
- `douyin_get_user_info_by_profile_url`
|
|
89
|
+
- `kuaishou_search_users`
|
|
84
90
|
- `kuaishou_get_user_info_by_user_id`
|
|
85
91
|
- `kuaishou_get_user_info_by_profile_url`
|
|
86
92
|
- `weibo_get_user_info_by_user_id`
|
|
@@ -92,6 +98,7 @@ If MCP tools are already available in the current agent, use one of these tools:
|
|
|
92
98
|
- `xhs_get_user_info_by_profile_url`: use for profile URLs, short links, or profile share text.
|
|
93
99
|
- `douyin_get_user_info_by_sec_user_id`: preferred when `sec_user_id` is already known from search, detail, comments, or creator work lists.
|
|
94
100
|
- `douyin_get_user_info_by_profile_url`: use for profile URLs, short links, or profile share text.
|
|
101
|
+
- `kuaishou_search_users`: use when the user only has a creator keyword and needs possible Kuaishou user_id candidates. Pass `keyword`; pass `page_token` only for continuation. Do not pass `page`.
|
|
95
102
|
- `kuaishou_get_user_info_by_user_id`: preferred when `user_id` is already known from search, detail, comments, or creator work lists.
|
|
96
103
|
- `kuaishou_get_user_info_by_profile_url`: use for profile URLs, short links, or profile share text.
|
|
97
104
|
- `weibo_get_user_info_by_user_id`: preferred when `user_id` is already known.
|
|
@@ -101,3 +108,4 @@ If MCP tools are already available in the current agent, use one of these tools:
|
|
|
101
108
|
## Output Guidance
|
|
102
109
|
|
|
103
110
|
Report profile fields such as name, platform IDs, bio, verification, follower count, following count, received like count, IP location, and gender when available. Separate profile facts from strategic interpretation.
|
|
111
|
+
For Kuaishou creator search results, present account candidates separately from confirmed profile facts; use a returned `user_id` for profile lookup when the user chooses a candidate.
|
|
@@ -73,6 +73,7 @@ Optional arguments:
|
|
|
73
73
|
- `--pages <n>`: fetch and merge N pages of creator content or creator series.
|
|
74
74
|
- `--all`: continue until `next_page_token` is empty; there is no default item or page cap.
|
|
75
75
|
- `--max-items <n>`: stop after collecting N creator content or series items.
|
|
76
|
+
- `--since-days <1-365>`: keep only creator content whose public `publish_time` is within the last N days. When `--pages` is omitted, the CLI continues creator content lists until the publish-time boundary is reached.
|
|
76
77
|
- `--pretty`: output formatting only.
|
|
77
78
|
- Kuaishou `--user-id <user_id>`: preferred when the creator user_id is already known.
|
|
78
79
|
- Kuaishou `--profile-url <profile_url_or_share_text>`: use for a profile URL, short link, or profile share text.
|
|
@@ -84,6 +85,7 @@ Optional arguments:
|
|
|
84
85
|
Use either the ID option or the profile URL option for a single command, not both.
|
|
85
86
|
|
|
86
87
|
The command prints JSON with `platform`, `tool`, `arguments`, and `data`. Multi-page output keeps merged creator content or series items in `data.items` and adds `page_count`, `item_count`, and `next_page_token`.
|
|
88
|
+
For recent creator research, prefer CLI `--since-days 30` or another user-specified day window. `--since-days` applies to creator content lists only, not Douyin `user-series`.
|
|
87
89
|
|
|
88
90
|
## Safety Boundary
|
|
89
91
|
|
|
@@ -124,6 +126,7 @@ Weibo creator post pagination uses opaque `page_token` values; pass the complete
|
|
|
124
126
|
- `wechat_get_user_posted_videos_by_user_id`: preferred when the WeChat Channels / 视频号 `@finder` user_id is already known.
|
|
125
127
|
- `wechat_get_user_posted_videos_by_url`: use a WeChat Channels / 视频号 video link or share text to resolve the author and list that creator's videos.
|
|
126
128
|
WeChat Channels / 视频号 creator video pagination uses opaque `page_token` values; pass the complete returned `next_page_token` back unchanged for the same user. Do not modify, truncate, redact, mask, omit, normalize, rebuild, generate, or replace the middle with ellipses.
|
|
129
|
+
`--since-days` uses CLI-side filtering only and is not an MCP tool argument; for MCP-only calls, continue pages as needed and filter returned `publish_time` values in your analysis.
|
|
127
130
|
|
|
128
131
|
## Output Guidance
|
|
129
132
|
|
|
@@ -27,7 +27,6 @@ Current platform support:
|
|
|
27
27
|
|
|
28
28
|
- Xiaohongshu / XHS / RedNote search hot list through `xhs_get_search_hot_list`.
|
|
29
29
|
- Douyin / 抖音 hot-search through `douyin_get_hot_search_list`.
|
|
30
|
-
- Kuaishou / 快手 hot-search through `kuaishou_get_hot_search_list`.
|
|
31
30
|
- Weibo / 微博 hot-search through `weibo_get_hot_search_list`.
|
|
32
31
|
- WeChat Channels / 视频号 hot-search through `wechat_get_hot_search_list`.
|
|
33
32
|
- Xiaohongshu / XHS / RedNote notes through `xhs_search_notes`.
|
|
@@ -48,6 +47,7 @@ Current platform support:
|
|
|
48
47
|
- Xiaohongshu / XHS / RedNote creators through the `xhs_get_user_info_by_*` tools.
|
|
49
48
|
- Douyin / 抖音 creators through the `douyin_get_user_info_by_*` tools.
|
|
50
49
|
- Kuaishou / 快手 creators through the `kuaishou_get_user_info_by_*` tools.
|
|
50
|
+
- Kuaishou / 快手 creator discovery through `kuaishou_search_users` before profile lookup when only an account keyword or niche is known.
|
|
51
51
|
- Weibo / 微博 creators through the `weibo_get_user_info_by_*` tools.
|
|
52
52
|
- WeChat Channels / 视频号 creators through `wechat_get_user_info_by_user_id`.
|
|
53
53
|
- Xiaohongshu / XHS / RedNote creator notes through the `xhs_get_user_posted_notes_by_*` tools.
|
|
@@ -85,9 +85,9 @@ npx -y socialdatax-skills@latest douyin comments --aweme-id "<aweme_id>" --all -
|
|
|
85
85
|
npx -y socialdatax-skills@latest douyin user-info --sec-user-id "<sec_user_id>" --pretty
|
|
86
86
|
npx -y socialdatax-skills@latest douyin user-posts --sec-user-id "<sec_user_id>" --pretty
|
|
87
87
|
npx -y socialdatax-skills@latest douyin user-posts --sec-user-id "<sec_user_id>" --all --pretty
|
|
88
|
-
npx -y socialdatax-skills@latest kuaishou hot-search --pretty
|
|
89
88
|
npx -y socialdatax-skills@latest kuaishou search --keyword "<keyword>" --pretty
|
|
90
89
|
npx -y socialdatax-skills@latest kuaishou search --keyword "<keyword>" --pages 3 --pretty
|
|
90
|
+
npx -y socialdatax-skills@latest kuaishou user-search --keyword "<creator_keyword>" --pretty
|
|
91
91
|
npx -y socialdatax-skills@latest kuaishou detail --photo-id "<photo_id>" --pretty
|
|
92
92
|
npx -y socialdatax-skills@latest kuaishou comments --photo-id "<photo_id>" --pretty
|
|
93
93
|
npx -y socialdatax-skills@latest kuaishou comments --photo-id "<photo_id>" --all --include-replies --pretty
|
|
@@ -115,7 +115,6 @@ npx -y socialdatax-skills@latest wechat user-posts --user-id "<finder_user_id>"
|
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
Additional direct CLI entrypoints:
|
|
118
|
-
|
|
119
118
|
```bash
|
|
120
119
|
npx -y socialdatax-skills@latest xhs detail --url "<note_url_or_share_text>" --pretty
|
|
121
120
|
npx -y socialdatax-skills@latest xhs comments --url "<note_url_or_share_text>" --pretty
|
|
@@ -130,6 +129,7 @@ npx -y socialdatax-skills@latest douyin user-series --sec-user-id "<sec_user_id>
|
|
|
130
129
|
npx -y socialdatax-skills@latest douyin user-series --profile-url "<profile_url_or_share_text>" --pretty
|
|
131
130
|
npx -y socialdatax-skills@latest xhs sub-comments --note-id "<note_id>" --comment-id "<comment_id>" --pretty
|
|
132
131
|
npx -y socialdatax-skills@latest douyin replies --aweme-id "<aweme_id>" --comment-id "<comment_id>" --pretty
|
|
132
|
+
npx -y socialdatax-skills@latest kuaishou user-search --keyword "<creator_keyword>" --pages 3 --pretty
|
|
133
133
|
npx -y socialdatax-skills@latest kuaishou detail --url "<kuaishou_content_url_or_share_text>" --pretty
|
|
134
134
|
npx -y socialdatax-skills@latest kuaishou comments --url "<kuaishou_content_url_or_share_text>" --pretty
|
|
135
135
|
npx -y socialdatax-skills@latest kuaishou user-info --profile-url "<profile_url_or_share_text>" --pretty
|
|
@@ -138,7 +138,9 @@ npx -y socialdatax-skills@latest kuaishou replies --photo-id "<photo_id>" --comm
|
|
|
138
138
|
npx -y socialdatax-skills@latest weibo detail --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
139
139
|
npx -y socialdatax-skills@latest weibo comments --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
140
140
|
npx -y socialdatax-skills@latest weibo likers --post-id "<post_id>" --pretty
|
|
141
|
+
npx -y socialdatax-skills@latest weibo likers --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
141
142
|
npx -y socialdatax-skills@latest weibo reposts --post-id "<post_id>" --pretty
|
|
143
|
+
npx -y socialdatax-skills@latest weibo reposts --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
142
144
|
npx -y socialdatax-skills@latest weibo user-info --profile-url "<profile_url_or_share_text>" --pretty
|
|
143
145
|
npx -y socialdatax-skills@latest weibo user-posts --profile-url "<profile_url_or_share_text>" --pretty
|
|
144
146
|
npx -y socialdatax-skills@latest weibo replies --post-id "<post_id>" --comment-id "<comment_id>" --pretty
|
|
@@ -155,19 +157,19 @@ Required arguments:
|
|
|
155
157
|
- Use `xhs hot-search` without keyword when the user asks for current Xiaohongshu / XHS / RedNote hot topics or 小红书搜索热榜.
|
|
156
158
|
- Use `douyin hot-search` without keyword when the user asks for current Douyin hot topics.
|
|
157
159
|
- Use `xhs search --keyword <text>`, `douyin search --keyword <text>`, `kuaishou search --keyword <text>`, `weibo search --keyword <text>`, or `wechat search --keyword <text>` for keyword research.
|
|
160
|
+
- Use `kuaishou user-search --keyword <creator_keyword>` when the user wants to discover Kuaishou creator or account candidates by name, keyword, or niche before profile lookup.
|
|
158
161
|
- For detail, comments, replies, creator profile, creator posts, and creator series commands, use the ID argument shown in the CLI example or the matching URL/profile-url entrypoint, not both.
|
|
159
|
-
- Use `kuaishou hot-search` without keyword when the user asks for current Kuaishou / 快手 hot topics.
|
|
160
|
-
- Use `kuaishou search --keyword <text>` for Kuaishou keyword research.
|
|
161
|
-
- Use `weibo hot-search` without keyword when the user asks for current Weibo / 微博 hot topics.
|
|
162
162
|
- Use `wechat hot-search` without keyword when the user asks for current WeChat Channels / 视频号 hot topics.
|
|
163
163
|
|
|
164
164
|
Optional arguments:
|
|
165
165
|
|
|
166
166
|
- Search continuation uses `--page-token <next_page_token>` when a returned `next_page_token` is available. Omit `page_token` on the first token-paginated search request, and continue only with the complete returned `next_page_token` from the same chain.
|
|
167
|
-
- `--page-token <next_page_token>`: use for XHS/Douyin/Kuaishou/Weibo/WeChat Channels search continuation and
|
|
167
|
+
- `--page-token <next_page_token>`: use for XHS/Douyin/Kuaishou/Weibo/WeChat Channels search continuation, Kuaishou creator search continuation, and token-paginated comments, replies, creator posts, creator notes, creator videos, and creator series. Keep the original topic, content item, creator-search keyword, or creator target stable. Do not modify, truncate, redact, mask, omit, normalize, rebuild, generate, or replace the middle with ellipses.
|
|
168
168
|
- `--pages <n>`: fetch and merge N pages for search, comments, replies, creator posts, or creator series.
|
|
169
169
|
- `--all`: fetch comments, replies, creator posts, or creator series until `next_page_token` is empty; do not use it for search.
|
|
170
170
|
- `--max-items <n>`: stop after collecting N primary results.
|
|
171
|
+
- Kuaishou `user-search` supports `--pages <n>` and `--max-items <n>` for bounded creator candidate discovery; it does not support `--since-days`.
|
|
172
|
+
- `--since-days <1-365>`: keep search or creator content-list items whose public `publish_time` is within the last N days. Search stays bounded by `--pages`; creator content lists continue until the publish-time boundary when `--pages` is omitted.
|
|
171
173
|
- `--include-replies`: for first-level comments, also fetch nested second-level replies under each returned comment.
|
|
172
174
|
- `--sort-type`, `--note-type`, `--publish-time-range`, `--duration-range`, and `--content-type`: apply only to XHS, Douyin, or WeChat Channels keyword research commands when the user asks for filtering; Kuaishou and Weibo search currently use `--keyword` and optional `--page-token`.
|
|
173
175
|
- `--comment-id`: required for reply/sub-comment commands together with the content ID.
|
|
@@ -177,7 +179,7 @@ Optional arguments:
|
|
|
177
179
|
|
|
178
180
|
- Use XHS commands for Xiaohongshu / XHS / RedNote / 小红书 search hot list, notes, comments, creators, and creator note lists.
|
|
179
181
|
- Use Douyin commands for Douyin / 抖音 works, comments, creators, hot topics, creator works, and creator short-drama series.
|
|
180
|
-
- Use Kuaishou commands for Kuaishou / 快手 short videos, comments, creators, creator works
|
|
182
|
+
- Use Kuaishou commands for Kuaishou / 快手 short videos, keyword research, comments, creators, and creator works.
|
|
181
183
|
- Use Weibo commands for Weibo / 微博 posts, comments, creators, creator posts, and hot topics.
|
|
182
184
|
- Use WeChat Channels / 视频号 commands for videos, comments, creators, creator videos, and hot topics.
|
|
183
185
|
- If the user asks for both platforms, keep findings separated by platform before comparing patterns.
|
|
@@ -185,6 +187,7 @@ Optional arguments:
|
|
|
185
187
|
## Choose The Narrowest Entry
|
|
186
188
|
|
|
187
189
|
Use the most specific direct CLI command for the user's task instead of forcing every request through keyword research. The command prints JSON with `platform`, `tool`, `arguments`, and `data`.
|
|
190
|
+
When the user asks for recent content, pass CLI `--since-days <n>` with bounded `--pages`; keep in mind this filters returned `publish_time` values and does not promise complete platform coverage.
|
|
188
191
|
|
|
189
192
|
## Safety Boundary
|
|
190
193
|
|
|
@@ -196,8 +199,8 @@ MCP tools matching the direct CLI commands above:
|
|
|
196
199
|
|
|
197
200
|
- XHS: `xhs_get_search_hot_list`, `xhs_search_notes`, `xhs_get_note_detail_by_note_id`, `xhs_get_note_comments_by_note_id`, `xhs_get_user_info_by_user_id`, `xhs_get_user_posted_notes_by_user_id`, `xhs_get_note_detail_by_note_url`, `xhs_get_note_comments_by_note_url`, `xhs_get_user_info_by_profile_url`, `xhs_get_user_posted_notes_by_profile_url`, `xhs_get_note_sub_comments_by_comment_id`
|
|
198
201
|
- DOUYIN: `douyin_get_hot_search_list`, `douyin_search_videos`, `douyin_get_video_detail_by_aweme_id`, `douyin_get_video_comments_by_aweme_id`, `douyin_get_user_info_by_sec_user_id`, `douyin_get_user_posted_videos_by_sec_user_id`, `douyin_get_video_detail_by_url`, `douyin_get_video_comments_by_url`, `douyin_get_user_info_by_profile_url`, `douyin_get_user_posted_videos_by_profile_url`, `douyin_get_user_series_by_sec_user_id`, `douyin_get_user_series_by_profile_url`, `douyin_get_video_comment_replies_by_comment_id`
|
|
199
|
-
- KUAISHOU: `
|
|
200
|
-
- WEIBO: `weibo_get_hot_search_list`, `weibo_search_posts`, `weibo_get_post_detail_by_post_id`, `weibo_get_post_comments_by_post_id`, `weibo_get_user_info_by_user_id`, `weibo_get_user_posts_by_user_id`, `weibo_get_post_detail_by_post_url`, `weibo_get_post_comments_by_post_url`, `weibo_get_post_liker_list_by_post_id`, `weibo_get_post_repost_list_by_post_id`, `weibo_get_user_info_by_profile_url`, `weibo_get_user_posts_by_profile_url`, `weibo_get_post_comment_replies_by_comment_id`
|
|
202
|
+
- KUAISHOU: `kuaishou_search_videos`, `kuaishou_search_users`, `kuaishou_get_video_detail_by_photo_id`, `kuaishou_get_video_comments_by_photo_id`, `kuaishou_get_user_info_by_user_id`, `kuaishou_get_user_posted_videos_by_user_id`, `kuaishou_get_video_detail_by_url`, `kuaishou_get_video_comments_by_url`, `kuaishou_get_user_info_by_profile_url`, `kuaishou_get_user_posted_videos_by_profile_url`, `kuaishou_get_video_comment_replies_by_comment_id`
|
|
203
|
+
- WEIBO: `weibo_get_hot_search_list`, `weibo_search_posts`, `weibo_get_post_detail_by_post_id`, `weibo_get_post_comments_by_post_id`, `weibo_get_user_info_by_user_id`, `weibo_get_user_posts_by_user_id`, `weibo_get_post_detail_by_post_url`, `weibo_get_post_comments_by_post_url`, `weibo_get_post_liker_list_by_post_id`, `weibo_get_post_liker_list_by_post_url`, `weibo_get_post_repost_list_by_post_id`, `weibo_get_post_repost_list_by_post_url`, `weibo_get_user_info_by_profile_url`, `weibo_get_user_posts_by_profile_url`, `weibo_get_post_comment_replies_by_comment_id`
|
|
201
204
|
- WECHAT: `wechat_get_hot_search_list`, `wechat_search_videos`, `wechat_get_video_detail_by_encrypted_object_id`, `wechat_get_video_comments_by_object_id`, `wechat_get_user_info_by_user_id`, `wechat_get_user_posted_videos_by_user_id`, `wechat_get_video_detail_by_url`, `wechat_get_video_comments_by_url`, `wechat_get_user_posted_videos_by_url`, `wechat_get_video_comment_replies_by_comment_id`
|
|
202
205
|
|
|
203
206
|
Use the automatically listed MCP tools above as the source of truth for tool names. Pick the narrowest tool for the user's platform and task.
|