@clawhub-justoneapi-256daef3f1
Call GET /api/bilibili/get-user-detail/v2 for Bilibili User Profile through JustOneAPI with uid.
---
name: Bilibili User Profile API
description: Call GET /api/bilibili/get-user-detail/v2 for Bilibili User Profile through JustOneAPI with uid.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_bilibili_get_user_detail"}}
---
# Bilibili User Profile
Use this focused JustOneAPI skill for user Profile in Bilibili. It targets `GET /api/bilibili/get-user-detail/v2`. Required non-token inputs are `uid`. OpenAPI describes it as: Get Bilibili user Profile data, including account metadata, audience metrics, and verification-related fields, for analyzing creator's profile, level, and verification status and verifying user identity and social presence on bilibili.
## Endpoint Scope
- Platform key: `bilibili`
- Endpoint key: `get-user-detail`
- Platform family: Bilibili
- Skill slug: `justoneapi-bilibili-get-user-detail`
| Operation | Version | Method | Path | OpenAPI summary |
| --- | --- | --- | --- | --- |
| `getUserDetailV2` | `v2` | `GET` | `/api/bilibili/get-user-detail/v2` | User Profile |
## Inputs
| Parameter | In | Required by | Optional by | Type | Notes |
| --- | --- | --- | --- | --- | --- |
| `uid` | `query` | all | n/a | `string` | Bilibili User ID (UID) |
Request body: none documented; send parameters through path or query arguments.
## Version Choice
Use `getUserDetailV2` for the documented `v2` endpoint. There are no alternate versions grouped in this skill.
## Run This Endpoint
Supported operation IDs in this skill: `getUserDetailV2`.
```bash
node {baseDir}/bin/run.mjs --operation "getUserDetailV2" --token "$JUST_ONE_API_TOKEN" --params-json '{"uid":"<uid>"}'
```
Ask for any missing required parameter before calling the helper. Keep user-provided IDs, cursors, keywords, and filters unchanged.
## Environment
- Required: `JUST_ONE_API_TOKEN`
- Pass the token with `--token "$JUST_ONE_API_TOKEN"`; do not paste token values into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_bilibili_get_user_detail&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_bilibili_get_user_detail&utm_content=project_link).
## Output Focus
- State the operation ID and endpoint path used, for example `getUserDetailV2` on `/api/bilibili/get-user-detail/v2`.
- Echo the required lookup scope (`uid`) before summarizing results.
- Prioritize fields that support this endpoint purpose: Get Bilibili user Profile data, including account metadata, audience metrics, and verification-related fields, for analyzing creator's profile, level, and verification status and verifying user identity and social presence on bilibili.
- Return raw JSON only after the short, endpoint-specific summary.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/bilibili/get-user-detail/v2 for Bilibili User Profile through JustOneAPI with uid.",
"displayName": "Bilibili User Profile",
"openapi": "3.1.0",
"platformKey": "bilibili",
"primaryTag": "Bilibili",
"skillName": "justoneapi_bilibili_get_user_detail",
"slug": "justoneapi-bilibili-get-user-detail",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Bilibili user Profile data, including account metadata, audience metrics, and verification-related fields, for analyzing creator's profile, level, and verification status and verifying user identity and social presence on bilibili.",
"method": "GET",
"operationId": "getUserDetailV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Bilibili User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
}
],
"path": "/api/bilibili/get-user-detail/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Bilibili"
]
}
],
"endpointPath": "get-user-detail",
"skillType": "interface"
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/bilibili/get-user-detail/v2 for Bilibili User Profile through JustOneAPI with uid.",
"displayName": "Bilibili User Profile",
"endpointPath": "get-user-detail",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Bilibili user Profile data, including account metadata, audience metrics, and verification-related fields, for analyzing creator's profile, level, and verification status and verifying user identity and social presence on bilibili.",
"method": "GET",
"operationId": "getUserDetailV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Bilibili User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
}
],
"path": "/api/bilibili/get-user-detail/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Bilibili"
]
}
],
"platformKey": "bilibili",
"primaryTag": "Bilibili",
"skillName": "justoneapi_bilibili_get_user_detail",
"skillType": "interface",
"slug": "justoneapi-bilibili-get-user-detail",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Bilibili User Profile operations
Generated from JustOneAPI OpenAPI for platform key `bilibili`.
Endpoint group: `get-user-detail`.
## `getUserDetailV2`
- Method: `GET`
- Path: `/api/bilibili/get-user-detail/v2`
- Summary: User Profile
- Description: Get Bilibili user Profile data, including account metadata, audience metrics, and verification-related fields, for analyzing creator's profile, level, and verification status and verifying user identity and social presence on bilibili.
- Tags: `Bilibili`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for the API. |
| `uid` | `query` | yes | `string` | n/a | Bilibili User ID (UID). |
### Request body
No request body.
### Responses
- `200`: OK
Call GET /api/beike/get-ershoufang-list/v1 for Beike Resale Housing List through JustOneAPI with cityId.
---
name: Beike Resale Housing List API
description: Call GET /api/beike/get-ershoufang-list/v1 for Beike Resale Housing List through JustOneAPI with cityId.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_beike_get_ershoufang_list"}}
---
# Beike Resale Housing List
Use this focused JustOneAPI skill for resale Housing List in Beike. It targets `GET /api/beike/get-ershoufang-list/v1`. Required non-token inputs are `cityId`. OpenAPI describes it as: Get Beike resale Housing List data, including - Supports filtering by city/region, price range, and layout, for building search result pages for property portals and aggregating market data for regional housing trends.
## Endpoint Scope
- Platform key: `beike`
- Endpoint key: `get-ershoufang-list`
- Platform family: Beike
- Skill slug: `justoneapi-beike-get-ershoufang-list`
| Operation | Version | Method | Path | OpenAPI summary |
| --- | --- | --- | --- | --- |
| `getErshoufangListV1` | `v1` | `GET` | `/api/beike/get-ershoufang-list/v1` | Resale Housing List |
## Inputs
| Parameter | In | Required by | Optional by | Type | Notes |
| --- | --- | --- | --- | --- | --- |
| `cityId` | `query` | all | n/a | `string` | The ID of the city (e.g., '110000' for Beijing) |
| `condition` | `query` | n/a | all | `string` | Filter conditions (e.g., region, price range, layout) |
| `offset` | `query` | n/a | all | `integer` | Pagination offset, starting from 0 (e.g., 0, 20, 40...) |
Request body: none documented; send parameters through path or query arguments.
## Version Choice
Use `getErshoufangListV1` for the documented `v1` endpoint. There are no alternate versions grouped in this skill.
## Run This Endpoint
Supported operation IDs in this skill: `getErshoufangListV1`.
```bash
node {baseDir}/bin/run.mjs --operation "getErshoufangListV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"cityId":"<cityId>"}'
```
Ask for any missing required parameter before calling the helper. Keep user-provided IDs, cursors, keywords, and filters unchanged.
## Environment
- Required: `JUST_ONE_API_TOKEN`
- Pass the token with `--token "$JUST_ONE_API_TOKEN"`; do not paste token values into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_beike_get_ershoufang_list&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_beike_get_ershoufang_list&utm_content=project_link).
## Output Focus
- State the operation ID and endpoint path used, for example `getErshoufangListV1` on `/api/beike/get-ershoufang-list/v1`.
- Echo the required lookup scope (`cityId`) before summarizing results.
- Prioritize fields that support this endpoint purpose: Get Beike resale Housing List data, including - Supports filtering by city/region, price range, and layout, for building search result pages for property portals and aggregating market data for regional housing trends.
- Return raw JSON only after the short, endpoint-specific summary.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/beike/get-ershoufang-list/v1 for Beike Resale Housing List through JustOneAPI with cityId.",
"displayName": "Beike Resale Housing List",
"openapi": "3.1.0",
"platformKey": "beike",
"primaryTag": "Beike",
"skillName": "justoneapi_beike_get_ershoufang_list",
"slug": "justoneapi-beike-get-ershoufang-list",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Beike resale Housing List data, including - Supports filtering by city/region, price range, and layout, for building search result pages for property portals and aggregating market data for regional housing trends.",
"method": "GET",
"operationId": "getErshoufangListV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The ID of the city (e.g., '110000' for Beijing).",
"enumValues": [],
"location": "query",
"name": "cityId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Filter conditions (e.g., region, price range, layout).",
"enumValues": [],
"location": "query",
"name": "condition",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Pagination offset, starting from 0 (e.g., 0, 20, 40...).",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/beike/get-ershoufang-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Resale Housing List",
"tags": [
"Beike"
]
}
],
"endpointPath": "get-ershoufang-list",
"skillType": "interface"
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/beike/get-ershoufang-list/v1 for Beike Resale Housing List through JustOneAPI with cityId.",
"displayName": "Beike Resale Housing List",
"endpointPath": "get-ershoufang-list",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Beike resale Housing List data, including - Supports filtering by city/region, price range, and layout, for building search result pages for property portals and aggregating market data for regional housing trends.",
"method": "GET",
"operationId": "getErshoufangListV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The ID of the city (e.g., '110000' for Beijing).",
"enumValues": [],
"location": "query",
"name": "cityId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Filter conditions (e.g., region, price range, layout).",
"enumValues": [],
"location": "query",
"name": "condition",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Pagination offset, starting from 0 (e.g., 0, 20, 40...).",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/beike/get-ershoufang-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Resale Housing List",
"tags": [
"Beike"
]
}
],
"platformKey": "beike",
"primaryTag": "Beike",
"skillName": "justoneapi_beike_get_ershoufang_list",
"skillType": "interface",
"slug": "justoneapi-beike-get-ershoufang-list",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Beike Resale Housing List operations
Generated from JustOneAPI OpenAPI for platform key `beike`.
Endpoint group: `get-ershoufang-list`.
## `getErshoufangListV1`
- Method: `GET`
- Path: `/api/beike/get-ershoufang-list/v1`
- Summary: Resale Housing List
- Description: Get Beike resale Housing List data, including - Supports filtering by city/region, price range, and layout, for building search result pages for property portals and aggregating market data for regional housing trends.
- Tags: `Beike`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `cityId` | `query` | yes | `string` | n/a | The ID of the city (e.g., '110000' for Beijing). |
| `condition` | `query` | no | `string` | n/a | Filter conditions (e.g., region, price range, layout). |
| `offset` | `query` | no | `integer` | `0` | Pagination offset, starting from 0 (e.g., 0, 20, 40...). |
### Request body
No request body.
### Responses
- `200`: OK
Call GET /api/beike/ershoufang/detail/v1 for Beike Resale Housing Details through JustOneAPI with cityId and houseCode.
---
name: Beike Resale Housing Details API
description: Call GET /api/beike/ershoufang/detail/v1 for Beike Resale Housing Details through JustOneAPI with cityId and houseCode.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_beike_ershoufang_detail"}}
---
# Beike Resale Housing Details
Use this focused JustOneAPI skill for resale Housing Details in Beike. It targets `GET /api/beike/ershoufang/detail/v1`. Required non-token inputs are `cityId` and `houseCode`. OpenAPI describes it as: Get Beike resale Housing Details data, including - Pricing (total and unit price), Physical attributes (area, and layout, for displaying a full property profile to users and detailed price comparison between specific listings.
## Endpoint Scope
- Platform key: `beike`
- Endpoint key: `ershoufang/detail`
- Platform family: Beike
- Skill slug: `justoneapi-beike-ershoufang-detail`
| Operation | Version | Method | Path | OpenAPI summary |
| --- | --- | --- | --- | --- |
| `ershoufangDetailV1` | `v1` | `GET` | `/api/beike/ershoufang/detail/v1` | Resale Housing Details |
## Inputs
| Parameter | In | Required by | Optional by | Type | Notes |
| --- | --- | --- | --- | --- | --- |
| `cityId` | `query` | all | n/a | `string` | The ID of the city (e.g., '110000' for Beijing) |
| `houseCode` | `query` | all | n/a | `string` | The unique identifier for the property listing |
Request body: none documented; send parameters through path or query arguments.
## Version Choice
Use `ershoufangDetailV1` for the documented `v1` endpoint. There are no alternate versions grouped in this skill.
## Run This Endpoint
Supported operation IDs in this skill: `ershoufangDetailV1`.
```bash
node {baseDir}/bin/run.mjs --operation "ershoufangDetailV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"cityId":"<cityId>","houseCode":"<houseCode>"}'
```
Ask for any missing required parameter before calling the helper. Keep user-provided IDs, cursors, keywords, and filters unchanged.
## Environment
- Required: `JUST_ONE_API_TOKEN`
- Pass the token with `--token "$JUST_ONE_API_TOKEN"`; do not paste token values into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_beike_ershoufang_detail&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_beike_ershoufang_detail&utm_content=project_link).
## Output Focus
- State the operation ID and endpoint path used, for example `ershoufangDetailV1` on `/api/beike/ershoufang/detail/v1`.
- Echo the required lookup scope (`cityId` and `houseCode`) before summarizing results.
- Prioritize fields that support this endpoint purpose: Get Beike resale Housing Details data, including - Pricing (total and unit price), Physical attributes (area, and layout, for displaying a full property profile to users and detailed price comparison between specific listings.
- Return raw JSON only after the short, endpoint-specific summary.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/beike/ershoufang/detail/v1 for Beike Resale Housing Details through JustOneAPI with cityId and houseCode.",
"displayName": "Beike Resale Housing Details",
"openapi": "3.1.0",
"platformKey": "beike",
"primaryTag": "Beike",
"skillName": "justoneapi_beike_ershoufang_detail",
"slug": "justoneapi-beike-ershoufang-detail",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Beike resale Housing Details data, including - Pricing (total and unit price), Physical attributes (area, and layout, for displaying a full property profile to users and detailed price comparison between specific listings.",
"method": "GET",
"operationId": "ershoufangDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The ID of the city (e.g., '110000' for Beijing).",
"enumValues": [],
"location": "query",
"name": "cityId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier for the property listing.",
"enumValues": [],
"location": "query",
"name": "houseCode",
"required": true,
"schemaType": "string"
}
],
"path": "/api/beike/ershoufang/detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Resale Housing Details",
"tags": [
"Beike"
]
}
],
"endpointPath": "ershoufang/detail",
"skillType": "interface"
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/beike/ershoufang/detail/v1 for Beike Resale Housing Details through JustOneAPI with cityId and houseCode.",
"displayName": "Beike Resale Housing Details",
"endpointPath": "ershoufang/detail",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Beike resale Housing Details data, including - Pricing (total and unit price), Physical attributes (area, and layout, for displaying a full property profile to users and detailed price comparison between specific listings.",
"method": "GET",
"operationId": "ershoufangDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The ID of the city (e.g., '110000' for Beijing).",
"enumValues": [],
"location": "query",
"name": "cityId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier for the property listing.",
"enumValues": [],
"location": "query",
"name": "houseCode",
"required": true,
"schemaType": "string"
}
],
"path": "/api/beike/ershoufang/detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Resale Housing Details",
"tags": [
"Beike"
]
}
],
"platformKey": "beike",
"primaryTag": "Beike",
"skillName": "justoneapi_beike_ershoufang_detail",
"skillType": "interface",
"slug": "justoneapi-beike-ershoufang-detail",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Beike Resale Housing Details operations
Generated from JustOneAPI OpenAPI for platform key `beike`.
Endpoint group: `ershoufang/detail`.
## `ershoufangDetailV1`
- Method: `GET`
- Path: `/api/beike/ershoufang/detail/v1`
- Summary: Resale Housing Details
- Description: Get Beike resale Housing Details data, including - Pricing (total and unit price), Physical attributes (area, and layout, for displaying a full property profile to users and detailed price comparison between specific listings.
- Tags: `Beike`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `cityId` | `query` | yes | `string` | n/a | The ID of the city (e.g., '110000' for Beijing). |
| `houseCode` | `query` | yes | `string` | n/a | The unique identifier for the property listing. |
### Request body
No request body.
### Responses
- `200`: OK
Call GET /api/beike/community/list/v1 for Beike Community List through JustOneAPI with cityId.
---
name: Beike Community List API
description: Call GET /api/beike/community/list/v1 for Beike Community List through JustOneAPI with cityId.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_beike_community_list"}}
---
# Beike Community List
Use this focused JustOneAPI skill for community List in Beike. It targets `GET /api/beike/community/list/v1`. Required non-token inputs are `cityId`. OpenAPI describes it as: Get Beike community List data, including - Community name and unique ID and Average listing price and historical price trends, for identifying popular residential areas in a city and comparing average housing prices across different communities.
## Endpoint Scope
- Platform key: `beike`
- Endpoint key: `community/list`
- Platform family: Beike
- Skill slug: `justoneapi-beike-community-list`
| Operation | Version | Method | Path | OpenAPI summary |
| --- | --- | --- | --- | --- |
| `communityListV1` | `v1` | `GET` | `/api/beike/community/list/v1` | Community List |
## Inputs
| Parameter | In | Required by | Optional by | Type | Notes |
| --- | --- | --- | --- | --- | --- |
| `cityId` | `query` | all | n/a | `string` | The ID of the city (e.g., '110000' for Beijing) |
| `condition` | `query` | n/a | all | `string` | Filter conditions for communities |
| `limitOffset` | `query` | n/a | all | `integer` | Pagination offset, starting from 0 (e.g., 0, 20, 40...) |
Request body: none documented; send parameters through path or query arguments.
## Version Choice
Use `communityListV1` for the documented `v1` endpoint. There are no alternate versions grouped in this skill.
## Run This Endpoint
Supported operation IDs in this skill: `communityListV1`.
```bash
node {baseDir}/bin/run.mjs --operation "communityListV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"cityId":"<cityId>"}'
```
Ask for any missing required parameter before calling the helper. Keep user-provided IDs, cursors, keywords, and filters unchanged.
## Environment
- Required: `JUST_ONE_API_TOKEN`
- Pass the token with `--token "$JUST_ONE_API_TOKEN"`; do not paste token values into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_beike_community_list&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_beike_community_list&utm_content=project_link).
## Output Focus
- State the operation ID and endpoint path used, for example `communityListV1` on `/api/beike/community/list/v1`.
- Echo the required lookup scope (`cityId`) before summarizing results.
- Prioritize fields that support this endpoint purpose: Get Beike community List data, including - Community name and unique ID and Average listing price and historical price trends, for identifying popular residential areas in a city and comparing average housing prices across different communities.
- Return raw JSON only after the short, endpoint-specific summary.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/beike/community/list/v1 for Beike Community List through JustOneAPI with cityId.",
"displayName": "Beike Community List",
"openapi": "3.1.0",
"platformKey": "beike",
"primaryTag": "Beike",
"skillName": "justoneapi_beike_community_list",
"slug": "justoneapi-beike-community-list",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Beike community List data, including - Community name and unique ID and Average listing price and historical price trends, for identifying popular residential areas in a city and comparing average housing prices across different communities.",
"method": "GET",
"operationId": "communityListV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The ID of the city (e.g., '110000' for Beijing).",
"enumValues": [],
"location": "query",
"name": "cityId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Filter conditions for communities.",
"enumValues": [],
"location": "query",
"name": "condition",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Pagination offset, starting from 0 (e.g., 0, 20, 40...).",
"enumValues": [],
"location": "query",
"name": "limitOffset",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/beike/community/list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Community List",
"tags": [
"Beike"
]
}
],
"endpointPath": "community/list",
"skillType": "interface"
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/beike/community/list/v1 for Beike Community List through JustOneAPI with cityId.",
"displayName": "Beike Community List",
"endpointPath": "community/list",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Beike community List data, including - Community name and unique ID and Average listing price and historical price trends, for identifying popular residential areas in a city and comparing average housing prices across different communities.",
"method": "GET",
"operationId": "communityListV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The ID of the city (e.g., '110000' for Beijing).",
"enumValues": [],
"location": "query",
"name": "cityId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Filter conditions for communities.",
"enumValues": [],
"location": "query",
"name": "condition",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Pagination offset, starting from 0 (e.g., 0, 20, 40...).",
"enumValues": [],
"location": "query",
"name": "limitOffset",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/beike/community/list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Community List",
"tags": [
"Beike"
]
}
],
"platformKey": "beike",
"primaryTag": "Beike",
"skillName": "justoneapi_beike_community_list",
"skillType": "interface",
"slug": "justoneapi-beike-community-list",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Beike Community List operations
Generated from JustOneAPI OpenAPI for platform key `beike`.
Endpoint group: `community/list`.
## `communityListV1`
- Method: `GET`
- Path: `/api/beike/community/list/v1`
- Summary: Community List
- Description: Get Beike community List data, including - Community name and unique ID and Average listing price and historical price trends, for identifying popular residential areas in a city and comparing average housing prices across different communities.
- Tags: `Beike`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `cityId` | `query` | yes | `string` | n/a | The ID of the city (e.g., '110000' for Beijing). |
| `condition` | `query` | no | `string` | n/a | Filter conditions for communities. |
| `limitOffset` | `query` | no | `integer` | `0` | Pagination offset, starting from 0 (e.g., 0, 20, 40...). |
### Request body
No request body.
### Responses
- `200`: OK
Call GET /api/amazon/get-product-top-reviews/v1 for Amazon Product Top Reviews through JustOneAPI with asin.
---
name: Amazon Product Top Reviews API
description: Call GET /api/amazon/get-product-top-reviews/v1 for Amazon Product Top Reviews through JustOneAPI with asin.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_amazon_get_product_top_reviews"}}
---
# Amazon Product Top Reviews
Use this focused JustOneAPI skill for product Top Reviews in Amazon. It targets `GET /api/amazon/get-product-top-reviews/v1`. Required non-token inputs are `asin`. OpenAPI describes it as: Get Amazon product Top Reviews data, including most helpful) public reviews, for sentiment analysis and consumer feedback tracking, product research and quality assessment, and monitoring competitor customer experience.
## Endpoint Scope
- Platform key: `amazon`
- Endpoint key: `get-product-top-reviews`
- Platform family: Amazon
- Skill slug: `justoneapi-amazon-get-product-top-reviews`
| Operation | Version | Method | Path | OpenAPI summary |
| --- | --- | --- | --- | --- |
| `getProductTopReviewsV1` | `v1` | `GET` | `/api/amazon/get-product-top-reviews/v1` | Product Top Reviews |
## Inputs
| Parameter | In | Required by | Optional by | Type | Notes |
| --- | --- | --- | --- | --- | --- |
| `asin` | `query` | all | n/a | `string` | ASIN (Amazon Standard Identification Number) |
| `country` | `query` | n/a | all | `string` | Country code for the Amazon product. Available Values: - `US`: United States - `AU`: Australia - `BR`: Brazil - `CA`: Canada - `CN`: China - `FR`: France - `DE`: Germany - `IN`: India - `IT`: Italy - `MX`: Mexico - `NL`: Netherlands - `SG`: Singapore - `ES`: Spain - `TR`: Turkey - `AE`: United Arab Emirates - `GB`: United Kingdom - `JP`: Japan - `SA`: Saudi Arabia - `PL`: Poland - `SE`: Sweden - `BE`: Belgium - `EG`: Egypt - `ZA`: South Africa - `IE`: Ireland |
| `country` enum | values | n/a | n/a | n/a | `AE`, `AU`, `BE`, `BR`, `CA`, `CN`, `DE`, `EG`, `ES`, `FR`, `GB`, `IE`, `IN`, `IT`, `JP`, `MX`, `NL`, `PL`, `SA`, `SE`, `SG`, `TR`, `US`, `ZA` |
Request body: none documented; send parameters through path or query arguments.
## Version Choice
Use `getProductTopReviewsV1` for the documented `v1` endpoint. There are no alternate versions grouped in this skill.
## Run This Endpoint
Supported operation IDs in this skill: `getProductTopReviewsV1`.
```bash
node {baseDir}/bin/run.mjs --operation "getProductTopReviewsV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"asin":"<asin>"}'
```
Ask for any missing required parameter before calling the helper. Keep user-provided IDs, cursors, keywords, and filters unchanged.
## Environment
- Required: `JUST_ONE_API_TOKEN`
- Pass the token with `--token "$JUST_ONE_API_TOKEN"`; do not paste token values into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_amazon_get_product_top_reviews&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_amazon_get_product_top_reviews&utm_content=project_link).
## Output Focus
- State the operation ID and endpoint path used, for example `getProductTopReviewsV1` on `/api/amazon/get-product-top-reviews/v1`.
- Echo the required lookup scope (`asin`) before summarizing results.
- Prioritize fields that support this endpoint purpose: Get Amazon product Top Reviews data, including most helpful) public reviews, for sentiment analysis and consumer feedback tracking, product research and quality assessment, and monitoring competitor customer experience.
- Return raw JSON only after the short, endpoint-specific summary.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/amazon/get-product-top-reviews/v1 for Amazon Product Top Reviews through JustOneAPI with asin.",
"displayName": "Amazon Product Top Reviews",
"openapi": "3.1.0",
"platformKey": "amazon",
"primaryTag": "Amazon",
"skillName": "justoneapi_amazon_get_product_top_reviews",
"slug": "justoneapi-amazon-get-product-top-reviews",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Amazon product Top Reviews data, including most helpful) public reviews, for sentiment analysis and consumer feedback tracking, product research and quality assessment, and monitoring competitor customer experience.",
"method": "GET",
"operationId": "getProductTopReviewsV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "ASIN (Amazon Standard Identification Number).",
"enumValues": [],
"location": "query",
"name": "asin",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Country code for the Amazon product.\n\nAvailable Values:\n- `US`: United States\n- `AU`: Australia\n- `BR`: Brazil\n- `CA`: Canada\n- `CN`: China\n- `FR`: France\n- `DE`: Germany\n- `IN`: India\n- `IT`: Italy\n- `MX`: Mexico\n- `NL`: Netherlands\n- `SG`: Singapore\n- `ES`: Spain\n- `TR`: Turkey\n- `AE`: United Arab Emirates\n- `GB`: United Kingdom\n- `JP`: Japan\n- `SA`: Saudi Arabia\n- `PL`: Poland\n- `SE`: Sweden\n- `BE`: Belgium\n- `EG`: Egypt\n- `ZA`: South Africa\n- `IE`: Ireland",
"enumValues": [
"US",
"AU",
"BR",
"CA",
"CN",
"FR",
"DE",
"IN",
"IT",
"MX",
"NL",
"SG",
"ES",
"TR",
"AE",
"GB",
"JP",
"SA",
"PL",
"SE",
"BE",
"EG",
"ZA",
"IE"
],
"location": "query",
"name": "country",
"required": false,
"schemaType": "string"
}
],
"path": "/api/amazon/get-product-top-reviews/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Top Reviews",
"tags": [
"Amazon"
]
}
],
"endpointPath": "get-product-top-reviews",
"skillType": "interface"
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/amazon/get-product-top-reviews/v1 for Amazon Product Top Reviews through JustOneAPI with asin.",
"displayName": "Amazon Product Top Reviews",
"endpointPath": "get-product-top-reviews",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Amazon product Top Reviews data, including most helpful) public reviews, for sentiment analysis and consumer feedback tracking, product research and quality assessment, and monitoring competitor customer experience.",
"method": "GET",
"operationId": "getProductTopReviewsV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "ASIN (Amazon Standard Identification Number).",
"enumValues": [],
"location": "query",
"name": "asin",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Country code for the Amazon product.\n\nAvailable Values:\n- `US`: United States\n- `AU`: Australia\n- `BR`: Brazil\n- `CA`: Canada\n- `CN`: China\n- `FR`: France\n- `DE`: Germany\n- `IN`: India\n- `IT`: Italy\n- `MX`: Mexico\n- `NL`: Netherlands\n- `SG`: Singapore\n- `ES`: Spain\n- `TR`: Turkey\n- `AE`: United Arab Emirates\n- `GB`: United Kingdom\n- `JP`: Japan\n- `SA`: Saudi Arabia\n- `PL`: Poland\n- `SE`: Sweden\n- `BE`: Belgium\n- `EG`: Egypt\n- `ZA`: South Africa\n- `IE`: Ireland",
"enumValues": [
"US",
"AU",
"BR",
"CA",
"CN",
"FR",
"DE",
"IN",
"IT",
"MX",
"NL",
"SG",
"ES",
"TR",
"AE",
"GB",
"JP",
"SA",
"PL",
"SE",
"BE",
"EG",
"ZA",
"IE"
],
"location": "query",
"name": "country",
"required": false,
"schemaType": "string"
}
],
"path": "/api/amazon/get-product-top-reviews/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Top Reviews",
"tags": [
"Amazon"
]
}
],
"platformKey": "amazon",
"primaryTag": "Amazon",
"skillName": "justoneapi_amazon_get_product_top_reviews",
"skillType": "interface",
"slug": "justoneapi-amazon-get-product-top-reviews",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Amazon Product Top Reviews operations
Generated from JustOneAPI OpenAPI for platform key `amazon`.
Endpoint group: `get-product-top-reviews`.
## `getProductTopReviewsV1`
- Method: `GET`
- Path: `/api/amazon/get-product-top-reviews/v1`
- Summary: Product Top Reviews
- Description: Get Amazon product Top Reviews data, including most helpful) public reviews, for sentiment analysis and consumer feedback tracking, product research and quality assessment, and monitoring competitor customer experience.
- Tags: `Amazon`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token for this API service. |
| `asin` | `query` | yes | `string` | n/a | ASIN (Amazon Standard Identification Number). |
| `country` | `query` | no | `string` | `US` | Country code for the Amazon product.
Available Values:
- `US`: United States
- `AU`: Australia
- `BR`: Brazil
- `CA`: Canada
- `CN`: China
- `FR`: France
- `DE`: Germany
- `IN`: India
- `IT`: Italy
- `MX`: Mexico
- `NL`: Netherlands
- `SG`: Singapore
- `ES`: Spain
- `TR`: Turkey
- `AE`: United Arab Emirates
- `GB`: United Kingdom
- `JP`: Japan
- `SA`: Saudi Arabia
- `PL`: Poland
- `SE`: Sweden
- `BE`: Belgium
- `EG`: Egypt
- `ZA`: South Africa
- `IE`: Ireland |
| enum | values | no | n/a | n/a | `US`, `AU`, `BR`, `CA`, `CN`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `SG`, `ES`, `TR`, `AE`, `GB`, `JP`, `SA`, `PL`, `SE`, `BE`, `EG`, `ZA`, `IE` |
### Request body
No request body.
### Responses
- `200`: OK
Call GET /api/amazon/get-product-detail/v1 for Amazon Product Details through JustOneAPI with asin.
---
name: Amazon Product Details API
description: Call GET /api/amazon/get-product-detail/v1 for Amazon Product Details through JustOneAPI with asin.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_amazon_get_product_detail"}}
---
# Amazon Product Details
Use this focused JustOneAPI skill for product Details in Amazon. It targets `GET /api/amazon/get-product-detail/v1`. Required non-token inputs are `asin`. OpenAPI describes it as: Get Amazon product Details data, including title, brand, and price, for building product catalogs and enriching item content (e.g., images), price monitoring and availability tracking, and e-commerce analytics and competitor tracking.
## Endpoint Scope
- Platform key: `amazon`
- Endpoint key: `get-product-detail`
- Platform family: Amazon
- Skill slug: `justoneapi-amazon-get-product-detail`
| Operation | Version | Method | Path | OpenAPI summary |
| --- | --- | --- | --- | --- |
| `getAmazonProductDetailV1` | `v1` | `GET` | `/api/amazon/get-product-detail/v1` | Product Details |
## Inputs
| Parameter | In | Required by | Optional by | Type | Notes |
| --- | --- | --- | --- | --- | --- |
| `asin` | `query` | all | n/a | `string` | ASIN (Amazon Standard Identification Number) |
| `country` | `query` | n/a | all | `string` | Country code for the Amazon product. Available Values: - `US`: United States - `AU`: Australia - `BR`: Brazil - `CA`: Canada - `CN`: China - `FR`: France - `DE`: Germany - `IN`: India - `IT`: Italy - `MX`: Mexico - `NL`: Netherlands - `SG`: Singapore - `ES`: Spain - `TR`: Turkey - `AE`: United Arab Emirates - `GB`: United Kingdom - `JP`: Japan - `SA`: Saudi Arabia - `PL`: Poland - `SE`: Sweden - `BE`: Belgium - `EG`: Egypt - `ZA`: South Africa - `IE`: Ireland |
| `country` enum | values | n/a | n/a | n/a | `AE`, `AU`, `BE`, `BR`, `CA`, `CN`, `DE`, `EG`, `ES`, `FR`, `GB`, `IE`, `IN`, `IT`, `JP`, `MX`, `NL`, `PL`, `SA`, `SE`, `SG`, `TR`, `US`, `ZA` |
Request body: none documented; send parameters through path or query arguments.
## Version Choice
Use `getAmazonProductDetailV1` for the documented `v1` endpoint. There are no alternate versions grouped in this skill.
## Run This Endpoint
Supported operation IDs in this skill: `getAmazonProductDetailV1`.
```bash
node {baseDir}/bin/run.mjs --operation "getAmazonProductDetailV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"asin":"<asin>"}'
```
Ask for any missing required parameter before calling the helper. Keep user-provided IDs, cursors, keywords, and filters unchanged.
## Environment
- Required: `JUST_ONE_API_TOKEN`
- Pass the token with `--token "$JUST_ONE_API_TOKEN"`; do not paste token values into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_amazon_get_product_detail&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_amazon_get_product_detail&utm_content=project_link).
## Output Focus
- State the operation ID and endpoint path used, for example `getAmazonProductDetailV1` on `/api/amazon/get-product-detail/v1`.
- Echo the required lookup scope (`asin`) before summarizing results.
- Prioritize fields that support this endpoint purpose: Get Amazon product Details data, including title, brand, and price, for building product catalogs and enriching item content (e.g., images), price monitoring and availability tracking, and e-commerce analytics and competitor tracking.
- Return raw JSON only after the short, endpoint-specific summary.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/amazon/get-product-detail/v1 for Amazon Product Details through JustOneAPI with asin.",
"displayName": "Amazon Product Details",
"openapi": "3.1.0",
"platformKey": "amazon",
"primaryTag": "Amazon",
"skillName": "justoneapi_amazon_get_product_detail",
"slug": "justoneapi-amazon-get-product-detail",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Amazon product Details data, including title, brand, and price, for building product catalogs and enriching item content (e.g., images), price monitoring and availability tracking, and e-commerce analytics and competitor tracking.",
"method": "GET",
"operationId": "getAmazonProductDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "ASIN (Amazon Standard Identification Number).",
"enumValues": [],
"location": "query",
"name": "asin",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Country code for the Amazon product.\n\nAvailable Values:\n- `US`: United States\n- `AU`: Australia\n- `BR`: Brazil\n- `CA`: Canada\n- `CN`: China\n- `FR`: France\n- `DE`: Germany\n- `IN`: India\n- `IT`: Italy\n- `MX`: Mexico\n- `NL`: Netherlands\n- `SG`: Singapore\n- `ES`: Spain\n- `TR`: Turkey\n- `AE`: United Arab Emirates\n- `GB`: United Kingdom\n- `JP`: Japan\n- `SA`: Saudi Arabia\n- `PL`: Poland\n- `SE`: Sweden\n- `BE`: Belgium\n- `EG`: Egypt\n- `ZA`: South Africa\n- `IE`: Ireland",
"enumValues": [
"US",
"AU",
"BR",
"CA",
"CN",
"FR",
"DE",
"IN",
"IT",
"MX",
"NL",
"SG",
"ES",
"TR",
"AE",
"GB",
"JP",
"SA",
"PL",
"SE",
"BE",
"EG",
"ZA",
"IE"
],
"location": "query",
"name": "country",
"required": false,
"schemaType": "string"
}
],
"path": "/api/amazon/get-product-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Amazon"
]
}
],
"endpointPath": "get-product-detail",
"skillType": "interface"
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/amazon/get-product-detail/v1 for Amazon Product Details through JustOneAPI with asin.",
"displayName": "Amazon Product Details",
"endpointPath": "get-product-detail",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Amazon product Details data, including title, brand, and price, for building product catalogs and enriching item content (e.g., images), price monitoring and availability tracking, and e-commerce analytics and competitor tracking.",
"method": "GET",
"operationId": "getAmazonProductDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "ASIN (Amazon Standard Identification Number).",
"enumValues": [],
"location": "query",
"name": "asin",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Country code for the Amazon product.\n\nAvailable Values:\n- `US`: United States\n- `AU`: Australia\n- `BR`: Brazil\n- `CA`: Canada\n- `CN`: China\n- `FR`: France\n- `DE`: Germany\n- `IN`: India\n- `IT`: Italy\n- `MX`: Mexico\n- `NL`: Netherlands\n- `SG`: Singapore\n- `ES`: Spain\n- `TR`: Turkey\n- `AE`: United Arab Emirates\n- `GB`: United Kingdom\n- `JP`: Japan\n- `SA`: Saudi Arabia\n- `PL`: Poland\n- `SE`: Sweden\n- `BE`: Belgium\n- `EG`: Egypt\n- `ZA`: South Africa\n- `IE`: Ireland",
"enumValues": [
"US",
"AU",
"BR",
"CA",
"CN",
"FR",
"DE",
"IN",
"IT",
"MX",
"NL",
"SG",
"ES",
"TR",
"AE",
"GB",
"JP",
"SA",
"PL",
"SE",
"BE",
"EG",
"ZA",
"IE"
],
"location": "query",
"name": "country",
"required": false,
"schemaType": "string"
}
],
"path": "/api/amazon/get-product-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Amazon"
]
}
],
"platformKey": "amazon",
"primaryTag": "Amazon",
"skillName": "justoneapi_amazon_get_product_detail",
"skillType": "interface",
"slug": "justoneapi-amazon-get-product-detail",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Amazon Product Details operations
Generated from JustOneAPI OpenAPI for platform key `amazon`.
Endpoint group: `get-product-detail`.
## `getAmazonProductDetailV1`
- Method: `GET`
- Path: `/api/amazon/get-product-detail/v1`
- Summary: Product Details
- Description: Get Amazon product Details data, including title, brand, and price, for building product catalogs and enriching item content (e.g., images), price monitoring and availability tracking, and e-commerce analytics and competitor tracking.
- Tags: `Amazon`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token for this API service. |
| `asin` | `query` | yes | `string` | n/a | ASIN (Amazon Standard Identification Number). |
| `country` | `query` | no | `string` | `US` | Country code for the Amazon product.
Available Values:
- `US`: United States
- `AU`: Australia
- `BR`: Brazil
- `CA`: Canada
- `CN`: China
- `FR`: France
- `DE`: Germany
- `IN`: India
- `IT`: Italy
- `MX`: Mexico
- `NL`: Netherlands
- `SG`: Singapore
- `ES`: Spain
- `TR`: Turkey
- `AE`: United Arab Emirates
- `GB`: United Kingdom
- `JP`: Japan
- `SA`: Saudi Arabia
- `PL`: Poland
- `SE`: Sweden
- `BE`: Belgium
- `EG`: Egypt
- `ZA`: South Africa
- `IE`: Ireland |
| enum | values | no | n/a | n/a | `US`, `AU`, `BR`, `CA`, `CN`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `SG`, `ES`, `TR`, `AE`, `GB`, `JP`, `SA`, `PL`, `SE`, `BE`, `EG`, `ZA`, `IE` |
### Request body
No request body.
### Responses
- `200`: OK
Call GET /api/amazon/get-category-products/v1 for Amazon Products By Category through JustOneAPI with categoryId.
---
name: Amazon Products By Category API
description: Call GET /api/amazon/get-category-products/v1 for Amazon Products By Category through JustOneAPI with categoryId.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_amazon_get_category_products"}}
---
# Amazon Products By Category
Use this focused JustOneAPI skill for products By Category in Amazon. It targets `GET /api/amazon/get-category-products/v1`. Required non-token inputs are `categoryId`. OpenAPI describes it as: Get Amazon products By Category data, including title, price, and rating, for category-based product discovery and returns product information such as title, price, and rating.
## Endpoint Scope
- Platform key: `amazon`
- Endpoint key: `get-category-products`
- Platform family: Amazon
- Skill slug: `justoneapi-amazon-get-category-products`
| Operation | Version | Method | Path | OpenAPI summary |
| --- | --- | --- | --- | --- |
| `getProductsByCategoryV1` | `v1` | `GET` | `/api/amazon/get-category-products/v1` | Products By Category |
## Inputs
| Parameter | In | Required by | Optional by | Type | Notes |
| --- | --- | --- | --- | --- | --- |
| `categoryId` | `query` | all | n/a | `string` | For example: https://amazon.com/s?node=172282 - the Amazon Category ID is 172282 |
| `country` | `query` | n/a | all | `string` | Country code for the Amazon product. Available Values: - `US`: United States - `AU`: Australia - `BR`: Brazil - `CA`: Canada - `CN`: China - `FR`: France - `DE`: Germany - `IN`: India - `IT`: Italy - `MX`: Mexico - `NL`: Netherlands - `SG`: Singapore - `ES`: Spain - `TR`: Turkey - `AE`: United Arab Emirates - `GB`: United Kingdom - `JP`: Japan - `SA`: Saudi Arabia - `PL`: Poland - `SE`: Sweden - `BE`: Belgium - `EG`: Egypt - `ZA`: South Africa - `IE`: Ireland |
| `country` enum | values | n/a | n/a | n/a | `AE`, `AU`, `BE`, `BR`, `CA`, `CN`, `DE`, `EG`, `ES`, `FR`, `GB`, `IE`, `IN`, `IT`, `JP`, `MX`, `NL`, `PL`, `SA`, `SE`, `SG`, `TR`, `US`, `ZA` |
| `page` | `query` | n/a | all | `integer` | Page number for pagination |
| `sortBy` | `query` | n/a | all | `string` | Sort by. Available Values: - `RELEVANCE`: Relevance - `LOWEST_PRICE`: Lowest Price - `HIGHEST_PRICE`: Highest Price - `REVIEWS`: Reviews - `NEWEST`: Newest - `BEST_SELLERS`: Best Sellers |
| `sortBy` enum | values | n/a | n/a | n/a | `BEST_SELLERS`, `HIGHEST_PRICE`, `LOWEST_PRICE`, `NEWEST`, `RELEVANCE`, `REVIEWS` |
Request body: none documented; send parameters through path or query arguments.
## Version Choice
Use `getProductsByCategoryV1` for the documented `v1` endpoint. There are no alternate versions grouped in this skill.
## Run This Endpoint
Supported operation IDs in this skill: `getProductsByCategoryV1`.
```bash
node {baseDir}/bin/run.mjs --operation "getProductsByCategoryV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"categoryId":"<categoryId>"}'
```
Ask for any missing required parameter before calling the helper. Keep user-provided IDs, cursors, keywords, and filters unchanged.
## Environment
- Required: `JUST_ONE_API_TOKEN`
- Pass the token with `--token "$JUST_ONE_API_TOKEN"`; do not paste token values into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_amazon_get_category_products&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_amazon_get_category_products&utm_content=project_link).
## Output Focus
- State the operation ID and endpoint path used, for example `getProductsByCategoryV1` on `/api/amazon/get-category-products/v1`.
- Echo the required lookup scope (`categoryId`) before summarizing results.
- Prioritize fields that support this endpoint purpose: Get Amazon products By Category data, including title, price, and rating, for category-based product discovery and returns product information such as title, price, and rating.
- Return raw JSON only after the short, endpoint-specific summary.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/amazon/get-category-products/v1 for Amazon Products By Category through JustOneAPI with categoryId.",
"displayName": "Amazon Products By Category",
"openapi": "3.1.0",
"platformKey": "amazon",
"primaryTag": "Amazon",
"skillName": "justoneapi_amazon_get_category_products",
"slug": "justoneapi-amazon-get-category-products",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Amazon products By Category data, including title, price, and rating, for category-based product discovery and returns product information such as title, price, and rating.",
"method": "GET",
"operationId": "getProductsByCategoryV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "For example: https://amazon.com/s?node=172282 - the Amazon Category ID is 172282",
"enumValues": [],
"location": "query",
"name": "categoryId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Country code for the Amazon product.\n\nAvailable Values:\n- `US`: United States\n- `AU`: Australia\n- `BR`: Brazil\n- `CA`: Canada\n- `CN`: China\n- `FR`: France\n- `DE`: Germany\n- `IN`: India\n- `IT`: Italy\n- `MX`: Mexico\n- `NL`: Netherlands\n- `SG`: Singapore\n- `ES`: Spain\n- `TR`: Turkey\n- `AE`: United Arab Emirates\n- `GB`: United Kingdom\n- `JP`: Japan\n- `SA`: Saudi Arabia\n- `PL`: Poland\n- `SE`: Sweden\n- `BE`: Belgium\n- `EG`: Egypt\n- `ZA`: South Africa\n- `IE`: Ireland",
"enumValues": [
"US",
"AU",
"BR",
"CA",
"CN",
"FR",
"DE",
"IN",
"IT",
"MX",
"NL",
"SG",
"ES",
"TR",
"AE",
"GB",
"JP",
"SA",
"PL",
"SE",
"BE",
"EG",
"ZA",
"IE"
],
"location": "query",
"name": "country",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "RELEVANCE",
"description": "Sort by.\n\nAvailable Values:\n- `RELEVANCE`: Relevance\n- `LOWEST_PRICE`: Lowest Price\n- `HIGHEST_PRICE`: Highest Price\n- `REVIEWS`: Reviews\n- `NEWEST`: Newest\n- `BEST_SELLERS`: Best Sellers",
"enumValues": [
"RELEVANCE",
"LOWEST_PRICE",
"HIGHEST_PRICE",
"REVIEWS",
"NEWEST",
"BEST_SELLERS"
],
"location": "query",
"name": "sortBy",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/amazon/get-category-products/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Products By Category",
"tags": [
"Amazon"
]
}
],
"endpointPath": "get-category-products",
"skillType": "interface"
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/amazon/get-category-products/v1 for Amazon Products By Category through JustOneAPI with categoryId.",
"displayName": "Amazon Products By Category",
"endpointPath": "get-category-products",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Amazon products By Category data, including title, price, and rating, for category-based product discovery and returns product information such as title, price, and rating.",
"method": "GET",
"operationId": "getProductsByCategoryV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "For example: https://amazon.com/s?node=172282 - the Amazon Category ID is 172282",
"enumValues": [],
"location": "query",
"name": "categoryId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Country code for the Amazon product.\n\nAvailable Values:\n- `US`: United States\n- `AU`: Australia\n- `BR`: Brazil\n- `CA`: Canada\n- `CN`: China\n- `FR`: France\n- `DE`: Germany\n- `IN`: India\n- `IT`: Italy\n- `MX`: Mexico\n- `NL`: Netherlands\n- `SG`: Singapore\n- `ES`: Spain\n- `TR`: Turkey\n- `AE`: United Arab Emirates\n- `GB`: United Kingdom\n- `JP`: Japan\n- `SA`: Saudi Arabia\n- `PL`: Poland\n- `SE`: Sweden\n- `BE`: Belgium\n- `EG`: Egypt\n- `ZA`: South Africa\n- `IE`: Ireland",
"enumValues": [
"US",
"AU",
"BR",
"CA",
"CN",
"FR",
"DE",
"IN",
"IT",
"MX",
"NL",
"SG",
"ES",
"TR",
"AE",
"GB",
"JP",
"SA",
"PL",
"SE",
"BE",
"EG",
"ZA",
"IE"
],
"location": "query",
"name": "country",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "RELEVANCE",
"description": "Sort by.\n\nAvailable Values:\n- `RELEVANCE`: Relevance\n- `LOWEST_PRICE`: Lowest Price\n- `HIGHEST_PRICE`: Highest Price\n- `REVIEWS`: Reviews\n- `NEWEST`: Newest\n- `BEST_SELLERS`: Best Sellers",
"enumValues": [
"RELEVANCE",
"LOWEST_PRICE",
"HIGHEST_PRICE",
"REVIEWS",
"NEWEST",
"BEST_SELLERS"
],
"location": "query",
"name": "sortBy",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/amazon/get-category-products/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Products By Category",
"tags": [
"Amazon"
]
}
],
"platformKey": "amazon",
"primaryTag": "Amazon",
"skillName": "justoneapi_amazon_get_category_products",
"skillType": "interface",
"slug": "justoneapi-amazon-get-category-products",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Amazon Products By Category operations
Generated from JustOneAPI OpenAPI for platform key `amazon`.
Endpoint group: `get-category-products`.
## `getProductsByCategoryV1`
- Method: `GET`
- Path: `/api/amazon/get-category-products/v1`
- Summary: Products By Category
- Description: Get Amazon products By Category data, including title, price, and rating, for category-based product discovery and returns product information such as title, price, and rating.
- Tags: `Amazon`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token for this API service. |
| `categoryId` | `query` | yes | `string` | n/a | For example: https://amazon.com/s?node=172282 - the Amazon Category ID is 172282 |
| `country` | `query` | no | `string` | `US` | Country code for the Amazon product.
Available Values:
- `US`: United States
- `AU`: Australia
- `BR`: Brazil
- `CA`: Canada
- `CN`: China
- `FR`: France
- `DE`: Germany
- `IN`: India
- `IT`: Italy
- `MX`: Mexico
- `NL`: Netherlands
- `SG`: Singapore
- `ES`: Spain
- `TR`: Turkey
- `AE`: United Arab Emirates
- `GB`: United Kingdom
- `JP`: Japan
- `SA`: Saudi Arabia
- `PL`: Poland
- `SE`: Sweden
- `BE`: Belgium
- `EG`: Egypt
- `ZA`: South Africa
- `IE`: Ireland |
| enum | values | no | n/a | n/a | `US`, `AU`, `BR`, `CA`, `CN`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `SG`, `ES`, `TR`, `AE`, `GB`, `JP`, `SA`, `PL`, `SE`, `BE`, `EG`, `ZA`, `IE` |
| `sortBy` | `query` | no | `string` | `RELEVANCE` | Sort by.
Available Values:
- `RELEVANCE`: Relevance
- `LOWEST_PRICE`: Lowest Price
- `HIGHEST_PRICE`: Highest Price
- `REVIEWS`: Reviews
- `NEWEST`: Newest
- `BEST_SELLERS`: Best Sellers |
| enum | values | no | n/a | n/a | `RELEVANCE`, `LOWEST_PRICE`, `HIGHEST_PRICE`, `REVIEWS`, `NEWEST`, `BEST_SELLERS` |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
### Request body
No request body.
### Responses
- `200`: OK
Call GET /api/amazon/get-best-sellers/v1 for Amazon Best Sellers through JustOneAPI with category.
---
name: Amazon Best Sellers API
description: Call GET /api/amazon/get-best-sellers/v1 for Amazon Best Sellers through JustOneAPI with category.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_amazon_get_best_sellers"}}
---
# Amazon Best Sellers
Use this focused JustOneAPI skill for best Sellers in Amazon. It targets `GET /api/amazon/get-best-sellers/v1`. Required non-token inputs are `category`. OpenAPI describes it as: Get Amazon best Sellers data, including rank positions, product metadata, and pricing, for identifying trending products in specific categories, market share analysis and category research, and tracking sales rank and popularity over time.
## Endpoint Scope
- Platform key: `amazon`
- Endpoint key: `get-best-sellers`
- Platform family: Amazon
- Skill slug: `justoneapi-amazon-get-best-sellers`
| Operation | Version | Method | Path | OpenAPI summary |
| --- | --- | --- | --- | --- |
| `getBestSellersV1` | `v1` | `GET` | `/api/amazon/get-best-sellers/v1` | Best Sellers |
## Inputs
| Parameter | In | Required by | Optional by | Type | Notes |
| --- | --- | --- | --- | --- | --- |
| `category` | `query` | all | n/a | `string` | Best sellers category to return products for (e.g. 'baby-products' or 'baby-products/166777011'). The value is derived from the URL path of the Amazon Best Sellers page, such as: https://www.amazon.com/Best-Sellers-Baby-Baby-Toddler-Feeding-Supplies/zgbs/baby-products/166777011 |
| `country` | `query` | n/a | all | `string` | Country code for the Amazon product. Available Values: - `US`: United States - `AU`: Australia - `BR`: Brazil - `CA`: Canada - `CN`: China - `FR`: France - `DE`: Germany - `IN`: India - `IT`: Italy - `MX`: Mexico - `NL`: Netherlands - `SG`: Singapore - `ES`: Spain - `TR`: Turkey - `AE`: United Arab Emirates - `GB`: United Kingdom - `JP`: Japan - `SA`: Saudi Arabia - `PL`: Poland - `SE`: Sweden - `BE`: Belgium - `EG`: Egypt - `ZA`: South Africa - `IE`: Ireland |
| `country` enum | values | n/a | n/a | n/a | `AE`, `AU`, `BE`, `BR`, `CA`, `CN`, `DE`, `EG`, `ES`, `FR`, `GB`, `IE`, `IN`, `IT`, `JP`, `MX`, `NL`, `PL`, `SA`, `SE`, `SG`, `TR`, `US`, `ZA` |
| `page` | `query` | n/a | all | `integer` | Page number for pagination |
Request body: none documented; send parameters through path or query arguments.
## Version Choice
Use `getBestSellersV1` for the documented `v1` endpoint. There are no alternate versions grouped in this skill.
## Run This Endpoint
Supported operation IDs in this skill: `getBestSellersV1`.
```bash
node {baseDir}/bin/run.mjs --operation "getBestSellersV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"category":"<category>"}'
```
Ask for any missing required parameter before calling the helper. Keep user-provided IDs, cursors, keywords, and filters unchanged.
## Environment
- Required: `JUST_ONE_API_TOKEN`
- Pass the token with `--token "$JUST_ONE_API_TOKEN"`; do not paste token values into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_amazon_get_best_sellers&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_amazon_get_best_sellers&utm_content=project_link).
## Output Focus
- State the operation ID and endpoint path used, for example `getBestSellersV1` on `/api/amazon/get-best-sellers/v1`.
- Echo the required lookup scope (`category`) before summarizing results.
- Prioritize fields that support this endpoint purpose: Get Amazon best Sellers data, including rank positions, product metadata, and pricing, for identifying trending products in specific categories, market share analysis and category research, and tracking sales rank and popularity over time.
- Return raw JSON only after the short, endpoint-specific summary.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/amazon/get-best-sellers/v1 for Amazon Best Sellers through JustOneAPI with category.",
"displayName": "Amazon Best Sellers",
"openapi": "3.1.0",
"platformKey": "amazon",
"primaryTag": "Amazon",
"skillName": "justoneapi_amazon_get_best_sellers",
"slug": "justoneapi-amazon-get-best-sellers",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Amazon best Sellers data, including rank positions, product metadata, and pricing, for identifying trending products in specific categories, market share analysis and category research, and tracking sales rank and popularity over time.",
"method": "GET",
"operationId": "getBestSellersV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Best sellers category to return products for (e.g. 'baby-products' or 'baby-products/166777011'). The value is derived from the URL path of the Amazon Best Sellers page, such as: https://www.amazon.com/Best-Sellers-Baby-Baby-Toddler-Feeding-Supplies/zgbs/baby-products/166777011",
"enumValues": [],
"location": "query",
"name": "category",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Country code for the Amazon product.\n\nAvailable Values:\n- `US`: United States\n- `AU`: Australia\n- `BR`: Brazil\n- `CA`: Canada\n- `CN`: China\n- `FR`: France\n- `DE`: Germany\n- `IN`: India\n- `IT`: Italy\n- `MX`: Mexico\n- `NL`: Netherlands\n- `SG`: Singapore\n- `ES`: Spain\n- `TR`: Turkey\n- `AE`: United Arab Emirates\n- `GB`: United Kingdom\n- `JP`: Japan\n- `SA`: Saudi Arabia\n- `PL`: Poland\n- `SE`: Sweden\n- `BE`: Belgium\n- `EG`: Egypt\n- `ZA`: South Africa\n- `IE`: Ireland",
"enumValues": [
"US",
"AU",
"BR",
"CA",
"CN",
"FR",
"DE",
"IN",
"IT",
"MX",
"NL",
"SG",
"ES",
"TR",
"AE",
"GB",
"JP",
"SA",
"PL",
"SE",
"BE",
"EG",
"ZA",
"IE"
],
"location": "query",
"name": "country",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/amazon/get-best-sellers/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Best Sellers",
"tags": [
"Amazon"
]
}
],
"endpointPath": "get-best-sellers",
"skillType": "interface"
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Call GET /api/amazon/get-best-sellers/v1 for Amazon Best Sellers through JustOneAPI with category.",
"displayName": "Amazon Best Sellers",
"endpointPath": "get-best-sellers",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Amazon best Sellers data, including rank positions, product metadata, and pricing, for identifying trending products in specific categories, market share analysis and category research, and tracking sales rank and popularity over time.",
"method": "GET",
"operationId": "getBestSellersV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Best sellers category to return products for (e.g. 'baby-products' or 'baby-products/166777011'). The value is derived from the URL path of the Amazon Best Sellers page, such as: https://www.amazon.com/Best-Sellers-Baby-Baby-Toddler-Feeding-Supplies/zgbs/baby-products/166777011",
"enumValues": [],
"location": "query",
"name": "category",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Country code for the Amazon product.\n\nAvailable Values:\n- `US`: United States\n- `AU`: Australia\n- `BR`: Brazil\n- `CA`: Canada\n- `CN`: China\n- `FR`: France\n- `DE`: Germany\n- `IN`: India\n- `IT`: Italy\n- `MX`: Mexico\n- `NL`: Netherlands\n- `SG`: Singapore\n- `ES`: Spain\n- `TR`: Turkey\n- `AE`: United Arab Emirates\n- `GB`: United Kingdom\n- `JP`: Japan\n- `SA`: Saudi Arabia\n- `PL`: Poland\n- `SE`: Sweden\n- `BE`: Belgium\n- `EG`: Egypt\n- `ZA`: South Africa\n- `IE`: Ireland",
"enumValues": [
"US",
"AU",
"BR",
"CA",
"CN",
"FR",
"DE",
"IN",
"IT",
"MX",
"NL",
"SG",
"ES",
"TR",
"AE",
"GB",
"JP",
"SA",
"PL",
"SE",
"BE",
"EG",
"ZA",
"IE"
],
"location": "query",
"name": "country",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/amazon/get-best-sellers/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Best Sellers",
"tags": [
"Amazon"
]
}
],
"platformKey": "amazon",
"primaryTag": "Amazon",
"skillName": "justoneapi_amazon_get_best_sellers",
"skillType": "interface",
"slug": "justoneapi-amazon-get-best-sellers",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Amazon Best Sellers operations
Generated from JustOneAPI OpenAPI for platform key `amazon`.
Endpoint group: `get-best-sellers`.
## `getBestSellersV1`
- Method: `GET`
- Path: `/api/amazon/get-best-sellers/v1`
- Summary: Best Sellers
- Description: Get Amazon best Sellers data, including rank positions, product metadata, and pricing, for identifying trending products in specific categories, market share analysis and category research, and tracking sales rank and popularity over time.
- Tags: `Amazon`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token for this API service. |
| `category` | `query` | yes | `string` | n/a | Best sellers category to return products for (e.g. 'baby-products' or 'baby-products/166777011'). The value is derived from the URL path of the Amazon Best Sellers page, such as: https://www.amazon.com/Best-Sellers-Baby-Baby-Toddler-Feeding-Supplies/zgbs/baby-products/166777011 |
| `country` | `query` | no | `string` | `US` | Country code for the Amazon product.
Available Values:
- `US`: United States
- `AU`: Australia
- `BR`: Brazil
- `CA`: Canada
- `CN`: China
- `FR`: France
- `DE`: Germany
- `IN`: India
- `IT`: Italy
- `MX`: Mexico
- `NL`: Netherlands
- `SG`: Singapore
- `ES`: Spain
- `TR`: Turkey
- `AE`: United Arab Emirates
- `GB`: United Kingdom
- `JP`: Japan
- `SA`: Saudi Arabia
- `PL`: Poland
- `SE`: Sweden
- `BE`: Belgium
- `EG`: Egypt
- `ZA`: South Africa
- `IE`: Ireland |
| enum | values | no | n/a | n/a | `US`, `AU`, `BR`, `CA`, `CN`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `SG`, `ES`, `TR`, `AE`, `GB`, `JP`, `SA`, `PL`, `SE`, `BE`, `EG`, `ZA`, `IE` |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze Douyin E-commerce workflows with JustOneAPI, including item Details.
---
name: Douyin E-commerce API
description: Analyze Douyin E-commerce workflows with JustOneAPI, including item Details.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_douyin_ec"}}
---
# Douyin E-commerce
This skill wraps 1 Douyin E-commerce operations exposed by JustOneAPI. It is strongest for item Details. Expect common inputs such as `itemId`.
## When To Use It
- The user needs item Details on Douyin E-commerce.
- The user can provide identifiers or filters such as `itemId`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `getDouyinEcItemDetailV1`: Item Details — Get Douyin E-commerce item details, including price, title, and stock, for product monitoring and competitive analysis
## Request Pattern
- 1 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `itemId`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `getDouyinEcItemDetailV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_douyin_ec&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_douyin_ec&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the Douyin E-commerce task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `getDouyinEcItemDetailV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `itemId`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Douyin E-commerce workflows with JustOneAPI, including item Details.",
"displayName": "Douyin E-commerce",
"openapi": "3.1.0",
"platformKey": "douyin-ec",
"primaryTag": "Douyin E-commerce",
"skillName": "justoneapi_douyin_ec",
"slug": "justoneapi-douyin-ec",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Douyin E-commerce item details, including price, title, and stock, for product monitoring and competitive analysis.",
"method": "GET",
"operationId": "getDouyinEcItemDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique ID of the item on Douyin E-commerce.",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/douyin-ec/get-item-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Item Details",
"tags": [
"Douyin E-commerce"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Douyin E-commerce workflows with JustOneAPI, including item Details.",
"displayName": "Douyin E-commerce",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Douyin E-commerce item details, including price, title, and stock, for product monitoring and competitive analysis.",
"method": "GET",
"operationId": "getDouyinEcItemDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique ID of the item on Douyin E-commerce.",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/douyin-ec/get-item-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Item Details",
"tags": [
"Douyin E-commerce"
]
}
],
"platformKey": "douyin-ec",
"primaryTag": "Douyin E-commerce",
"skillName": "justoneapi_douyin_ec",
"slug": "justoneapi-douyin-ec",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Douyin E-commerce operations
Generated from JustOneAPI OpenAPI for platform key `douyin-ec`.
## `getDouyinEcItemDetailV1`
- Method: `GET`
- Path: `/api/douyin-ec/get-item-detail/v1`
- Summary: Item Details
- Description: Get Douyin E-commerce item details, including price, title, and stock, for product monitoring and competitive analysis.
- Tags: `Douyin E-commerce`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | The unique ID of the item on Douyin E-commerce. |
### Request body
No request body.
### Responses
- `200`: OK
Search Zhihu topics, inspect answer lists, read column article detail, and track column article feeds through JustOneAPI.
---
name: Zhihu API
description: Search Zhihu topics, inspect answer lists, read column article detail, and track column article feeds through JustOneAPI.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_zhihu"}}
---
# Zhihu
Use this skill for Zhihu question research, answer mining, 专栏文章采集, and topic discovery. It fits analyst workflows where the user starts from a keyword, question ID, article ID, or column ID and wants structured Zhihu data rather than a high-level summary.
## When To Use It
- The user wants Zhihu keyword search, question answer extraction, or column article research.
- The task is about a specific Zhihu question, answer feed, 专栏文章, or column page.
- The user can provide `keyword`, `questionId`, `id`, `columnId`, or pagination values such as `cursor` and `offset`.
- The user needs Zhihu-native titles, content, authors, ranking context, or article metadata sourced directly from the API.
## Representative Operations
- `searchV1`: Keyword Search — Search Zhihu by keyword for topic discovery, source gathering, and question scouting.
- `getAnswerListV1`: Answer List — Pull the answer feed for a Zhihu question to inspect authors, content, and interaction signals.
- `getColumnArticleDetailV1`: Column Article Details — Read a single Zhihu column article in detail for archiving and content analysis.
- `getColumnArticleListV1`: Column Article List — Track the article feed of a Zhihu column for monitoring and collection work.
## Request Pattern
- 4 read-only `GET` operations are available in this skill.
- Common inputs are `keyword`, `questionId`, `columnId`, `id`, `cursor`, `offset`, and `order`.
- The workflow splits cleanly into search, question-answer feeds, single article detail, and column article listing.
- No operation in this skill requires a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `searchV1`, `getAnswerListV1`, `getColumnArticleDetailV1`, `getColumnArticleListV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_zhihu&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_zhihu&utm_content=project_link).
## Output Rules
- Lead with the concrete Zhihu result: matched topic, answer feed insight, article detail, or column update.
- For keyword search, restate the keyword and offset before summarizing the most relevant matches.
- For answer-list requests, surface the question scope, top authors, engagement cues, and any ordering rule before raw JSON.
- For column-article requests, extract title, author, publication context, and the most important content signals before raw JSON.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Search Zhihu topics, inspect answer lists, read column article detail, and track column article feeds through JustOneAPI.",
"displayName": "Zhihu",
"openapi": "3.1.0",
"platformKey": "zhihu",
"primaryTag": "Zhihu",
"skillName": "justoneapi_zhihu",
"slug": "justoneapi-zhihu",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Zhihu answer List data, including answer content, author profiles, and interaction metrics, for question analysis and answer research.",
"method": "GET",
"operationId": "getAnswerListV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Question ID",
"enumValues": [],
"location": "query",
"name": "questionId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Pagination cursor from previous result.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Start offset, begins with 0.",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "_updated",
"description": "Sorting criteria for answers.\n\nAvailable Values:\n- `_default`: Default sorting.\n- `_updated`: Sorted by updated time.",
"enumValues": [
"_default",
"_updated"
],
"location": "query",
"name": "order",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Session ID from previous result.",
"enumValues": [],
"location": "query",
"name": "sessionId",
"required": false,
"schemaType": "string"
}
],
"path": "/api/zhihu/get-answer-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Answer List",
"tags": [
"Zhihu"
]
},
{
"description": "Get Zhihu column Article Details data, including title, author, and content, for article archiving and content research.",
"method": "GET",
"operationId": "getColumnArticleDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Article ID",
"enumValues": [],
"location": "query",
"name": "id",
"required": true,
"schemaType": "string"
}
],
"path": "/api/zhihu/get-column-article-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Column Article Details",
"tags": [
"Zhihu"
]
},
{
"description": "Get Zhihu column Article List data, including article metadata and list ordering, for column monitoring and content collection.",
"method": "GET",
"operationId": "getColumnArticleListV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Column ID",
"enumValues": [],
"location": "query",
"name": "columnId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Start offset, begins with 0.",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/zhihu/get-column-article-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Column Article List",
"tags": [
"Zhihu"
]
},
{
"description": "Get Zhihu keyword Search data, including matched results, metadata, and ranking signals, for topic discovery and content research.",
"method": "GET",
"operationId": "searchZhihuV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keywords.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Start offset, begins with 0.",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/zhihu/search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Keyword Search",
"tags": [
"Zhihu"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Search Zhihu topics, inspect answer lists, read column article detail, and track column article feeds through JustOneAPI.",
"displayName": "Zhihu",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Zhihu answer List data, including answer content, author profiles, and interaction metrics, for question analysis and answer research.",
"method": "GET",
"operationId": "getAnswerListV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Question ID",
"enumValues": [],
"location": "query",
"name": "questionId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Pagination cursor from previous result.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Start offset, begins with 0.",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "_updated",
"description": "Sorting criteria for answers.\n\nAvailable Values:\n- `_default`: Default sorting.\n- `_updated`: Sorted by updated time.",
"enumValues": [
"_default",
"_updated"
],
"location": "query",
"name": "order",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Session ID from previous result.",
"enumValues": [],
"location": "query",
"name": "sessionId",
"required": false,
"schemaType": "string"
}
],
"path": "/api/zhihu/get-answer-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Answer List",
"tags": [
"Zhihu"
]
},
{
"description": "Get Zhihu column Article Details data, including title, author, and content, for article archiving and content research.",
"method": "GET",
"operationId": "getColumnArticleDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Article ID",
"enumValues": [],
"location": "query",
"name": "id",
"required": true,
"schemaType": "string"
}
],
"path": "/api/zhihu/get-column-article-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Column Article Details",
"tags": [
"Zhihu"
]
},
{
"description": "Get Zhihu column Article List data, including article metadata and list ordering, for column monitoring and content collection.",
"method": "GET",
"operationId": "getColumnArticleListV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Column ID",
"enumValues": [],
"location": "query",
"name": "columnId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Start offset, begins with 0.",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/zhihu/get-column-article-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Column Article List",
"tags": [
"Zhihu"
]
},
{
"description": "Get Zhihu keyword Search data, including matched results, metadata, and ranking signals, for topic discovery and content research.",
"method": "GET",
"operationId": "searchZhihuV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keywords.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Start offset, begins with 0.",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/zhihu/search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Keyword Search",
"tags": [
"Zhihu"
]
}
],
"platformKey": "zhihu",
"primaryTag": "Zhihu",
"skillName": "justoneapi_zhihu",
"slug": "justoneapi-zhihu",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Zhihu operations
Generated from JustOneAPI OpenAPI for platform key `zhihu`.
## `getAnswerListV1`
- Method: `GET`
- Path: `/api/zhihu/get-answer-list/v1`
- Summary: Answer List
- Description: Get Zhihu answer List data, including answer content, author profiles, and interaction metrics, for question analysis and answer research.
- Tags: `Zhihu`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | TOKEN |
| `questionId` | `query` | yes | `string` | n/a | Question ID |
| `cursor` | `query` | no | `string` | n/a | Pagination cursor from previous result. |
| `offset` | `query` | no | `integer` | `0` | Start offset, begins with 0. |
| `order` | `query` | no | `string` | `_updated` | Sorting criteria for answers.
Available Values:
- `_default`: Default sorting.
- `_updated`: Sorted by updated time. |
| enum | values | no | n/a | n/a | `_default`, `_updated` |
| `sessionId` | `query` | no | `string` | n/a | Session ID from previous result. |
### Request body
No request body.
### Responses
- `200`: OK
## `getColumnArticleDetailV1`
- Method: `GET`
- Path: `/api/zhihu/get-column-article-detail/v1`
- Summary: Column Article Details
- Description: Get Zhihu column Article Details data, including title, author, and content, for article archiving and content research.
- Tags: `Zhihu`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | TOKEN |
| `id` | `query` | yes | `string` | n/a | Article ID |
### Request body
No request body.
### Responses
- `200`: OK
## `getColumnArticleListV1`
- Method: `GET`
- Path: `/api/zhihu/get-column-article-list/v1`
- Summary: Column Article List
- Description: Get Zhihu column Article List data, including article metadata and list ordering, for column monitoring and content collection.
- Tags: `Zhihu`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | TOKEN |
| `columnId` | `query` | yes | `string` | n/a | Column ID |
| `offset` | `query` | no | `integer` | `0` | Start offset, begins with 0. |
### Request body
No request body.
### Responses
- `200`: OK
## `searchZhihuV1`
- Method: `GET`
- Path: `/api/zhihu/search/v1`
- Summary: Keyword Search
- Description: Get Zhihu keyword Search data, including matched results, metadata, and ranking signals, for topic discovery and content research.
- Tags: `Zhihu`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | TOKEN |
| `keyword` | `query` | yes | `string` | n/a | Search keywords. |
| `offset` | `query` | no | `integer` | `0` | Start offset, begins with 0. |
### Request body
No request body.
### Responses
- `200`: OK
Search Xiaohongshu notes, inspect creator profiles, resolve share links, and drill into note comments, replies, and note detail endpoints through JustOneAPI.
---
name: Xiaohongshu (RedNote) API
description: Search Xiaohongshu notes, inspect creator profiles, resolve share links, and drill into note comments, replies, and note detail endpoints through JustOneAPI.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_xiaohongshu"}}
---
# Xiaohongshu (RedNote)
Use this skill for Xiaohongshu note discovery, creator benchmarking, comment mining, and RedNote share-link resolution. It fits workflows where the user starts from a keyword, a note ID, a shared link, or an author ID and wants structured platform data rather than a generic summary.
## When To Use It
- The user wants Xiaohongshu note search, keyword expansion, or creator discovery around a topic.
- The task is about a specific note, comment thread, reply chain, or creator page on Xiaohongshu.
- The user can provide `keyword`, `noteId`, `userId`, `shareUrl`, or cursor-style pagination values such as `lastCursor`.
- The user needs note metadata, engagement context, creator signals, or comment text sourced directly from Xiaohongshu endpoints.
## Representative Operations
- `getSearchNoteV3`: Note Search — Search Xiaohongshu notes by keyword for topic discovery, competitor tracking, and content collection.
- `getNoteDetailV7`: Note Details — Pull note metadata, media, and engagement fields for deep inspection of a single post.
- `getUserV4`: User Profile — Inspect creator profile data for account research and benchmark comparisons.
- `shareUrlTransferV1`: Share Link Resolution — Convert a copied Xiaohongshu share link into note identifiers before running detail or comment queries.
## Request Pattern
- 15 read-only `GET` operations are available in this skill.
- Common inputs are `keyword`, `noteId`, `userId`, `lastCursor`, `page`, `commentId`, and `shareUrl`.
- Several endpoints are versioned variants for note detail, comments, and user data; prefer the smallest endpoint that matches the user request.
- If the user only has a shared Xiaohongshu URL, resolve it first and then continue with detail or comment endpoints.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `getSearchNoteV3`, `getNoteDetailV7`, `getUserV4`, `shareUrlTransferV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_xiaohongshu&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_xiaohongshu&utm_content=project_link).
## Output Rules
- Lead with the concrete Xiaohongshu outcome: note match, creator insight, resolved note ID, or comment finding.
- For search-driven requests, restate the keyword, page, sort mode, and any note-type filter before summarizing results.
- For note detail requests, surface title text, author, media type, engagement signals, and any obvious commercial or trend cues before raw JSON.
- For creator-profile or published-note requests, highlight follower-facing signals and the most relevant recent notes first.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Search Xiaohongshu notes, inspect creator profiles, resolve share links, and drill into note comments, replies, and note detail endpoints through JustOneAPI.",
"displayName": "Xiaohongshu (RedNote)",
"openapi": "3.1.0",
"platformKey": "xiaohongshu",
"primaryTag": "Xiaohongshu (RedNote)",
"skillName": "justoneapi_xiaohongshu",
"slug": "justoneapi-xiaohongshu",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Xiaohongshu (RedNote) note Comments data, including text, authors, and timestamps, for feedback analysis.",
"method": "GET",
"operationId": "getNoteCommentV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor from the previous page (use the cursor value returned by the last response).",
"enumValues": [],
"location": "query",
"name": "lastCursor",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "latest",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `normal`: Normal\n- `latest`: Latest",
"enumValues": [
"normal",
"latest"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-comment/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Comments",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Comments data, including comment text, author profiles, and interaction data, for sentiment analysis and community monitoring.",
"method": "GET",
"operationId": "getNoteCommentV4",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-comment/v4",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Comments",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.",
"method": "GET",
"operationId": "getXiaohongshuNoteDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Details",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.",
"method": "GET",
"operationId": "getNoteDetailV3",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-detail/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Details",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.",
"method": "GET",
"operationId": "getNoteDetailV7",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-detail/v7",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Details",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) comment Replies data, including text, authors, and timestamps, for thread analysis and feedback research.",
"method": "GET",
"operationId": "getNoteSubCommentV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique comment identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "commentId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor from the previous page (use the cursor value returned by the last response).",
"enumValues": [],
"location": "query",
"name": "lastCursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-sub-comment/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Comment Replies",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) user Published Notes data, including note metadata, covers, and publish times, for account monitoring.",
"method": "GET",
"operationId": "getUserNoteListV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique user identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor from the previous page (the last note's cursor value).",
"enumValues": [],
"location": "query",
"name": "lastCursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-user-note-list/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Notes",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) user Published Notes data, including note metadata, covers, and publish times, for account monitoring.",
"method": "GET",
"operationId": "getUserNoteListV4",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique user identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor from the previous page (the last note's cursor value).",
"enumValues": [],
"location": "query",
"name": "lastCursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-user-note-list/v4",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Notes",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) user Profile data, including follower counts and bio details, for creator research, account analysis, and competitor monitoring.",
"method": "GET",
"operationId": "getUserV3",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique user identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-user/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) user Profile data, including follower counts and bio details, for creator research, account analysis, and competitor monitoring.",
"method": "GET",
"operationId": "getUserV4",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique user identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-user/v4",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.",
"method": "GET",
"operationId": "getSearchNoteV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "general",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `general`: General\n- `popularity_descending`: Popularity Descending\n- `time_descending`: Time Descending\n- `comment_descending`: Comment Descending\n- `collect_descending`: Collect Descending",
"enumValues": [
"general",
"popularity_descending",
"time_descending",
"comment_descending",
"collect_descending"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Note type filter.\n\nAvailable Values:\n- `_0`: General\n- `_1`: Video\n- `_2`: Normal",
"enumValues": [
"_0",
"_1",
"_2"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Note publish time filter. This parameter is for reference only and does not have much effect.\n\nAvailable Values:\n- `一天内`: Within one day\n- `一周内`: Within a week\n- `半年内`: Within half a year",
"enumValues": [
"一天内",
"一周内",
"半年内"
],
"location": "query",
"name": "noteTime",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/search-note/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Search",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.",
"method": "GET",
"operationId": "getSearchNoteV3",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "general",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `general`: General\n- `popularity_descending`: Hot\n- `time_descending`: New",
"enumValues": [
"general",
"popularity_descending",
"time_descending"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Note type filter.\n\nAvailable Values:\n- `_0`: General\n- `_1`: Video\n- `_2`: Normal",
"enumValues": [
"_0",
"_1",
"_2"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/search-note/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Search",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) keyword Suggestions data, including suggested queries, keyword variants, and query metadata, for expanding keyword sets for content research and seo/pseo workflows and improving search coverage by using platform-recommended terms.",
"method": "GET",
"operationId": "searchRecommendV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/search-recommend/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Keyword Suggestions",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) user Search data, including profile metadata and public signals, for creator discovery and account research.",
"method": "GET",
"operationId": "getSearchUserV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/xiaohongshu/search-user/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Search",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) share Link Resolution data, including helping extract note IDs, for downstream note and comment workflows.",
"method": "GET",
"operationId": "shareXiaohongshuUrlTransferV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "RedNote share link URL to be resolved (short link or shared URL).",
"enumValues": [],
"location": "query",
"name": "shareUrl",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/share-url-transfer/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Share Link Resolution",
"tags": [
"Xiaohongshu (RedNote)"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Search Xiaohongshu notes, inspect creator profiles, resolve share links, and drill into note comments, replies, and note detail endpoints through JustOneAPI.",
"displayName": "Xiaohongshu (RedNote)",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Xiaohongshu (RedNote) note Comments data, including text, authors, and timestamps, for feedback analysis.",
"method": "GET",
"operationId": "getNoteCommentV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor from the previous page (use the cursor value returned by the last response).",
"enumValues": [],
"location": "query",
"name": "lastCursor",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "latest",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `normal`: Normal\n- `latest`: Latest",
"enumValues": [
"normal",
"latest"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-comment/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Comments",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Comments data, including comment text, author profiles, and interaction data, for sentiment analysis and community monitoring.",
"method": "GET",
"operationId": "getNoteCommentV4",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-comment/v4",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Comments",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.",
"method": "GET",
"operationId": "getXiaohongshuNoteDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Details",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.",
"method": "GET",
"operationId": "getNoteDetailV3",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-detail/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Details",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.",
"method": "GET",
"operationId": "getNoteDetailV7",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-detail/v7",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Details",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) comment Replies data, including text, authors, and timestamps, for thread analysis and feedback research.",
"method": "GET",
"operationId": "getNoteSubCommentV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique note identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique comment identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "commentId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor from the previous page (use the cursor value returned by the last response).",
"enumValues": [],
"location": "query",
"name": "lastCursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-note-sub-comment/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Comment Replies",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) user Published Notes data, including note metadata, covers, and publish times, for account monitoring.",
"method": "GET",
"operationId": "getUserNoteListV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique user identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor from the previous page (the last note's cursor value).",
"enumValues": [],
"location": "query",
"name": "lastCursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-user-note-list/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Notes",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) user Published Notes data, including note metadata, covers, and publish times, for account monitoring.",
"method": "GET",
"operationId": "getUserNoteListV4",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique user identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor from the previous page (the last note's cursor value).",
"enumValues": [],
"location": "query",
"name": "lastCursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-user-note-list/v4",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Notes",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) user Profile data, including follower counts and bio details, for creator research, account analysis, and competitor monitoring.",
"method": "GET",
"operationId": "getUserV3",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique user identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-user/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) user Profile data, including follower counts and bio details, for creator research, account analysis, and competitor monitoring.",
"method": "GET",
"operationId": "getUserV4",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique user identifier on Xiaohongshu.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/get-user/v4",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.",
"method": "GET",
"operationId": "getSearchNoteV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "general",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `general`: General\n- `popularity_descending`: Popularity Descending\n- `time_descending`: Time Descending\n- `comment_descending`: Comment Descending\n- `collect_descending`: Collect Descending",
"enumValues": [
"general",
"popularity_descending",
"time_descending",
"comment_descending",
"collect_descending"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Note type filter.\n\nAvailable Values:\n- `_0`: General\n- `_1`: Video\n- `_2`: Normal",
"enumValues": [
"_0",
"_1",
"_2"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Note publish time filter. This parameter is for reference only and does not have much effect.\n\nAvailable Values:\n- `一天内`: Within one day\n- `一周内`: Within a week\n- `半年内`: Within half a year",
"enumValues": [
"一天内",
"一周内",
"半年内"
],
"location": "query",
"name": "noteTime",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/search-note/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Search",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.",
"method": "GET",
"operationId": "getSearchNoteV3",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "general",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `general`: General\n- `popularity_descending`: Hot\n- `time_descending`: New",
"enumValues": [
"general",
"popularity_descending",
"time_descending"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Note type filter.\n\nAvailable Values:\n- `_0`: General\n- `_1`: Video\n- `_2`: Normal",
"enumValues": [
"_0",
"_1",
"_2"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/search-note/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Search",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) keyword Suggestions data, including suggested queries, keyword variants, and query metadata, for expanding keyword sets for content research and seo/pseo workflows and improving search coverage by using platform-recommended terms.",
"method": "GET",
"operationId": "searchRecommendV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/search-recommend/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Keyword Suggestions",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) user Search data, including profile metadata and public signals, for creator discovery and account research.",
"method": "GET",
"operationId": "getSearchUserV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/xiaohongshu/search-user/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Search",
"tags": [
"Xiaohongshu (RedNote)"
]
},
{
"description": "Get Xiaohongshu (RedNote) share Link Resolution data, including helping extract note IDs, for downstream note and comment workflows.",
"method": "GET",
"operationId": "shareXiaohongshuUrlTransferV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "RedNote share link URL to be resolved (short link or shared URL).",
"enumValues": [],
"location": "query",
"name": "shareUrl",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu/share-url-transfer/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Share Link Resolution",
"tags": [
"Xiaohongshu (RedNote)"
]
}
],
"platformKey": "xiaohongshu",
"primaryTag": "Xiaohongshu (RedNote)",
"skillName": "justoneapi_xiaohongshu",
"slug": "justoneapi-xiaohongshu",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Xiaohongshu (RedNote) operations
Generated from JustOneAPI OpenAPI for platform key `xiaohongshu`.
## `getNoteCommentV2`
- Method: `GET`
- Path: `/api/xiaohongshu/get-note-comment/v2`
- Summary: Note Comments
- Description: Get Xiaohongshu (RedNote) note Comments data, including text, authors, and timestamps, for feedback analysis.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `noteId` | `query` | yes | `string` | n/a | Unique note identifier on Xiaohongshu. |
| `lastCursor` | `query` | no | `string` | n/a | Pagination cursor from the previous page (use the cursor value returned by the last response). |
| `sort` | `query` | no | `string` | `latest` | Sort order for the result set.
Available Values:
- `normal`: Normal
- `latest`: Latest |
| enum | values | no | n/a | n/a | `normal`, `latest` |
### Request body
No request body.
### Responses
- `200`: OK
## `getNoteCommentV4`
- Method: `GET`
- Path: `/api/xiaohongshu/get-note-comment/v4`
- Summary: Note Comments
- Description: Get Xiaohongshu (RedNote) note Comments data, including comment text, author profiles, and interaction data, for sentiment analysis and community monitoring.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `noteId` | `query` | yes | `string` | n/a | Unique note identifier on Xiaohongshu. |
### Request body
No request body.
### Responses
- `200`: OK
## `getXiaohongshuNoteDetailV1`
- Method: `GET`
- Path: `/api/xiaohongshu/get-note-detail/v1`
- Summary: Note Details
- Description: Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `noteId` | `query` | yes | `string` | n/a | Unique note identifier on Xiaohongshu. |
### Request body
No request body.
### Responses
- `200`: OK
## `getNoteDetailV3`
- Method: `GET`
- Path: `/api/xiaohongshu/get-note-detail/v3`
- Summary: Note Details
- Description: Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `noteId` | `query` | yes | `string` | n/a | Unique note identifier on Xiaohongshu. |
### Request body
No request body.
### Responses
- `200`: OK
## `getNoteDetailV7`
- Method: `GET`
- Path: `/api/xiaohongshu/get-note-detail/v7`
- Summary: Note Details
- Description: Get Xiaohongshu (RedNote) note Details data, including media and engagement metrics, for content analysis, archiving, and campaign research.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `noteId` | `query` | yes | `string` | n/a | Unique note identifier on Xiaohongshu. |
### Request body
No request body.
### Responses
- `200`: OK
## `getNoteSubCommentV2`
- Method: `GET`
- Path: `/api/xiaohongshu/get-note-sub-comment/v2`
- Summary: Comment Replies
- Description: Get Xiaohongshu (RedNote) comment Replies data, including text, authors, and timestamps, for thread analysis and feedback research.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `noteId` | `query` | yes | `string` | n/a | Unique note identifier on Xiaohongshu. |
| `commentId` | `query` | yes | `string` | n/a | Unique comment identifier on Xiaohongshu. |
| `lastCursor` | `query` | no | `string` | n/a | Pagination cursor from the previous page (use the cursor value returned by the last response). |
### Request body
No request body.
### Responses
- `200`: OK
## `getUserNoteListV2`
- Method: `GET`
- Path: `/api/xiaohongshu/get-user-note-list/v2`
- Summary: User Published Notes
- Description: Get Xiaohongshu (RedNote) user Published Notes data, including note metadata, covers, and publish times, for account monitoring.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `userId` | `query` | yes | `string` | n/a | Unique user identifier on Xiaohongshu. |
| `lastCursor` | `query` | no | `string` | n/a | Pagination cursor from the previous page (the last note's cursor value). |
### Request body
No request body.
### Responses
- `200`: OK
## `getUserNoteListV4`
- Method: `GET`
- Path: `/api/xiaohongshu/get-user-note-list/v4`
- Summary: User Published Notes
- Description: Get Xiaohongshu (RedNote) user Published Notes data, including note metadata, covers, and publish times, for account monitoring.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `userId` | `query` | yes | `string` | n/a | Unique user identifier on Xiaohongshu. |
| `lastCursor` | `query` | no | `string` | n/a | Pagination cursor from the previous page (the last note's cursor value). |
### Request body
No request body.
### Responses
- `200`: OK
## `getUserV3`
- Method: `GET`
- Path: `/api/xiaohongshu/get-user/v3`
- Summary: User Profile
- Description: Get Xiaohongshu (RedNote) user Profile data, including follower counts and bio details, for creator research, account analysis, and competitor monitoring.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `userId` | `query` | yes | `string` | n/a | Unique user identifier on Xiaohongshu. |
### Request body
No request body.
### Responses
- `200`: OK
## `getUserV4`
- Method: `GET`
- Path: `/api/xiaohongshu/get-user/v4`
- Summary: User Profile
- Description: Get Xiaohongshu (RedNote) user Profile data, including follower counts and bio details, for creator research, account analysis, and competitor monitoring.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `userId` | `query` | yes | `string` | n/a | Unique user identifier on Xiaohongshu. |
### Request body
No request body.
### Responses
- `200`: OK
## `getSearchNoteV2`
- Method: `GET`
- Path: `/api/xiaohongshu/search-note/v2`
- Summary: Note Search
- Description: Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `keyword` | `query` | yes | `string` | n/a | Search keyword. |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
| `sort` | `query` | no | `string` | `general` | Sort order for the result set.
Available Values:
- `general`: General
- `popularity_descending`: Popularity Descending
- `time_descending`: Time Descending
- `comment_descending`: Comment Descending
- `collect_descending`: Collect Descending |
| enum | values | no | n/a | n/a | `general`, `popularity_descending`, `time_descending`, `comment_descending`, `collect_descending` |
| `noteType` | `query` | no | `string` | `_0` | Note type filter.
Available Values:
- `_0`: General
- `_1`: Video
- `_2`: Normal |
| enum | values | no | n/a | n/a | `_0`, `_1`, `_2` |
| `noteTime` | `query` | no | `string` | n/a | Note publish time filter. This parameter is for reference only and does not have much effect.
Available Values:
- `一天内`: Within one day
- `一周内`: Within a week
- `半年内`: Within half a year |
| enum | values | no | n/a | n/a | `一天内`, `一周内`, `半年内` |
### Request body
No request body.
### Responses
- `200`: OK
## `getSearchNoteV3`
- Method: `GET`
- Path: `/api/xiaohongshu/search-note/v3`
- Summary: Note Search
- Description: Get Xiaohongshu (RedNote) note Search data, including snippets, authors, and media, for topic discovery.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `keyword` | `query` | yes | `string` | n/a | Search keyword. |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
| `sort` | `query` | no | `string` | `general` | Sort order for the result set.
Available Values:
- `general`: General
- `popularity_descending`: Hot
- `time_descending`: New |
| enum | values | no | n/a | n/a | `general`, `popularity_descending`, `time_descending` |
| `noteType` | `query` | no | `string` | `_0` | Note type filter.
Available Values:
- `_0`: General
- `_1`: Video
- `_2`: Normal |
| enum | values | no | n/a | n/a | `_0`, `_1`, `_2` |
### Request body
No request body.
### Responses
- `200`: OK
## `searchRecommendV1`
- Method: `GET`
- Path: `/api/xiaohongshu/search-recommend/v1`
- Summary: Keyword Suggestions
- Description: Get Xiaohongshu (RedNote) keyword Suggestions data, including suggested queries, keyword variants, and query metadata, for expanding keyword sets for content research and seo/pseo workflows and improving search coverage by using platform-recommended terms.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `keyword` | `query` | yes | `string` | n/a | Search keyword. |
### Request body
No request body.
### Responses
- `200`: OK
## `getSearchUserV2`
- Method: `GET`
- Path: `/api/xiaohongshu/search-user/v2`
- Summary: User Search
- Description: Get Xiaohongshu (RedNote) user Search data, including profile metadata and public signals, for creator discovery and account research.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `keyword` | `query` | yes | `string` | n/a | Search keyword. |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
### Request body
No request body.
### Responses
- `200`: OK
## `shareXiaohongshuUrlTransferV1`
- Method: `GET`
- Path: `/api/xiaohongshu/share-url-transfer/v1`
- Summary: Share Link Resolution
- Description: Get Xiaohongshu (RedNote) share Link Resolution data, including helping extract note IDs, for downstream note and comment workflows.
- Tags: `Xiaohongshu (RedNote)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `shareUrl` | `query` | yes | `string` | n/a | RedNote share link URL to be resolved (short link or shared URL). |
### Request body
No request body.
### Responses
- `200`: OK
Track Weibo hot search boards, keyword results, creator profiles, fan or follower graphs, and post or video detail endpoints through JustOneAPI.
---
name: Weibo API
description: Track Weibo hot search boards, keyword results, creator profiles, fan or follower graphs, and post or video detail endpoints through JustOneAPI.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_weibo"}}
---
# Weibo
Use this skill for newsroom-style trend checks, creator due diligence, comment digging, and Weibo account monitoring. It is strongest when the user cares about hot search rankings, time-window keyword search, account activity timelines, and audience graph lookups.
## When To Use It
- The user wants Weibo hot search rankings, topic discovery, or time-window keyword monitoring.
- The task is about a specific Weibo account, post, comment thread, follower graph, or TV video page.
- The user can provide Weibo identifiers such as `uid`, `id`, `mid`, or search filters such as `q`, `startDay`, and `endDay`.
- The user needs primary-source Weibo data for monitoring, archiving, creator research, or campaign analysis.
## Representative Operations
- `hotSearchV1`: Hot Search — Pull the current Weibo hot search board for trend desks, breaking-news watchlists, and topic scouting.
- `searchAllV2`: Keyword Search — Search Weibo posts inside a time window using `q`, `startDay`, `startHour`, `endDay`, and `endHour`.
- `getUserPublishedPostsV1`: User Published Posts — Review a creator's latest posts and timeline activity.
- `getFollowersV1`: User Followers — Inspect the outward social graph of a Weibo account for creator and network research.
## Request Pattern
- 10 read-only `GET` operations are available in this skill.
- Common filters are `uid`, `q`, `page`, `startDay`, `endDay`, `mid`, and `id`.
- Several operations are identifier lookups for accounts or posts; others are monitoring queries over a time window.
- No operation in this skill requires a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `hotSearchV1`, `searchAllV2`, `getUserPublishedPostsV1`, `getFollowersV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_weibo&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_weibo&utm_content=project_link).
## Output Rules
- Lead with the concrete Weibo finding: trend, account signal, post detail, or audience graph.
- For hot search or keyword search requests, restate the search window and filters before listing results.
- For account-level requests, surface verification, follower and fan counts, and the most relevant recent posts first.
- For post or video detail requests, pull out engagement counts, media references, and author context before raw JSON.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Track Weibo hot search boards, keyword results, creator profiles, fan or follower graphs, and post or video detail endpoints through JustOneAPI.",
"displayName": "Weibo",
"openapi": "3.1.0",
"platformKey": "weibo",
"primaryTag": "Weibo",
"skillName": "justoneapi_weibo",
"slug": "justoneapi-weibo",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Weibo user Fans data, including profile metadata and verification signals, for audience analysis and influencer research.",
"method": "GET",
"operationId": "getFansV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number, starting with 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/weibo/get-fans/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Fans",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo user Followers data, including profile metadata and verification signals, for network analysis and creator research.",
"method": "GET",
"operationId": "getFollowersV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number, starting with 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/weibo/get-followers/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Followers",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo post Comments data, including text, authors, and timestamps, for feedback analysis.",
"method": "GET",
"operationId": "getWeiboPostCommentsV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo post mid.",
"enumValues": [],
"location": "query",
"name": "mid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "TIME",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `TIME`: Time\n- `HOT`: Hot",
"enumValues": [
"TIME",
"HOT"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor returned by the previous response.",
"enumValues": [],
"location": "query",
"name": "maxId",
"required": false,
"schemaType": "string"
}
],
"path": "/api/weibo/get-post-comments/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Comments",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo user Profile data, including follower counts, verification status, and bio details, for creator research and account analysis.",
"method": "GET",
"operationId": "getUserProfileV3",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weibo/get-user-detail/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo user Published Posts data, including text, media, and publish times, for account monitoring.",
"method": "GET",
"operationId": "getUserPublishedPostsV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number, starting with 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "Pagination cursor (since_id). Required if page > 1.",
"enumValues": [],
"location": "query",
"name": "sinceId",
"required": false,
"schemaType": "string"
}
],
"path": "/api/weibo/get-user-post/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Posts",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo user Video list data (waterfall), including pagination cursor for next page.",
"method": "GET",
"operationId": "getWeiboUserVideoListV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor returned by the previous response.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/weibo/get-user-video-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Video List",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo post Details data, including media, author metadata, and engagement counts, for post analysis, archiving, and campaign monitoring.",
"method": "GET",
"operationId": "getWeiboDetailsV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo post ID.",
"enumValues": [],
"location": "query",
"name": "id",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weibo/get-weibo-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Details",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo hot Search data, including ranking data, for trend monitoring, newsroom workflows, and topic discovery.",
"method": "GET",
"operationId": "hotSearchV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weibo/hot-search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Hot Search",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo keyword Search data, including authors, publish times, and engagement signals, for trend monitoring.",
"method": "GET",
"operationId": "searchAllV2",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search Keywords.",
"enumValues": [],
"location": "query",
"name": "q",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Start Day (yyyy-MM-dd).",
"enumValues": [],
"location": "query",
"name": "startDay",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Start Hour (0-23).",
"enumValues": [],
"location": "query",
"name": "startHour",
"required": true,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "End Day (yyyy-MM-dd).",
"enumValues": [],
"location": "query",
"name": "endDay",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "End Hour (0-23).",
"enumValues": [],
"location": "query",
"name": "endHour",
"required": true,
"schemaType": "integer"
},
{
"defaultValue": false,
"description": "Hot sort, true for hot sort, false for time sort. Default is false.",
"enumValues": [],
"location": "query",
"name": "hotSort",
"required": false,
"schemaType": "boolean"
},
{
"defaultValue": "ALL",
"description": "Contains filter for the result set.\n\nAvailable Values:\n- `ALL`: All\n- `PICTURE`: Has Picture\n- `VIDEO`: Has Video\n- `MUSIC`: Has Music\n- `LINK`: Has Link",
"enumValues": [
"ALL",
"PICTURE",
"VIDEO",
"MUSIC",
"LINK"
],
"location": "query",
"name": "contains",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number, starting with 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/weibo/search-all/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Keyword Search",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo search User Published Posts data, including matched results, metadata, and ranking signals, for author research and historical content discovery.",
"method": "GET",
"operationId": "searchProfileV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search Keywords.",
"enumValues": [],
"location": "query",
"name": "q",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Start Day (yyyy-MM-dd).",
"enumValues": [],
"location": "query",
"name": "startDay",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "End Day (yyyy-MM-dd).",
"enumValues": [],
"location": "query",
"name": "endDay",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number, starting with 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/weibo/search-profile/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Search User Published Posts",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo tV Video Details data, including media URLs, author details, and engagement counts, for video research, archiving, and performance analysis.",
"method": "GET",
"operationId": "tvComponentV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo video/object ID.",
"enumValues": [],
"location": "query",
"name": "oid",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weibo/tv-component/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "TV Video Details",
"tags": [
"Weibo"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Track Weibo hot search boards, keyword results, creator profiles, fan or follower graphs, and post or video detail endpoints through JustOneAPI.",
"displayName": "Weibo",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Weibo user Fans data, including profile metadata and verification signals, for audience analysis and influencer research.",
"method": "GET",
"operationId": "getFansV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number, starting with 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/weibo/get-fans/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Fans",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo user Followers data, including profile metadata and verification signals, for network analysis and creator research.",
"method": "GET",
"operationId": "getFollowersV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number, starting with 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/weibo/get-followers/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Followers",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo post Comments data, including text, authors, and timestamps, for feedback analysis.",
"method": "GET",
"operationId": "getWeiboPostCommentsV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo post mid.",
"enumValues": [],
"location": "query",
"name": "mid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "TIME",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `TIME`: Time\n- `HOT`: Hot",
"enumValues": [
"TIME",
"HOT"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor returned by the previous response.",
"enumValues": [],
"location": "query",
"name": "maxId",
"required": false,
"schemaType": "string"
}
],
"path": "/api/weibo/get-post-comments/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Comments",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo user Profile data, including follower counts, verification status, and bio details, for creator research and account analysis.",
"method": "GET",
"operationId": "getUserProfileV3",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weibo/get-user-detail/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo user Published Posts data, including text, media, and publish times, for account monitoring.",
"method": "GET",
"operationId": "getUserPublishedPostsV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number, starting with 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "Pagination cursor (since_id). Required if page > 1.",
"enumValues": [],
"location": "query",
"name": "sinceId",
"required": false,
"schemaType": "string"
}
],
"path": "/api/weibo/get-user-post/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Posts",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo user Video list data (waterfall), including pagination cursor for next page.",
"method": "GET",
"operationId": "getWeiboUserVideoListV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor returned by the previous response.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/weibo/get-user-video-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Video List",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo post Details data, including media, author metadata, and engagement counts, for post analysis, archiving, and campaign monitoring.",
"method": "GET",
"operationId": "getWeiboDetailsV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo post ID.",
"enumValues": [],
"location": "query",
"name": "id",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weibo/get-weibo-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Details",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo hot Search data, including ranking data, for trend monitoring, newsroom workflows, and topic discovery.",
"method": "GET",
"operationId": "hotSearchV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weibo/hot-search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Hot Search",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo keyword Search data, including authors, publish times, and engagement signals, for trend monitoring.",
"method": "GET",
"operationId": "searchAllV2",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search Keywords.",
"enumValues": [],
"location": "query",
"name": "q",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Start Day (yyyy-MM-dd).",
"enumValues": [],
"location": "query",
"name": "startDay",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Start Hour (0-23).",
"enumValues": [],
"location": "query",
"name": "startHour",
"required": true,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "End Day (yyyy-MM-dd).",
"enumValues": [],
"location": "query",
"name": "endDay",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "End Hour (0-23).",
"enumValues": [],
"location": "query",
"name": "endHour",
"required": true,
"schemaType": "integer"
},
{
"defaultValue": false,
"description": "Hot sort, true for hot sort, false for time sort. Default is false.",
"enumValues": [],
"location": "query",
"name": "hotSort",
"required": false,
"schemaType": "boolean"
},
{
"defaultValue": "ALL",
"description": "Contains filter for the result set.\n\nAvailable Values:\n- `ALL`: All\n- `PICTURE`: Has Picture\n- `VIDEO`: Has Video\n- `MUSIC`: Has Music\n- `LINK`: Has Link",
"enumValues": [
"ALL",
"PICTURE",
"VIDEO",
"MUSIC",
"LINK"
],
"location": "query",
"name": "contains",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number, starting with 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/weibo/search-all/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Keyword Search",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo search User Published Posts data, including matched results, metadata, and ranking signals, for author research and historical content discovery.",
"method": "GET",
"operationId": "searchProfileV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo User ID (UID).",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search Keywords.",
"enumValues": [],
"location": "query",
"name": "q",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Start Day (yyyy-MM-dd).",
"enumValues": [],
"location": "query",
"name": "startDay",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "End Day (yyyy-MM-dd).",
"enumValues": [],
"location": "query",
"name": "endDay",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number, starting with 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/weibo/search-profile/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Search User Published Posts",
"tags": [
"Weibo"
]
},
{
"description": "Get Weibo tV Video Details data, including media URLs, author details, and engagement counts, for video research, archiving, and performance analysis.",
"method": "GET",
"operationId": "tvComponentV1",
"parameters": [
{
"defaultValue": null,
"description": "API access token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Weibo video/object ID.",
"enumValues": [],
"location": "query",
"name": "oid",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weibo/tv-component/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "TV Video Details",
"tags": [
"Weibo"
]
}
],
"platformKey": "weibo",
"primaryTag": "Weibo",
"skillName": "justoneapi_weibo",
"slug": "justoneapi-weibo",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Weibo operations
Generated from JustOneAPI OpenAPI for platform key `weibo`.
## `getFansV1`
- Method: `GET`
- Path: `/api/weibo/get-fans/v1`
- Summary: User Fans
- Description: Get Weibo user Fans data, including profile metadata and verification signals, for audience analysis and influencer research.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `uid` | `query` | yes | `string` | n/a | Weibo User ID (UID). |
| `page` | `query` | no | `integer` | `1` | Page number, starting with 1. |
### Request body
No request body.
### Responses
- `200`: OK
## `getFollowersV1`
- Method: `GET`
- Path: `/api/weibo/get-followers/v1`
- Summary: User Followers
- Description: Get Weibo user Followers data, including profile metadata and verification signals, for network analysis and creator research.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `uid` | `query` | yes | `string` | n/a | Weibo User ID (UID). |
| `page` | `query` | no | `integer` | `1` | Page number, starting with 1. |
### Request body
No request body.
### Responses
- `200`: OK
## `getWeiboPostCommentsV1`
- Method: `GET`
- Path: `/api/weibo/get-post-comments/v1`
- Summary: Post Comments
- Description: Get Weibo post Comments data, including text, authors, and timestamps, for feedback analysis.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `mid` | `query` | yes | `string` | n/a | Weibo post mid. |
| `sort` | `query` | no | `string` | `TIME` | Sort order for the result set.
Available Values:
- `TIME`: Time
- `HOT`: Hot |
| enum | values | no | n/a | n/a | `TIME`, `HOT` |
| `maxId` | `query` | no | `string` | n/a | Pagination cursor returned by the previous response. |
### Request body
No request body.
### Responses
- `200`: OK
## `getUserProfileV3`
- Method: `GET`
- Path: `/api/weibo/get-user-detail/v3`
- Summary: User Profile
- Description: Get Weibo user Profile data, including follower counts, verification status, and bio details, for creator research and account analysis.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `uid` | `query` | yes | `string` | n/a | Weibo User ID (UID). |
### Request body
No request body.
### Responses
- `200`: OK
## `getUserPublishedPostsV1`
- Method: `GET`
- Path: `/api/weibo/get-user-post/v1`
- Summary: User Published Posts
- Description: Get Weibo user Published Posts data, including text, media, and publish times, for account monitoring.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `uid` | `query` | yes | `string` | n/a | Weibo User ID (UID). |
| `page` | `query` | no | `integer` | `1` | Page number, starting with 1. |
| `sinceId` | `query` | no | `string` | n/a | Pagination cursor (since_id). Required if page > 1. |
### Request body
No request body.
### Responses
- `200`: OK
## `getWeiboUserVideoListV1`
- Method: `GET`
- Path: `/api/weibo/get-user-video-list/v1`
- Summary: User Video List
- Description: Get Weibo user Video list data (waterfall), including pagination cursor for next page.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `uid` | `query` | yes | `string` | n/a | Weibo User ID (UID). |
| `cursor` | `query` | no | `string` | n/a | Pagination cursor returned by the previous response. |
### Request body
No request body.
### Responses
- `200`: OK
## `getWeiboDetailsV1`
- Method: `GET`
- Path: `/api/weibo/get-weibo-detail/v1`
- Summary: Post Details
- Description: Get Weibo post Details data, including media, author metadata, and engagement counts, for post analysis, archiving, and campaign monitoring.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `id` | `query` | yes | `string` | n/a | Weibo post ID. |
### Request body
No request body.
### Responses
- `200`: OK
## `hotSearchV1`
- Method: `GET`
- Path: `/api/weibo/hot-search/v1`
- Summary: Hot Search
- Description: Get Weibo hot Search data, including ranking data, for trend monitoring, newsroom workflows, and topic discovery.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
### Request body
No request body.
### Responses
- `200`: OK
## `searchAllV2`
- Method: `GET`
- Path: `/api/weibo/search-all/v2`
- Summary: Keyword Search
- Description: Get Weibo keyword Search data, including authors, publish times, and engagement signals, for trend monitoring.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `q` | `query` | yes | `string` | n/a | Search Keywords. |
| `startDay` | `query` | yes | `string` | n/a | Start Day (yyyy-MM-dd). |
| `startHour` | `query` | yes | `integer` | n/a | Start Hour (0-23). |
| `endDay` | `query` | yes | `string` | n/a | End Day (yyyy-MM-dd). |
| `endHour` | `query` | yes | `integer` | n/a | End Hour (0-23). |
| `hotSort` | `query` | no | `boolean` | `false` | Hot sort, true for hot sort, false for time sort. Default is false. |
| `contains` | `query` | no | `string` | `ALL` | Contains filter for the result set.
Available Values:
- `ALL`: All
- `PICTURE`: Has Picture
- `VIDEO`: Has Video
- `MUSIC`: Has Music
- `LINK`: Has Link |
| enum | values | no | n/a | n/a | `ALL`, `PICTURE`, `VIDEO`, `MUSIC`, `LINK` |
| `page` | `query` | no | `integer` | `1` | Page number, starting with 1. |
### Request body
No request body.
### Responses
- `200`: OK
## `searchProfileV1`
- Method: `GET`
- Path: `/api/weibo/search-profile/v1`
- Summary: Search User Published Posts
- Description: Get Weibo search User Published Posts data, including matched results, metadata, and ranking signals, for author research and historical content discovery.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `uid` | `query` | yes | `string` | n/a | Weibo User ID (UID). |
| `q` | `query` | yes | `string` | n/a | Search Keywords. |
| `startDay` | `query` | no | `string` | n/a | Start Day (yyyy-MM-dd). |
| `endDay` | `query` | no | `string` | n/a | End Day (yyyy-MM-dd). |
| `page` | `query` | no | `integer` | `1` | Page number, starting with 1. |
### Request body
No request body.
### Responses
- `200`: OK
## `tvComponentV1`
- Method: `GET`
- Path: `/api/weibo/tv-component/v1`
- Summary: TV Video Details
- Description: Get Weibo tV Video Details data, including media URLs, author details, and engagement counts, for video research, archiving, and performance analysis.
- Tags: `Weibo`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `oid` | `query` | yes | `string` | n/a | Weibo video/object ID. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze YouTube workflows with JustOneAPI, including video Details and channel Videos.
---
name: YouTube API
description: Analyze YouTube workflows with JustOneAPI, including video Details and channel Videos.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_youtube"}}
---
# YouTube
This skill wraps 2 YouTube operations exposed by JustOneAPI. It is strongest for video Details and channel Videos. Expect common inputs such as `channelId`, `cursor`, `videoId`.
## When To Use It
- The user needs video Details or channel Videos on YouTube.
- The user can provide identifiers or filters such as `channelId`, `cursor`, `videoId`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `getYoutubeVideoDetailV1`: Video Details — Get YouTube video Details data, including its title, description, and view counts, for tracking video engagement and statistics, extracting video metadata for content analysis, and verifying video availability and status
- `getChannelVideosV1`: Channel Videos — Retrieve a list of videos from a specific YouTube channel, providing detailed insights into content performance and upload history
## Request Pattern
- 2 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `channelId`, `cursor`, `videoId`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `getYoutubeVideoDetailV1`, `getChannelVideosV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_youtube&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_youtube&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the YouTube task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `getYoutubeVideoDetailV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `channelId`, `cursor`, `videoId`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze YouTube workflows with JustOneAPI, including video Details and channel Videos.",
"displayName": "YouTube",
"openapi": "3.1.0",
"platformKey": "youtube",
"primaryTag": "YouTube",
"skillName": "justoneapi_youtube",
"slug": "justoneapi-youtube",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Retrieve a list of videos from a specific YouTube channel, providing detailed insights into content performance and upload history.",
"method": "GET",
"operationId": "getChannelVideosV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier for a YouTube channel.",
"enumValues": [],
"location": "query",
"name": "channelId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The cursor for pagination.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/youtube/get-channel-videos/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Channel Videos",
"tags": [
"YouTube"
]
},
{
"description": "Get YouTube video Details data, including its title, description, and view counts, for tracking video engagement and statistics, extracting video metadata for content analysis, and verifying video availability and status.",
"method": "GET",
"operationId": "getYoutubeVideoDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier for a YouTube video.",
"enumValues": [],
"location": "query",
"name": "videoId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/youtube/get-video-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Video Details",
"tags": [
"YouTube"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze YouTube workflows with JustOneAPI, including video Details and channel Videos.",
"displayName": "YouTube",
"openapi": "3.1.0",
"operations": [
{
"description": "Retrieve a list of videos from a specific YouTube channel, providing detailed insights into content performance and upload history.",
"method": "GET",
"operationId": "getChannelVideosV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier for a YouTube channel.",
"enumValues": [],
"location": "query",
"name": "channelId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The cursor for pagination.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/youtube/get-channel-videos/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Channel Videos",
"tags": [
"YouTube"
]
},
{
"description": "Get YouTube video Details data, including its title, description, and view counts, for tracking video engagement and statistics, extracting video metadata for content analysis, and verifying video availability and status.",
"method": "GET",
"operationId": "getYoutubeVideoDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier for a YouTube video.",
"enumValues": [],
"location": "query",
"name": "videoId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/youtube/get-video-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Video Details",
"tags": [
"YouTube"
]
}
],
"platformKey": "youtube",
"primaryTag": "YouTube",
"skillName": "justoneapi_youtube",
"slug": "justoneapi-youtube",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# YouTube operations
Generated from JustOneAPI OpenAPI for platform key `youtube`.
## `getChannelVideosV1`
- Method: `GET`
- Path: `/api/youtube/get-channel-videos/v1`
- Summary: Channel Videos
- Description: Retrieve a list of videos from a specific YouTube channel, providing detailed insights into content performance and upload history.
- Tags: `YouTube`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `channelId` | `query` | yes | `string` | n/a | The unique identifier for a YouTube channel. |
| `cursor` | `query` | no | `string` | n/a | The cursor for pagination. |
### Request body
No request body.
### Responses
- `200`: OK
## `getYoutubeVideoDetailV1`
- Method: `GET`
- Path: `/api/youtube/get-video-detail/v1`
- Summary: Video Details
- Description: Get YouTube video Details data, including its title, description, and view counts, for tracking video engagement and statistics, extracting video metadata for content analysis, and verifying video availability and status.
- Tags: `YouTube`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `videoId` | `query` | yes | `string` | n/a | The unique identifier for a YouTube video. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze YOUKU workflows with JustOneAPI, including video Search, video Details, and user Profile.
---
name: YOUKU API
description: Analyze YOUKU workflows with JustOneAPI, including video Search, video Details, and user Profile.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_youku"}}
---
# YOUKU
This skill wraps 3 YOUKU operations exposed by JustOneAPI. It is strongest for video Search, video Details, and user Profile. Expect common inputs such as `keyword`, `page`, `uid`, `videoId`.
## When To Use It
- The user needs video Search or video Details on YOUKU.
- The task lines up with user Profile rather than a generic cross-platform workflow.
- The user can provide identifiers or filters such as `keyword`, `page`, `uid`, `videoId`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `searchVideoV1`: Video Search — Get YOUKU video Search data, including video ID, title, and cover image, for keyword-based video discovery, monitoring specific topics or trends on youku, and analyzing search results for market research
- `getYoukuVideoDetailV1`: Video Details — Get YOUKU video Details data, including video ID, title, and description, for fetching comprehensive metadata for a single video, tracking engagement metrics like play counts and likes, and integrating detailed video info into third-party dashboards
- `getYoukuUserDetailV1`: User Profile — Get YOUKU user Profile data, including user ID, username, and avatar, for analyzing creator influence and audience size, monitoring account growth and verification status, and fetching basic user info for social crm
## Request Pattern
- 3 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `keyword`, `page`, `uid`, `videoId`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `searchVideoV1`, `getYoukuVideoDetailV1`, `getYoukuUserDetailV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_youku&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_youku&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the YOUKU task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `searchVideoV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `keyword`, `page`, `uid`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze YOUKU workflows with JustOneAPI, including video Search, video Details, and user Profile.",
"displayName": "YOUKU",
"openapi": "3.1.0",
"platformKey": "youku",
"primaryTag": "YOUKU",
"skillName": "justoneapi_youku",
"slug": "justoneapi-youku",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get YOUKU user Profile data, including user ID, username, and avatar, for analyzing creator influence and audience size, monitoring account growth and verification status, and fetching basic user info for social crm.",
"method": "GET",
"operationId": "getYoukuUserDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier for the user.",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
}
],
"path": "/api/youku/get-user-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"YOUKU"
]
},
{
"description": "Get YOUKU video Details data, including video ID, title, and description, for fetching comprehensive metadata for a single video, tracking engagement metrics like play counts and likes, and integrating detailed video info into third-party dashboards.",
"method": "GET",
"operationId": "getYoukuVideoDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier for the video.",
"enumValues": [],
"location": "query",
"name": "videoId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/youku/get-video-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Video Details",
"tags": [
"YOUKU"
]
},
{
"description": "Get YOUKU video Search data, including video ID, title, and cover image, for keyword-based video discovery, monitoring specific topics or trends on youku, and analyzing search results for market research.",
"method": "GET",
"operationId": "searchVideoV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Keyword to search for.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination, starting from 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/youku/search-video/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Video Search",
"tags": [
"YOUKU"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze YOUKU workflows with JustOneAPI, including video Search, video Details, and user Profile.",
"displayName": "YOUKU",
"openapi": "3.1.0",
"operations": [
{
"description": "Get YOUKU user Profile data, including user ID, username, and avatar, for analyzing creator influence and audience size, monitoring account growth and verification status, and fetching basic user info for social crm.",
"method": "GET",
"operationId": "getYoukuUserDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier for the user.",
"enumValues": [],
"location": "query",
"name": "uid",
"required": true,
"schemaType": "string"
}
],
"path": "/api/youku/get-user-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"YOUKU"
]
},
{
"description": "Get YOUKU video Details data, including video ID, title, and description, for fetching comprehensive metadata for a single video, tracking engagement metrics like play counts and likes, and integrating detailed video info into third-party dashboards.",
"method": "GET",
"operationId": "getYoukuVideoDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier for the video.",
"enumValues": [],
"location": "query",
"name": "videoId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/youku/get-video-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Video Details",
"tags": [
"YOUKU"
]
},
{
"description": "Get YOUKU video Search data, including video ID, title, and cover image, for keyword-based video discovery, monitoring specific topics or trends on youku, and analyzing search results for market research.",
"method": "GET",
"operationId": "searchVideoV1",
"parameters": [
{
"defaultValue": null,
"description": "TOKEN",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Keyword to search for.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination, starting from 1.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/youku/search-video/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Video Search",
"tags": [
"YOUKU"
]
}
],
"platformKey": "youku",
"primaryTag": "YOUKU",
"skillName": "justoneapi_youku",
"slug": "justoneapi-youku",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# YOUKU operations
Generated from JustOneAPI OpenAPI for platform key `youku`.
## `getYoukuUserDetailV1`
- Method: `GET`
- Path: `/api/youku/get-user-detail/v1`
- Summary: User Profile
- Description: Get YOUKU user Profile data, including user ID, username, and avatar, for analyzing creator influence and audience size, monitoring account growth and verification status, and fetching basic user info for social crm.
- Tags: `YOUKU`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | TOKEN |
| `uid` | `query` | yes | `string` | n/a | The unique identifier for the user. |
### Request body
No request body.
### Responses
- `200`: OK
## `getYoukuVideoDetailV1`
- Method: `GET`
- Path: `/api/youku/get-video-detail/v1`
- Summary: Video Details
- Description: Get YOUKU video Details data, including video ID, title, and description, for fetching comprehensive metadata for a single video, tracking engagement metrics like play counts and likes, and integrating detailed video info into third-party dashboards.
- Tags: `YOUKU`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | TOKEN |
| `videoId` | `query` | yes | `string` | n/a | The unique identifier for the video. |
### Request body
No request body.
### Responses
- `200`: OK
## `searchVideoV1`
- Method: `GET`
- Path: `/api/youku/search-video/v1`
- Summary: Video Search
- Description: Get YOUKU video Search data, including video ID, title, and cover image, for keyword-based video discovery, monitoring specific topics or trends on youku, and analyzing search results for market research.
- Tags: `YOUKU`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | TOKEN |
| `keyword` | `query` | yes | `string` | n/a | Keyword to search for. |
| `page` | `query` | no | `integer` | `1` | Page number for pagination, starting from 1. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze Xiaohongshu Creator Marketplace (Pugongying) workflows with JustOneAPI, including creator Profile, data Summary, and follower Growth History across 2...
---
name: Xiaohongshu Creator Marketplace (Pugongying) API
description: Analyze Xiaohongshu Creator Marketplace (Pugongying) workflows with JustOneAPI, including creator Profile, data Summary, and follower Growth History across 24 operations.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_xiaohongshu_pgy"}}
---
# Xiaohongshu Creator Marketplace (Pugongying)
This skill wraps 24 Xiaohongshu Creator Marketplace (Pugongying) operations exposed by JustOneAPI. It is strongest for creator Profile, data Summary, follower Growth History, and follower Summary. Expect common inputs such as `userId`, `acceptCache`, `kolId`, `business`, `dateType`.
## When To Use It
- The user needs creator Profile or data Summary on Xiaohongshu Creator Marketplace (Pugongying).
- The task lines up with follower Growth History rather than a generic cross-platform workflow.
- The user can provide identifiers or filters such as `userId`, `acceptCache`, `kolId`, `business`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `apiSolarCooperatorUserBloggerUserIdV1`: Creator Profile — Get Xiaohongshu Creator Marketplace (Pugongying) creator Profile data, including audience and pricing data, for influencer vetting, benchmark analysis, and campaign planning
- `apiSolarKolDataV3DataSummaryV1`: Data Summary — Get Xiaohongshu Creator Marketplace (Pugongying) Summary data, including activity, engagement, and audience growth, for creator evaluation, campaign planning, and creator benchmarking
- `apiSolarKolDataUserIdFansOverallNewHistoryV1`: Follower Growth History — Get Xiaohongshu Creator Marketplace (Pugongying) follower Growth History data, including historical points, trend signals, and growth metrics, for trend tracking, audience analysis, and creator performance monitoring
- `apiSolarKolDataV3FansSummaryV1`: Follower Summary — Get Xiaohongshu Creator Marketplace (Pugongying) follower Summary data, including growth and engagement metrics, for audience analysis and creator benchmarking
## Request Pattern
- 24 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `userId`, `acceptCache`, `kolId`, `business`, `dateType`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `apiSolarCooperatorUserBloggerUserIdV1`, `apiSolarKolDataV3DataSummaryV1`, `apiSolarKolDataUserIdFansOverallNewHistoryV1`, `apiSolarKolDataV3FansSummaryV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_xiaohongshu_pgy&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_xiaohongshu_pgy&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the Xiaohongshu Creator Marketplace (Pugongying) task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `apiSolarCooperatorUserBloggerUserIdV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `userId`, `acceptCache`, `kolId`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Xiaohongshu Creator Marketplace (Pugongying) workflows with JustOneAPI, including creator Profile, data Summary, and follower Growth History across 24 operations.",
"displayName": "Xiaohongshu Creator Marketplace (Pugongying)",
"openapi": "3.1.0",
"platformKey": "xiaohongshu-pgy",
"primaryTag": "Xiaohongshu Creator Marketplace (Pugongying)",
"skillName": "justoneapi_xiaohongshu_pgy",
"slug": "justoneapi-xiaohongshu-pgy",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Core Metrics data, including engagement and content metrics, for benchmarking, vetting, and campaign planning.",
"method": "GET",
"operationId": "apiPgyKolDataCoreDataV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "DAILY_NOTE",
"description": "Business type.\n\nAvailable Values:\n- `DAILY_NOTE`: Daily notes\n- `COOPERATE_NOTE`: Cooperative notes",
"enumValues": [
"DAILY_NOTE",
"COOPERATE_NOTE"
],
"location": "query",
"name": "business",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "PHOTO_TEXT_AND_VIDEO",
"description": "Type of note.\n\nAvailable Values:\n- `PHOTO_TEXT_AND_VIDEO`: Photo and Video\n- `PHOTO_TEXT`: Photo and Text\n- `VIDEO`: Video only",
"enumValues": [
"PHOTO_TEXT_AND_VIDEO",
"PHOTO_TEXT",
"VIDEO"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "DAY_30",
"description": "Time range for data.\n\nAvailable Values:\n- `DAY_30`: Last 30 days\n- `DAY_90`: Last 90 days",
"enumValues": [
"DAY_30",
"DAY_90"
],
"location": "query",
"name": "dateType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Advertisement filter.\n\nAvailable Values:\n- `ALL`: All notes\n- `ORGANIC_ONLY`: Organic notes only",
"enumValues": [
"ALL",
"ORGANIC_ONLY"
],
"location": "query",
"name": "advertiseSwitch",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/pgy/kol/data/core_data/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Core Metrics",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Search data, including filters, returning profile, and audience, for discovery, comparison, and shortlist building.",
"method": "GET",
"operationId": "apiSolarCooperatorBloggerV2V1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "NICKNAME",
"description": "Search criteria type.\n\nAvailable Values:\n- `NICKNAME`: Search by nickname\n- `NOTE`: Search by note content",
"enumValues": [
"NICKNAME",
"NOTE"
],
"location": "query",
"name": "searchType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "Minimum number of fans.",
"enumValues": [],
"location": "query",
"name": "fansNumberLower",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "Maximum number of fans.",
"enumValues": [],
"location": "query",
"name": "fansNumberUpper",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "ALL",
"description": "Target fans age group.\n\nAvailable Values:\n- `ALL`: All ages\n- `LT_18`: Under 18\n- `AGE_18_24`: 18 to 24\n- `AGE_25_34`: 25 to 34\n- `AGE_35_44`: 35 to 44\n- `GT_44`: Above 44",
"enumValues": [
"ALL",
"LT_18",
"AGE_18_24",
"AGE_25_34",
"AGE_35_44",
"GT_44"
],
"location": "query",
"name": "fansAge",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Target fans gender.\n\nAvailable Values:\n- `ALL`: All genders\n- `MALE_HIGH`: Mainly Male\n- `FE_MALE_HIGH`: Mainly Female",
"enumValues": [
"ALL",
"MALE_HIGH",
"FE_MALE_HIGH"
],
"location": "query",
"name": "fansGender",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "KOL's gender.\n\nAvailable Values:\n- `ALL`: All genders\n- `MALE`: Male\n- `FEMALE`: Female",
"enumValues": [
"ALL",
"MALE",
"FEMALE"
],
"location": "query",
"name": "gender",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Content categories, separated by commas.",
"enumValues": [],
"location": "query",
"name": "contentTag",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Search",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Profile data, including audience and pricing data, for influencer vetting, benchmark analysis, and campaign planning.",
"method": "GET",
"operationId": "apiSolarCooperatorUserBloggerUserIdV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Blogger's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/cooperator/user/blogger/userId/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Profile",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower Growth History data, including historical points, trend signals, and growth metrics, for trend tracking, audience analysis, and creator performance monitoring.",
"method": "GET",
"operationId": "apiSolarKolDataUserIdFansOverallNewHistoryV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "DAY_30",
"description": "Time range for data.\n\nAvailable Values:\n- `DAY_30`: Last 30 days\n- `DAY_90`: Last 90 days",
"enumValues": [
"DAY_30",
"DAY_90"
],
"location": "query",
"name": "dateType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "FANS_TOTAL",
"description": "Type of growth data.\n\nAvailable Values:\n- `FANS_TOTAL`: Total fans\n- `FANS_INCREASE`: New fans increase",
"enumValues": [
"FANS_TOTAL",
"FANS_INCREASE"
],
"location": "query",
"name": "increaseType",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/data/userId/fans_overall_new_history/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Growth History",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower distribution data, including audience demographics, interests, and distribution metrics, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "apiSolarKolDataUserIdFansProfileV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/data/userId/fans_profile/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Distribution",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) cost Effectiveness Analysis data, including pricing, reach, and engagement efficiency indicators, for campaign evaluation.",
"method": "GET",
"operationId": "apiSolarKolDataV2CostEffectiveV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV2/costEffective/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Cost Effectiveness Analysis",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Content Tags data, including topic labels that describe publishing themes and content focus, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "apiSolarKolDataV2KolContentTagsV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV2/kolContentTags/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Content Tags",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Feature Tags data, including platform tags, category labels, and classification signals, for segmentation, discovery, and creator classification.",
"method": "GET",
"operationId": "apiSolarKolDataV2KolFeatureTagsV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV2/kolFeatureTags/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Feature Tags",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) user Published Notes data, including note metadata and engagement signals, for creator monitoring and campaign research.",
"method": "GET",
"operationId": "apiSolarKolDataV2NotesDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Advertisement filter.\n\nAvailable Values:\n- `ALL`: All notes\n- `ORGANIC_ONLY`: Organic notes only",
"enumValues": [
"ALL",
"ORGANIC_ONLY"
],
"location": "query",
"name": "advertiseSwitch",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "LATEST",
"description": "Sorting order.\n\nAvailable Values:\n- `LATEST`: Latest\n- `MOST_READ`: Most read\n- `MOST_INTERACT`: Most interactions",
"enumValues": [
"LATEST",
"MOST_READ",
"MOST_INTERACT"
],
"location": "query",
"name": "orderType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Type of note.\n\nAvailable Values:\n- `ALL`: All types\n- `COOPERATION`: Cooperation notes\n- `PHOTO_TEXT`: Photo and Text\n- `VIDEO`: Video only",
"enumValues": [
"ALL",
"COOPERATION",
"PHOTO_TEXT",
"VIDEO"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "NO",
"description": "Whether from third-party platform.\n\nAvailable Values:\n- `NO`: No\n- `YES`: Yes",
"enumValues": [
"NO",
"YES"
],
"location": "query",
"name": "isThirdPlatform",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number.",
"enumValues": [],
"location": "query",
"name": "pageNumber",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV2/notesDetail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Notes",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) Summary data, including activity, engagement, and audience growth, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "apiSolarKolDataV3DataSummaryV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "DAILY_NOTE",
"description": "Business type.\n\nAvailable Values:\n- `DAILY_NOTE`: Daily notes\n- `COOPERATE_NOTE`: Cooperative notes",
"enumValues": [
"DAILY_NOTE",
"COOPERATE_NOTE"
],
"location": "query",
"name": "business",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV3/dataSummary/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Data Summary",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower Summary data, including growth and engagement metrics, for audience analysis and creator benchmarking.",
"method": "GET",
"operationId": "apiSolarKolDataV3FansSummaryV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV3/fansSummary/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Summary",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) note performance metrics data, including core metrics, trend signals, and performance indicators, for content efficiency analysis, creator benchmarking, and campaign planning.",
"method": "GET",
"operationId": "apiSolarKolDataV3NotesRateV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "DAILY_NOTE",
"description": "Business type.\n\nAvailable Values:\n- `DAILY_NOTE`: Daily notes\n- `COOPERATE_NOTE`: Cooperative notes",
"enumValues": [
"DAILY_NOTE",
"COOPERATE_NOTE"
],
"location": "query",
"name": "business",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "PHOTO_TEXT_AND_VIDEO",
"description": "Type of note.\n\nAvailable Values:\n- `PHOTO_TEXT_AND_VIDEO`: Photo and Video\n- `PHOTO_TEXT`: Photo and Text\n- `VIDEO`: Video only",
"enumValues": [
"PHOTO_TEXT_AND_VIDEO",
"PHOTO_TEXT",
"VIDEO"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "DAY_30",
"description": "Time range for data.\n\nAvailable Values:\n- `DAY_30`: Last 30 days\n- `DAY_90`: Last 90 days",
"enumValues": [
"DAY_30",
"DAY_90"
],
"location": "query",
"name": "dateType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Advertisement filter.\n\nAvailable Values:\n- `ALL`: All notes\n- `ORGANIC_ONLY`: Organic notes only",
"enumValues": [
"ALL",
"ORGANIC_ONLY"
],
"location": "query",
"name": "advertiseSwitch",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV3/notesRate/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Performance Metrics",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) similar Creators data, including audience signals, for creator discovery, benchmarking, and shortlist building.",
"method": "GET",
"operationId": "apiSolarKolGetSimilarKolV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for results.",
"enumValues": [],
"location": "query",
"name": "pageNum",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/get_similar_kol/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Similar Creators",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) note Details data, including media and engagement signals, for content analysis, archiving, and campaign review.",
"method": "GET",
"operationId": "apiSolarNoteNoteIdDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Note's unique ID.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/note/noteId/detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Details",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Core Metrics data, including engagement and content metrics, for benchmarking, vetting, and campaign planning.",
"method": "GET",
"operationId": "getKolDataCoreV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Business type.\n\nAvailable Values:\n- `_0`: Normal notes\n- `_1`: Cooperation notes",
"enumValues": [
"_0",
"_1"
],
"location": "query",
"name": "business",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_3",
"description": "Note type.\n\nAvailable Values:\n- `_1`: Photo and Text\n- `_2`: Video\n- `_3`: Photo and Video",
"enumValues": [
"_1",
"_2",
"_3"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_1",
"description": "Date type.\n\nAvailable Values:\n- `_1`: Last 30 days\n- `_2`: Last 90 days",
"enumValues": [
"_1",
"_2"
],
"location": "query",
"name": "dateType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_1",
"description": "Ad filter.\n\nAvailable Values:\n- `_1`: Full traffic (All notes)\n- `_0`: Natural traffic (Organic notes)",
"enumValues": [
"_1",
"_0"
],
"location": "query",
"name": "adSwitch",
"required": false,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-core-data/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Core Metrics",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) cost Effectiveness Analysis data, including pricing, reach, and engagement efficiency indicators, for campaign evaluation.",
"method": "GET",
"operationId": "getKolCostEffectiveV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-cost-effective/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Cost Effectiveness Analysis",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) summary data, including activity, engagement, and audience growth, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "getKolDataSummaryV2",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Business type.\n\nAvailable Values:\n- `_0`: Normal notes\n- `_1`: Cooperation notes",
"enumValues": [
"_0",
"_1"
],
"location": "query",
"name": "business",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-data-summary/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Data Summary",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower distribution data, including audience demographics, interests, and distribution metrics, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "getKolFansPortraitV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-fans-portrait/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Distribution",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower summary data, including core metrics, trend signals, and performance indicators, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "getKolFansSummaryV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-fans-summary/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Summary",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower growth history data, including historical audience changes over time, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "getKolFansTrendV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Date type.\n\nAvailable Values:\n- `_1`: Last 30 days\n- `_2`: Last 60 days",
"enumValues": [
"_1",
"_2"
],
"location": "query",
"name": "dateType",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Increase type.\n\nAvailable Values:\n- `_1`: Total fans\n- `_2`: New fans increase",
"enumValues": [
"_1",
"_2"
],
"location": "query",
"name": "increaseType",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-fans-trend/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Growth History",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Profile data, including audience and pricing data, for influencer vetting, benchmark analysis, and campaign planning.",
"method": "GET",
"operationId": "getXiaohongshuPgyKolInfoV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-info/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Profile",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Note List data, including content metadata, publish time, and engagement indicators, for content analysis.",
"method": "GET",
"operationId": "getKolNoteListV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "Ad filter.\n\nAvailable Values:\n- `_1`: Full traffic (All notes)\n- `_0`: Natural traffic (Organic notes)",
"enumValues": [
"_1",
"_0"
],
"location": "query",
"name": "adSwitch",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Sorting order.\n\nAvailable Values:\n- `_1`: Latest\n- `_2`: Most read\n- `_3`: Most interactions",
"enumValues": [
"_1",
"_2",
"_3"
],
"location": "query",
"name": "orderType",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "_4",
"description": "Note type.\n\nAvailable Values:\n- `_1`: Photo and Text notes\n- `_2`: Video notes\n- `_3`: Cooperation notes\n- `_4`: All types",
"enumValues": [
"_1",
"_2",
"_3",
"_4"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-note-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Note List",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) note performance metrics data, including core metrics, trend signals, and performance indicators, for content efficiency analysis, creator benchmarking, and campaign planning.",
"method": "GET",
"operationId": "getKolNoteRateV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "_1",
"description": "Date type.\n\nAvailable Values:\n- `_1`: Last 30 days\n- `_2`: Last 90 days",
"enumValues": [
"_1",
"_2"
],
"location": "query",
"name": "dateType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_3",
"description": "Note type.\n\nAvailable Values:\n- `_1`: Photo and Text\n- `_2`: Video\n- `_3`: Photo and Video",
"enumValues": [
"_1",
"_2",
"_3"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_1",
"description": "Ad filter.\n\nAvailable Values:\n- `_1`: Full traffic (All notes)\n- `_0`: Natural traffic (Organic notes)",
"enumValues": [
"_1",
"_0"
],
"location": "query",
"name": "adSwitch",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Business type.\n\nAvailable Values:\n- `_0`: Normal notes\n- `_1`: Cooperation notes",
"enumValues": [
"_0",
"_1"
],
"location": "query",
"name": "business",
"required": false,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-note-rate/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Performance Metrics",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) note Details data, including media and engagement signals, for content analysis, archiving, and campaign review.",
"method": "GET",
"operationId": "getXiaohongshuPgyNoteDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Note ID.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-note-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Details",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Xiaohongshu Creator Marketplace (Pugongying) workflows with JustOneAPI, including creator Profile, data Summary, and follower Growth History across 24 operations.",
"displayName": "Xiaohongshu Creator Marketplace (Pugongying)",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Core Metrics data, including engagement and content metrics, for benchmarking, vetting, and campaign planning.",
"method": "GET",
"operationId": "apiPgyKolDataCoreDataV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "DAILY_NOTE",
"description": "Business type.\n\nAvailable Values:\n- `DAILY_NOTE`: Daily notes\n- `COOPERATE_NOTE`: Cooperative notes",
"enumValues": [
"DAILY_NOTE",
"COOPERATE_NOTE"
],
"location": "query",
"name": "business",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "PHOTO_TEXT_AND_VIDEO",
"description": "Type of note.\n\nAvailable Values:\n- `PHOTO_TEXT_AND_VIDEO`: Photo and Video\n- `PHOTO_TEXT`: Photo and Text\n- `VIDEO`: Video only",
"enumValues": [
"PHOTO_TEXT_AND_VIDEO",
"PHOTO_TEXT",
"VIDEO"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "DAY_30",
"description": "Time range for data.\n\nAvailable Values:\n- `DAY_30`: Last 30 days\n- `DAY_90`: Last 90 days",
"enumValues": [
"DAY_30",
"DAY_90"
],
"location": "query",
"name": "dateType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Advertisement filter.\n\nAvailable Values:\n- `ALL`: All notes\n- `ORGANIC_ONLY`: Organic notes only",
"enumValues": [
"ALL",
"ORGANIC_ONLY"
],
"location": "query",
"name": "advertiseSwitch",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/pgy/kol/data/core_data/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Core Metrics",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Search data, including filters, returning profile, and audience, for discovery, comparison, and shortlist building.",
"method": "GET",
"operationId": "apiSolarCooperatorBloggerV2V1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "NICKNAME",
"description": "Search criteria type.\n\nAvailable Values:\n- `NICKNAME`: Search by nickname\n- `NOTE`: Search by note content",
"enumValues": [
"NICKNAME",
"NOTE"
],
"location": "query",
"name": "searchType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "Minimum number of fans.",
"enumValues": [],
"location": "query",
"name": "fansNumberLower",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "Maximum number of fans.",
"enumValues": [],
"location": "query",
"name": "fansNumberUpper",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "ALL",
"description": "Target fans age group.\n\nAvailable Values:\n- `ALL`: All ages\n- `LT_18`: Under 18\n- `AGE_18_24`: 18 to 24\n- `AGE_25_34`: 25 to 34\n- `AGE_35_44`: 35 to 44\n- `GT_44`: Above 44",
"enumValues": [
"ALL",
"LT_18",
"AGE_18_24",
"AGE_25_34",
"AGE_35_44",
"GT_44"
],
"location": "query",
"name": "fansAge",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Target fans gender.\n\nAvailable Values:\n- `ALL`: All genders\n- `MALE_HIGH`: Mainly Male\n- `FE_MALE_HIGH`: Mainly Female",
"enumValues": [
"ALL",
"MALE_HIGH",
"FE_MALE_HIGH"
],
"location": "query",
"name": "fansGender",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "KOL's gender.\n\nAvailable Values:\n- `ALL`: All genders\n- `MALE`: Male\n- `FEMALE`: Female",
"enumValues": [
"ALL",
"MALE",
"FEMALE"
],
"location": "query",
"name": "gender",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Content categories, separated by commas.",
"enumValues": [],
"location": "query",
"name": "contentTag",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Search",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Profile data, including audience and pricing data, for influencer vetting, benchmark analysis, and campaign planning.",
"method": "GET",
"operationId": "apiSolarCooperatorUserBloggerUserIdV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Blogger's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/cooperator/user/blogger/userId/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Profile",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower Growth History data, including historical points, trend signals, and growth metrics, for trend tracking, audience analysis, and creator performance monitoring.",
"method": "GET",
"operationId": "apiSolarKolDataUserIdFansOverallNewHistoryV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "DAY_30",
"description": "Time range for data.\n\nAvailable Values:\n- `DAY_30`: Last 30 days\n- `DAY_90`: Last 90 days",
"enumValues": [
"DAY_30",
"DAY_90"
],
"location": "query",
"name": "dateType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "FANS_TOTAL",
"description": "Type of growth data.\n\nAvailable Values:\n- `FANS_TOTAL`: Total fans\n- `FANS_INCREASE`: New fans increase",
"enumValues": [
"FANS_TOTAL",
"FANS_INCREASE"
],
"location": "query",
"name": "increaseType",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/data/userId/fans_overall_new_history/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Growth History",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower distribution data, including audience demographics, interests, and distribution metrics, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "apiSolarKolDataUserIdFansProfileV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/data/userId/fans_profile/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Distribution",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) cost Effectiveness Analysis data, including pricing, reach, and engagement efficiency indicators, for campaign evaluation.",
"method": "GET",
"operationId": "apiSolarKolDataV2CostEffectiveV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV2/costEffective/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Cost Effectiveness Analysis",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Content Tags data, including topic labels that describe publishing themes and content focus, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "apiSolarKolDataV2KolContentTagsV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV2/kolContentTags/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Content Tags",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Feature Tags data, including platform tags, category labels, and classification signals, for segmentation, discovery, and creator classification.",
"method": "GET",
"operationId": "apiSolarKolDataV2KolFeatureTagsV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV2/kolFeatureTags/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Feature Tags",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) user Published Notes data, including note metadata and engagement signals, for creator monitoring and campaign research.",
"method": "GET",
"operationId": "apiSolarKolDataV2NotesDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Advertisement filter.\n\nAvailable Values:\n- `ALL`: All notes\n- `ORGANIC_ONLY`: Organic notes only",
"enumValues": [
"ALL",
"ORGANIC_ONLY"
],
"location": "query",
"name": "advertiseSwitch",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "LATEST",
"description": "Sorting order.\n\nAvailable Values:\n- `LATEST`: Latest\n- `MOST_READ`: Most read\n- `MOST_INTERACT`: Most interactions",
"enumValues": [
"LATEST",
"MOST_READ",
"MOST_INTERACT"
],
"location": "query",
"name": "orderType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Type of note.\n\nAvailable Values:\n- `ALL`: All types\n- `COOPERATION`: Cooperation notes\n- `PHOTO_TEXT`: Photo and Text\n- `VIDEO`: Video only",
"enumValues": [
"ALL",
"COOPERATION",
"PHOTO_TEXT",
"VIDEO"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "NO",
"description": "Whether from third-party platform.\n\nAvailable Values:\n- `NO`: No\n- `YES`: Yes",
"enumValues": [
"NO",
"YES"
],
"location": "query",
"name": "isThirdPlatform",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number.",
"enumValues": [],
"location": "query",
"name": "pageNumber",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV2/notesDetail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Notes",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) Summary data, including activity, engagement, and audience growth, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "apiSolarKolDataV3DataSummaryV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "DAILY_NOTE",
"description": "Business type.\n\nAvailable Values:\n- `DAILY_NOTE`: Daily notes\n- `COOPERATE_NOTE`: Cooperative notes",
"enumValues": [
"DAILY_NOTE",
"COOPERATE_NOTE"
],
"location": "query",
"name": "business",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV3/dataSummary/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Data Summary",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower Summary data, including growth and engagement metrics, for audience analysis and creator benchmarking.",
"method": "GET",
"operationId": "apiSolarKolDataV3FansSummaryV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV3/fansSummary/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Summary",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) note performance metrics data, including core metrics, trend signals, and performance indicators, for content efficiency analysis, creator benchmarking, and campaign planning.",
"method": "GET",
"operationId": "apiSolarKolDataV3NotesRateV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "DAILY_NOTE",
"description": "Business type.\n\nAvailable Values:\n- `DAILY_NOTE`: Daily notes\n- `COOPERATE_NOTE`: Cooperative notes",
"enumValues": [
"DAILY_NOTE",
"COOPERATE_NOTE"
],
"location": "query",
"name": "business",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "PHOTO_TEXT_AND_VIDEO",
"description": "Type of note.\n\nAvailable Values:\n- `PHOTO_TEXT_AND_VIDEO`: Photo and Video\n- `PHOTO_TEXT`: Photo and Text\n- `VIDEO`: Video only",
"enumValues": [
"PHOTO_TEXT_AND_VIDEO",
"PHOTO_TEXT",
"VIDEO"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "DAY_30",
"description": "Time range for data.\n\nAvailable Values:\n- `DAY_30`: Last 30 days\n- `DAY_90`: Last 90 days",
"enumValues": [
"DAY_30",
"DAY_90"
],
"location": "query",
"name": "dateType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Advertisement filter.\n\nAvailable Values:\n- `ALL`: All notes\n- `ORGANIC_ONLY`: Organic notes only",
"enumValues": [
"ALL",
"ORGANIC_ONLY"
],
"location": "query",
"name": "advertiseSwitch",
"required": false,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/dataV3/notesRate/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Performance Metrics",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) similar Creators data, including audience signals, for creator discovery, benchmarking, and shortlist building.",
"method": "GET",
"operationId": "apiSolarKolGetSimilarKolV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL's user ID.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for results.",
"enumValues": [],
"location": "query",
"name": "pageNum",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/kol/get_similar_kol/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Similar Creators",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) note Details data, including media and engagement signals, for content analysis, archiving, and campaign review.",
"method": "GET",
"operationId": "apiSolarNoteNoteIdDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Note's unique ID.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/xiaohongshu-pgy/api/solar/note/noteId/detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Details",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Core Metrics data, including engagement and content metrics, for benchmarking, vetting, and campaign planning.",
"method": "GET",
"operationId": "getKolDataCoreV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Business type.\n\nAvailable Values:\n- `_0`: Normal notes\n- `_1`: Cooperation notes",
"enumValues": [
"_0",
"_1"
],
"location": "query",
"name": "business",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_3",
"description": "Note type.\n\nAvailable Values:\n- `_1`: Photo and Text\n- `_2`: Video\n- `_3`: Photo and Video",
"enumValues": [
"_1",
"_2",
"_3"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_1",
"description": "Date type.\n\nAvailable Values:\n- `_1`: Last 30 days\n- `_2`: Last 90 days",
"enumValues": [
"_1",
"_2"
],
"location": "query",
"name": "dateType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_1",
"description": "Ad filter.\n\nAvailable Values:\n- `_1`: Full traffic (All notes)\n- `_0`: Natural traffic (Organic notes)",
"enumValues": [
"_1",
"_0"
],
"location": "query",
"name": "adSwitch",
"required": false,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-core-data/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Core Metrics",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) cost Effectiveness Analysis data, including pricing, reach, and engagement efficiency indicators, for campaign evaluation.",
"method": "GET",
"operationId": "getKolCostEffectiveV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-cost-effective/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Cost Effectiveness Analysis",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) summary data, including activity, engagement, and audience growth, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "getKolDataSummaryV2",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Business type.\n\nAvailable Values:\n- `_0`: Normal notes\n- `_1`: Cooperation notes",
"enumValues": [
"_0",
"_1"
],
"location": "query",
"name": "business",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-data-summary/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Data Summary",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower distribution data, including audience demographics, interests, and distribution metrics, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "getKolFansPortraitV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-fans-portrait/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Distribution",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower summary data, including core metrics, trend signals, and performance indicators, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "getKolFansSummaryV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-fans-summary/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Summary",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) follower growth history data, including historical audience changes over time, for creator evaluation, campaign planning, and creator benchmarking.",
"method": "GET",
"operationId": "getKolFansTrendV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Date type.\n\nAvailable Values:\n- `_1`: Last 30 days\n- `_2`: Last 60 days",
"enumValues": [
"_1",
"_2"
],
"location": "query",
"name": "dateType",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Increase type.\n\nAvailable Values:\n- `_1`: Total fans\n- `_2`: New fans increase",
"enumValues": [
"_1",
"_2"
],
"location": "query",
"name": "increaseType",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-fans-trend/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Follower Growth History",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Profile data, including audience and pricing data, for influencer vetting, benchmark analysis, and campaign planning.",
"method": "GET",
"operationId": "getXiaohongshuPgyKolInfoV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-info/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Profile",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) creator Note List data, including content metadata, publish time, and engagement indicators, for content analysis.",
"method": "GET",
"operationId": "getKolNoteListV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "Ad filter.\n\nAvailable Values:\n- `_1`: Full traffic (All notes)\n- `_0`: Natural traffic (Organic notes)",
"enumValues": [
"_1",
"_0"
],
"location": "query",
"name": "adSwitch",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Sorting order.\n\nAvailable Values:\n- `_1`: Latest\n- `_2`: Most read\n- `_3`: Most interactions",
"enumValues": [
"_1",
"_2",
"_3"
],
"location": "query",
"name": "orderType",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "_4",
"description": "Note type.\n\nAvailable Values:\n- `_1`: Photo and Text notes\n- `_2`: Video notes\n- `_3`: Cooperation notes\n- `_4`: All types",
"enumValues": [
"_1",
"_2",
"_3",
"_4"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-note-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Creator Note List",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) note performance metrics data, including core metrics, trend signals, and performance indicators, for content efficiency analysis, creator benchmarking, and campaign planning.",
"method": "GET",
"operationId": "getKolNoteRateV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "KOL ID.",
"enumValues": [],
"location": "query",
"name": "kolId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "_1",
"description": "Date type.\n\nAvailable Values:\n- `_1`: Last 30 days\n- `_2`: Last 90 days",
"enumValues": [
"_1",
"_2"
],
"location": "query",
"name": "dateType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_3",
"description": "Note type.\n\nAvailable Values:\n- `_1`: Photo and Text\n- `_2`: Video\n- `_3`: Photo and Video",
"enumValues": [
"_1",
"_2",
"_3"
],
"location": "query",
"name": "noteType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_1",
"description": "Ad filter.\n\nAvailable Values:\n- `_1`: Full traffic (All notes)\n- `_0`: Natural traffic (Organic notes)",
"enumValues": [
"_1",
"_0"
],
"location": "query",
"name": "adSwitch",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Business type.\n\nAvailable Values:\n- `_0`: Normal notes\n- `_1`: Cooperation notes",
"enumValues": [
"_0",
"_1"
],
"location": "query",
"name": "business",
"required": false,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-kol-note-rate/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Performance Metrics",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
},
{
"description": "Get Xiaohongshu Creator Marketplace (Pugongying) note Details data, including media and engagement signals, for content analysis, archiving, and campaign review.",
"method": "GET",
"operationId": "getXiaohongshuPgyNoteDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "User authentication token.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Note ID.",
"enumValues": [],
"location": "query",
"name": "noteId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Enable cache.",
"enumValues": [],
"location": "query",
"name": "acceptCache",
"required": false,
"schemaType": "boolean"
}
],
"path": "/api/xiaohongshu-pgy/get-note-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Note Details",
"tags": [
"Xiaohongshu Creator Marketplace (Pugongying)"
]
}
],
"platformKey": "xiaohongshu-pgy",
"primaryTag": "Xiaohongshu Creator Marketplace (Pugongying)",
"skillName": "justoneapi_xiaohongshu_pgy",
"slug": "justoneapi-xiaohongshu-pgy",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Xiaohongshu Creator Marketplace (Pugongying) operations
Generated from JustOneAPI OpenAPI for platform key `xiaohongshu-pgy`.
## `apiPgyKolDataCoreDataV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/pgy/kol/data/core_data/v1`
- Summary: Creator Core Metrics
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) creator Core Metrics data, including engagement and content metrics, for benchmarking, vetting, and campaign planning.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
| `business` | `query` | no | `string` | `DAILY_NOTE` | Business type.
Available Values:
- `DAILY_NOTE`: Daily notes
- `COOPERATE_NOTE`: Cooperative notes |
| enum | values | no | n/a | n/a | `DAILY_NOTE`, `COOPERATE_NOTE` |
| `noteType` | `query` | no | `string` | `PHOTO_TEXT_AND_VIDEO` | Type of note.
Available Values:
- `PHOTO_TEXT_AND_VIDEO`: Photo and Video
- `PHOTO_TEXT`: Photo and Text
- `VIDEO`: Video only |
| enum | values | no | n/a | n/a | `PHOTO_TEXT_AND_VIDEO`, `PHOTO_TEXT`, `VIDEO` |
| `dateType` | `query` | no | `string` | `DAY_30` | Time range for data.
Available Values:
- `DAY_30`: Last 30 days
- `DAY_90`: Last 90 days |
| enum | values | no | n/a | n/a | `DAY_30`, `DAY_90` |
| `advertiseSwitch` | `query` | no | `string` | `ALL` | Advertisement filter.
Available Values:
- `ALL`: All notes
- `ORGANIC_ONLY`: Organic notes only |
| enum | values | no | n/a | n/a | `ALL`, `ORGANIC_ONLY` |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarCooperatorBloggerV2V1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1`
- Summary: Creator Search
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) creator Search data, including filters, returning profile, and audience, for discovery, comparison, and shortlist building.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `searchType` | `query` | no | `string` | `NICKNAME` | Search criteria type.
Available Values:
- `NICKNAME`: Search by nickname
- `NOTE`: Search by note content |
| enum | values | no | n/a | n/a | `NICKNAME`, `NOTE` |
| `keyword` | `query` | no | `string` | n/a | Search keyword. |
| `page` | `query` | no | `integer` | `1` | Page number. |
| `fansNumberLower` | `query` | no | `integer` | n/a | Minimum number of fans. |
| `fansNumberUpper` | `query` | no | `integer` | n/a | Maximum number of fans. |
| `fansAge` | `query` | no | `string` | `ALL` | Target fans age group.
Available Values:
- `ALL`: All ages
- `LT_18`: Under 18
- `AGE_18_24`: 18 to 24
- `AGE_25_34`: 25 to 34
- `AGE_35_44`: 35 to 44
- `GT_44`: Above 44 |
| enum | values | no | n/a | n/a | `ALL`, `LT_18`, `AGE_18_24`, `AGE_25_34`, `AGE_35_44`, `GT_44` |
| `fansGender` | `query` | no | `string` | `ALL` | Target fans gender.
Available Values:
- `ALL`: All genders
- `MALE_HIGH`: Mainly Male
- `FE_MALE_HIGH`: Mainly Female |
| enum | values | no | n/a | n/a | `ALL`, `MALE_HIGH`, `FE_MALE_HIGH` |
| `gender` | `query` | no | `string` | `ALL` | KOL's gender.
Available Values:
- `ALL`: All genders
- `MALE`: Male
- `FEMALE`: Female |
| enum | values | no | n/a | n/a | `ALL`, `MALE`, `FEMALE` |
| `contentTag` | `query` | no | `string` | n/a | Content categories, separated by commas. |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarCooperatorUserBloggerUserIdV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/cooperator/user/blogger/userId/v1`
- Summary: Creator Profile
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) creator Profile data, including audience and pricing data, for influencer vetting, benchmark analysis, and campaign planning.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | Blogger's user ID. |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarKolDataUserIdFansOverallNewHistoryV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/kol/data/userId/fans_overall_new_history/v1`
- Summary: Follower Growth History
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) follower Growth History data, including historical points, trend signals, and growth metrics, for trend tracking, audience analysis, and creator performance monitoring.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
| `dateType` | `query` | no | `string` | `DAY_30` | Time range for data.
Available Values:
- `DAY_30`: Last 30 days
- `DAY_90`: Last 90 days |
| enum | values | no | n/a | n/a | `DAY_30`, `DAY_90` |
| `increaseType` | `query` | no | `string` | `FANS_TOTAL` | Type of growth data.
Available Values:
- `FANS_TOTAL`: Total fans
- `FANS_INCREASE`: New fans increase |
| enum | values | no | n/a | n/a | `FANS_TOTAL`, `FANS_INCREASE` |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarKolDataUserIdFansProfileV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/kol/data/userId/fans_profile/v1`
- Summary: Follower Distribution
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) follower distribution data, including audience demographics, interests, and distribution metrics, for creator evaluation, campaign planning, and creator benchmarking.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarKolDataV2CostEffectiveV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/kol/dataV2/costEffective/v1`
- Summary: Cost Effectiveness Analysis
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) cost Effectiveness Analysis data, including pricing, reach, and engagement efficiency indicators, for campaign evaluation.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarKolDataV2KolContentTagsV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/kol/dataV2/kolContentTags/v1`
- Summary: Creator Content Tags
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) creator Content Tags data, including topic labels that describe publishing themes and content focus, for creator evaluation, campaign planning, and creator benchmarking.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarKolDataV2KolFeatureTagsV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/kol/dataV2/kolFeatureTags/v1`
- Summary: Creator Feature Tags
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) creator Feature Tags data, including platform tags, category labels, and classification signals, for segmentation, discovery, and creator classification.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarKolDataV2NotesDetailV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/kol/dataV2/notesDetail/v1`
- Summary: User Published Notes
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) user Published Notes data, including note metadata and engagement signals, for creator monitoring and campaign research.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
| `advertiseSwitch` | `query` | no | `string` | `ALL` | Advertisement filter.
Available Values:
- `ALL`: All notes
- `ORGANIC_ONLY`: Organic notes only |
| enum | values | no | n/a | n/a | `ALL`, `ORGANIC_ONLY` |
| `orderType` | `query` | no | `string` | `LATEST` | Sorting order.
Available Values:
- `LATEST`: Latest
- `MOST_READ`: Most read
- `MOST_INTERACT`: Most interactions |
| enum | values | no | n/a | n/a | `LATEST`, `MOST_READ`, `MOST_INTERACT` |
| `noteType` | `query` | no | `string` | `ALL` | Type of note.
Available Values:
- `ALL`: All types
- `COOPERATION`: Cooperation notes
- `PHOTO_TEXT`: Photo and Text
- `VIDEO`: Video only |
| enum | values | no | n/a | n/a | `ALL`, `COOPERATION`, `PHOTO_TEXT`, `VIDEO` |
| `isThirdPlatform` | `query` | no | `string` | `NO` | Whether from third-party platform.
Available Values:
- `NO`: No
- `YES`: Yes |
| enum | values | no | n/a | n/a | `NO`, `YES` |
| `pageNumber` | `query` | no | `integer` | `1` | Page number. |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarKolDataV3DataSummaryV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/kol/dataV3/dataSummary/v1`
- Summary: Data Summary
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) Summary data, including activity, engagement, and audience growth, for creator evaluation, campaign planning, and creator benchmarking.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
| `business` | `query` | no | `string` | `DAILY_NOTE` | Business type.
Available Values:
- `DAILY_NOTE`: Daily notes
- `COOPERATE_NOTE`: Cooperative notes |
| enum | values | no | n/a | n/a | `DAILY_NOTE`, `COOPERATE_NOTE` |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarKolDataV3FansSummaryV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/kol/dataV3/fansSummary/v1`
- Summary: Follower Summary
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) follower Summary data, including growth and engagement metrics, for audience analysis and creator benchmarking.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarKolDataV3NotesRateV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/kol/dataV3/notesRate/v1`
- Summary: Note Performance Metrics
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) note performance metrics data, including core metrics, trend signals, and performance indicators, for content efficiency analysis, creator benchmarking, and campaign planning.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
| `business` | `query` | no | `string` | `DAILY_NOTE` | Business type.
Available Values:
- `DAILY_NOTE`: Daily notes
- `COOPERATE_NOTE`: Cooperative notes |
| enum | values | no | n/a | n/a | `DAILY_NOTE`, `COOPERATE_NOTE` |
| `noteType` | `query` | no | `string` | `PHOTO_TEXT_AND_VIDEO` | Type of note.
Available Values:
- `PHOTO_TEXT_AND_VIDEO`: Photo and Video
- `PHOTO_TEXT`: Photo and Text
- `VIDEO`: Video only |
| enum | values | no | n/a | n/a | `PHOTO_TEXT_AND_VIDEO`, `PHOTO_TEXT`, `VIDEO` |
| `dateType` | `query` | no | `string` | `DAY_30` | Time range for data.
Available Values:
- `DAY_30`: Last 30 days
- `DAY_90`: Last 90 days |
| enum | values | no | n/a | n/a | `DAY_30`, `DAY_90` |
| `advertiseSwitch` | `query` | no | `string` | `ALL` | Advertisement filter.
Available Values:
- `ALL`: All notes
- `ORGANIC_ONLY`: Organic notes only |
| enum | values | no | n/a | n/a | `ALL`, `ORGANIC_ONLY` |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarKolGetSimilarKolV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/kol/get_similar_kol/v1`
- Summary: Similar Creators
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) similar Creators data, including audience signals, for creator discovery, benchmarking, and shortlist building.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `userId` | `query` | yes | `string` | n/a | KOL's user ID. |
| `pageNum` | `query` | no | `integer` | `1` | Page number for results. |
### Request body
No request body.
### Responses
- `200`: OK
## `apiSolarNoteNoteIdDetailV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/api/solar/note/noteId/detail/v1`
- Summary: Note Details
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) note Details data, including media and engagement signals, for content analysis, archiving, and campaign review.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `noteId` | `query` | yes | `string` | n/a | Note's unique ID. |
### Request body
No request body.
### Responses
- `200`: OK
## `getKolDataCoreV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/get-kol-core-data/v1`
- Summary: Creator Core Metrics
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) creator Core Metrics data, including engagement and content metrics, for benchmarking, vetting, and campaign planning.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `kolId` | `query` | yes | `string` | n/a | KOL ID. |
| `business` | `query` | no | `string` | `_0` | Business type.
Available Values:
- `_0`: Normal notes
- `_1`: Cooperation notes |
| enum | values | no | n/a | n/a | `_0`, `_1` |
| `noteType` | `query` | no | `string` | `_3` | Note type.
Available Values:
- `_1`: Photo and Text
- `_2`: Video
- `_3`: Photo and Video |
| enum | values | no | n/a | n/a | `_1`, `_2`, `_3` |
| `dateType` | `query` | no | `string` | `_1` | Date type.
Available Values:
- `_1`: Last 30 days
- `_2`: Last 90 days |
| enum | values | no | n/a | n/a | `_1`, `_2` |
| `adSwitch` | `query` | no | `string` | `_1` | Ad filter.
Available Values:
- `_1`: Full traffic (All notes)
- `_0`: Natural traffic (Organic notes) |
| enum | values | no | n/a | n/a | `_1`, `_0` |
| `acceptCache` | `query` | no | `boolean` | `false` | Enable cache. |
### Request body
No request body.
### Responses
- `200`: OK
## `getKolCostEffectiveV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/get-kol-cost-effective/v1`
- Summary: Cost Effectiveness Analysis
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) cost Effectiveness Analysis data, including pricing, reach, and engagement efficiency indicators, for campaign evaluation.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `kolId` | `query` | yes | `string` | n/a | KOL ID. |
| `acceptCache` | `query` | no | `boolean` | `false` | Enable cache. |
### Request body
No request body.
### Responses
- `200`: OK
## `getKolDataSummaryV2`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/get-kol-data-summary/v2`
- Summary: Data Summary
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) summary data, including activity, engagement, and audience growth, for creator evaluation, campaign planning, and creator benchmarking.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `kolId` | `query` | yes | `string` | n/a | KOL ID. |
| `business` | `query` | yes | `string` | n/a | Business type.
Available Values:
- `_0`: Normal notes
- `_1`: Cooperation notes |
| enum | values | no | n/a | n/a | `_0`, `_1` |
| `acceptCache` | `query` | no | `boolean` | `false` | Enable cache. |
### Request body
No request body.
### Responses
- `200`: OK
## `getKolFansPortraitV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/get-kol-fans-portrait/v1`
- Summary: Follower Distribution
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) follower distribution data, including audience demographics, interests, and distribution metrics, for creator evaluation, campaign planning, and creator benchmarking.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `kolId` | `query` | yes | `string` | n/a | KOL ID. |
| `acceptCache` | `query` | no | `boolean` | `false` | Enable cache. |
### Request body
No request body.
### Responses
- `200`: OK
## `getKolFansSummaryV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/get-kol-fans-summary/v1`
- Summary: Follower Summary
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) follower summary data, including core metrics, trend signals, and performance indicators, for creator evaluation, campaign planning, and creator benchmarking.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `kolId` | `query` | yes | `string` | n/a | KOL ID. |
| `acceptCache` | `query` | no | `boolean` | `false` | Enable cache. |
### Request body
No request body.
### Responses
- `200`: OK
## `getKolFansTrendV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/get-kol-fans-trend/v1`
- Summary: Follower Growth History
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) follower growth history data, including historical audience changes over time, for creator evaluation, campaign planning, and creator benchmarking.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `kolId` | `query` | yes | `string` | n/a | KOL ID. |
| `dateType` | `query` | yes | `string` | n/a | Date type.
Available Values:
- `_1`: Last 30 days
- `_2`: Last 60 days |
| enum | values | no | n/a | n/a | `_1`, `_2` |
| `increaseType` | `query` | yes | `string` | n/a | Increase type.
Available Values:
- `_1`: Total fans
- `_2`: New fans increase |
| enum | values | no | n/a | n/a | `_1`, `_2` |
| `acceptCache` | `query` | no | `boolean` | `false` | Enable cache. |
### Request body
No request body.
### Responses
- `200`: OK
## `getXiaohongshuPgyKolInfoV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/get-kol-info/v1`
- Summary: Creator Profile
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) creator Profile data, including audience and pricing data, for influencer vetting, benchmark analysis, and campaign planning.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `kolId` | `query` | yes | `string` | n/a | KOL ID. |
| `acceptCache` | `query` | no | `boolean` | `false` | Enable cache. |
### Request body
No request body.
### Responses
- `200`: OK
## `getKolNoteListV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/get-kol-note-list/v1`
- Summary: Creator Note List
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) creator Note List data, including content metadata, publish time, and engagement indicators, for content analysis.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `kolId` | `query` | yes | `string` | n/a | KOL ID. |
| `page` | `query` | no | `integer` | `1` | Page number. |
| `adSwitch` | `query` | yes | `string` | n/a | Ad filter.
Available Values:
- `_1`: Full traffic (All notes)
- `_0`: Natural traffic (Organic notes) |
| enum | values | no | n/a | n/a | `_1`, `_0` |
| `orderType` | `query` | yes | `string` | n/a | Sorting order.
Available Values:
- `_1`: Latest
- `_2`: Most read
- `_3`: Most interactions |
| enum | values | no | n/a | n/a | `_1`, `_2`, `_3` |
| `noteType` | `query` | no | `string` | `_4` | Note type.
Available Values:
- `_1`: Photo and Text notes
- `_2`: Video notes
- `_3`: Cooperation notes
- `_4`: All types |
| enum | values | no | n/a | n/a | `_1`, `_2`, `_3`, `_4` |
| `acceptCache` | `query` | no | `boolean` | `false` | Enable cache. |
### Request body
No request body.
### Responses
- `200`: OK
## `getKolNoteRateV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/get-kol-note-rate/v1`
- Summary: Note Performance Metrics
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) note performance metrics data, including core metrics, trend signals, and performance indicators, for content efficiency analysis, creator benchmarking, and campaign planning.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `kolId` | `query` | yes | `string` | n/a | KOL ID. |
| `dateType` | `query` | no | `string` | `_1` | Date type.
Available Values:
- `_1`: Last 30 days
- `_2`: Last 90 days |
| enum | values | no | n/a | n/a | `_1`, `_2` |
| `noteType` | `query` | no | `string` | `_3` | Note type.
Available Values:
- `_1`: Photo and Text
- `_2`: Video
- `_3`: Photo and Video |
| enum | values | no | n/a | n/a | `_1`, `_2`, `_3` |
| `adSwitch` | `query` | no | `string` | `_1` | Ad filter.
Available Values:
- `_1`: Full traffic (All notes)
- `_0`: Natural traffic (Organic notes) |
| enum | values | no | n/a | n/a | `_1`, `_0` |
| `business` | `query` | no | `string` | `_0` | Business type.
Available Values:
- `_0`: Normal notes
- `_1`: Cooperation notes |
| enum | values | no | n/a | n/a | `_0`, `_1` |
| `acceptCache` | `query` | no | `boolean` | `false` | Enable cache. |
### Request body
No request body.
### Responses
- `200`: OK
## `getXiaohongshuPgyNoteDetailV1`
- Method: `GET`
- Path: `/api/xiaohongshu-pgy/get-note-detail/v1`
- Summary: Note Details
- Description: Get Xiaohongshu Creator Marketplace (Pugongying) note Details data, including media and engagement signals, for content analysis, archiving, and campaign review.
- Tags: `Xiaohongshu Creator Marketplace (Pugongying)`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | User authentication token. |
| `noteId` | `query` | yes | `string` | n/a | Note ID. |
| `acceptCache` | `query` | no | `boolean` | `false` | Enable cache. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze WeChat Official Accounts workflows with JustOneAPI, including user Published Posts, article Engagement Metrics, and article Comments across 5 operati...
---
name: WeChat Official Accounts API
description: Analyze WeChat Official Accounts workflows with JustOneAPI, including user Published Posts, article Engagement Metrics, and article Comments across 5 operations.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_weixin"}}
---
# WeChat Official Accounts
This skill wraps 5 WeChat Official Accounts operations exposed by JustOneAPI. It is strongest for user Published Posts, article Engagement Metrics, article Comments, and keyword Search. Expect common inputs such as `articleUrl`, `keyword`, `offset`, `searchType`, `sortType`.
## When To Use It
- The user needs user Published Posts or article Engagement Metrics on WeChat Official Accounts.
- The task lines up with article Comments rather than a generic cross-platform workflow.
- The user can provide identifiers or filters such as `articleUrl`, `keyword`, `offset`, `searchType`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `getUserPost`: User Published Posts — Get WeChat Official Accounts user Published Posts data, including titles, publish times, and summaries, for account monitoring
- `getArticleFeedback`: Article Engagement Metrics — Get WeChat Official Accounts article Engagement Metrics data, including like, share, and comment metrics, for article performance tracking and benchmarking
- `getArticleComment`: Article Comments — Get WeChat Official Accounts article Comments data, including commenter details, comment text, and timestamps, for feedback analysis
- `searchWeixinV1`: Keyword Search — Get WeChat Official Accounts keyword Search data, including account names, titles, and publish times, for content discovery
## Request Pattern
- 5 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `articleUrl`, `keyword`, `offset`, `searchType`, `sortType`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `getUserPost`, `getArticleFeedback`, `getArticleComment`, `searchWeixinV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_weixin&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_weixin&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the WeChat Official Accounts task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `getUserPost`, explain why the returned fields answer the user's question.
- If the user gave filters such as `articleUrl`, `keyword`, `offset`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze WeChat Official Accounts workflows with JustOneAPI, including user Published Posts, article Engagement Metrics, and article Comments across 5 operations.",
"displayName": "WeChat Official Accounts",
"openapi": "3.1.0",
"platformKey": "weixin",
"primaryTag": "WeChat Official Accounts",
"skillName": "justoneapi_weixin",
"slug": "justoneapi-weixin",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get WeChat Official Accounts article Comments data, including commenter details, comment text, and timestamps, for feedback analysis.",
"method": "GET",
"operationId": "getArticleComment",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the Weixin article.",
"enumValues": [],
"location": "query",
"name": "articleUrl",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weixin/get-article-comment/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Article Comments",
"tags": [
"WeChat Official Accounts"
]
},
{
"description": "Get WeChat Official Accounts article Details data, including body content, for article archiving, research, and content analysis.",
"method": "GET",
"operationId": "getWeixinArticleDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the Weixin article.",
"enumValues": [],
"location": "query",
"name": "articleUrl",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weixin/get-article-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Article Details",
"tags": [
"WeChat Official Accounts"
]
},
{
"description": "Get WeChat Official Accounts article Engagement Metrics data, including like, share, and comment metrics, for article performance tracking and benchmarking.",
"method": "GET",
"operationId": "getArticleFeedback",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the Weixin article.",
"enumValues": [],
"location": "query",
"name": "articleUrl",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weixin/get-article-feedback/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Article Engagement Metrics",
"tags": [
"WeChat Official Accounts"
]
},
{
"description": "Get WeChat Official Accounts user Published Posts data, including titles, publish times, and summaries, for account monitoring.",
"method": "GET",
"operationId": "getUserPost",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The ID of the Weixin Official Account (e.g., 'rmrbwx').",
"enumValues": [],
"location": "query",
"name": "wxid",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weixin/get-user-post/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Posts",
"tags": [
"WeChat Official Accounts"
]
},
{
"description": "Get WeChat Official Accounts keyword Search data, including account names, titles, and publish times, for content discovery.",
"method": "GET",
"operationId": "searchWeixinV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Pagination offset (starts with 0, increment by 20).",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "_0",
"description": "Type of search results (accounts, articles, etc.).\n\nAvailable Values:\n- `_0`: All\n- `_1`: WeChat Official Account\n- `_2`: Article\n- `_7`: WeChat Channel\n- `_262208`: Wechat Mini Program\n- `_384`: Emoji\n- `_16777728`: Encyclopedia\n- `_9`: Live\n- `_1024`: Book\n- `_512`: Music\n- `_16384`: News\n- `_8192`: Wechat Index\n- `_8`: Moments",
"enumValues": [
"_0",
"_1",
"_2",
"_7",
"_262208",
"_384",
"_16777728",
"_9",
"_1024",
"_512",
"_16384",
"_8192",
"_8"
],
"location": "query",
"name": "searchType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Sorting criteria for search results.\n\nAvailable Values:\n- `_0`: Default\n- `_2`: Latest\n- `_4`: Hot",
"enumValues": [
"_0",
"_2",
"_4"
],
"location": "query",
"name": "sortType",
"required": false,
"schemaType": "string"
}
],
"path": "/api/weixin/search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Keyword Search",
"tags": [
"WeChat Official Accounts"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze WeChat Official Accounts workflows with JustOneAPI, including user Published Posts, article Engagement Metrics, and article Comments across 5 operations.",
"displayName": "WeChat Official Accounts",
"openapi": "3.1.0",
"operations": [
{
"description": "Get WeChat Official Accounts article Comments data, including commenter details, comment text, and timestamps, for feedback analysis.",
"method": "GET",
"operationId": "getArticleComment",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the Weixin article.",
"enumValues": [],
"location": "query",
"name": "articleUrl",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weixin/get-article-comment/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Article Comments",
"tags": [
"WeChat Official Accounts"
]
},
{
"description": "Get WeChat Official Accounts article Details data, including body content, for article archiving, research, and content analysis.",
"method": "GET",
"operationId": "getWeixinArticleDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the Weixin article.",
"enumValues": [],
"location": "query",
"name": "articleUrl",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weixin/get-article-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Article Details",
"tags": [
"WeChat Official Accounts"
]
},
{
"description": "Get WeChat Official Accounts article Engagement Metrics data, including like, share, and comment metrics, for article performance tracking and benchmarking.",
"method": "GET",
"operationId": "getArticleFeedback",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the Weixin article.",
"enumValues": [],
"location": "query",
"name": "articleUrl",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weixin/get-article-feedback/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Article Engagement Metrics",
"tags": [
"WeChat Official Accounts"
]
},
{
"description": "Get WeChat Official Accounts user Published Posts data, including titles, publish times, and summaries, for account monitoring.",
"method": "GET",
"operationId": "getUserPost",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The ID of the Weixin Official Account (e.g., 'rmrbwx').",
"enumValues": [],
"location": "query",
"name": "wxid",
"required": true,
"schemaType": "string"
}
],
"path": "/api/weixin/get-user-post/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Posts",
"tags": [
"WeChat Official Accounts"
]
},
{
"description": "Get WeChat Official Accounts keyword Search data, including account names, titles, and publish times, for content discovery.",
"method": "GET",
"operationId": "searchWeixinV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Pagination offset (starts with 0, increment by 20).",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "_0",
"description": "Type of search results (accounts, articles, etc.).\n\nAvailable Values:\n- `_0`: All\n- `_1`: WeChat Official Account\n- `_2`: Article\n- `_7`: WeChat Channel\n- `_262208`: Wechat Mini Program\n- `_384`: Emoji\n- `_16777728`: Encyclopedia\n- `_9`: Live\n- `_1024`: Book\n- `_512`: Music\n- `_16384`: News\n- `_8192`: Wechat Index\n- `_8`: Moments",
"enumValues": [
"_0",
"_1",
"_2",
"_7",
"_262208",
"_384",
"_16777728",
"_9",
"_1024",
"_512",
"_16384",
"_8192",
"_8"
],
"location": "query",
"name": "searchType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Sorting criteria for search results.\n\nAvailable Values:\n- `_0`: Default\n- `_2`: Latest\n- `_4`: Hot",
"enumValues": [
"_0",
"_2",
"_4"
],
"location": "query",
"name": "sortType",
"required": false,
"schemaType": "string"
}
],
"path": "/api/weixin/search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Keyword Search",
"tags": [
"WeChat Official Accounts"
]
}
],
"platformKey": "weixin",
"primaryTag": "WeChat Official Accounts",
"skillName": "justoneapi_weixin",
"slug": "justoneapi-weixin",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# WeChat Official Accounts operations
Generated from JustOneAPI OpenAPI for platform key `weixin`.
## `getArticleComment`
- Method: `GET`
- Path: `/api/weixin/get-article-comment/v1`
- Summary: Article Comments
- Description: Get WeChat Official Accounts article Comments data, including commenter details, comment text, and timestamps, for feedback analysis.
- Tags: `WeChat Official Accounts`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for the API. |
| `articleUrl` | `query` | yes | `string` | n/a | The URL of the Weixin article. |
### Request body
No request body.
### Responses
- `200`: OK
## `getWeixinArticleDetailV1`
- Method: `GET`
- Path: `/api/weixin/get-article-detail/v1`
- Summary: Article Details
- Description: Get WeChat Official Accounts article Details data, including body content, for article archiving, research, and content analysis.
- Tags: `WeChat Official Accounts`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for the API. |
| `articleUrl` | `query` | yes | `string` | n/a | The URL of the Weixin article. |
### Request body
No request body.
### Responses
- `200`: OK
## `getArticleFeedback`
- Method: `GET`
- Path: `/api/weixin/get-article-feedback/v1`
- Summary: Article Engagement Metrics
- Description: Get WeChat Official Accounts article Engagement Metrics data, including like, share, and comment metrics, for article performance tracking and benchmarking.
- Tags: `WeChat Official Accounts`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for the API. |
| `articleUrl` | `query` | yes | `string` | n/a | The URL of the Weixin article. |
### Request body
No request body.
### Responses
- `200`: OK
## `getUserPost`
- Method: `GET`
- Path: `/api/weixin/get-user-post/v1`
- Summary: User Published Posts
- Description: Get WeChat Official Accounts user Published Posts data, including titles, publish times, and summaries, for account monitoring.
- Tags: `WeChat Official Accounts`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for the API. |
| `wxid` | `query` | yes | `string` | n/a | The ID of the Weixin Official Account (e.g., 'rmrbwx'). |
### Request body
No request body.
### Responses
- `200`: OK
## `searchWeixinV1`
- Method: `GET`
- Path: `/api/weixin/search/v1`
- Summary: Keyword Search
- Description: Get WeChat Official Accounts keyword Search data, including account names, titles, and publish times, for content discovery.
- Tags: `WeChat Official Accounts`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for the API. |
| `keyword` | `query` | yes | `string` | n/a | The search keyword. |
| `offset` | `query` | no | `integer` | `0` | Pagination offset (starts with 0, increment by 20). |
| `searchType` | `query` | no | `string` | `_0` | Type of search results (accounts, articles, etc.).
Available Values:
- `_0`: All
- `_1`: WeChat Official Account
- `_2`: Article
- `_7`: WeChat Channel
- `_262208`: Wechat Mini Program
- `_384`: Emoji
- `_16777728`: Encyclopedia
- `_9`: Live
- `_1024`: Book
- `_512`: Music
- `_16384`: News
- `_8192`: Wechat Index
- `_8`: Moments |
| enum | values | no | n/a | n/a | `_0`, `_1`, `_2`, `_7`, `_262208`, `_384`, `_16777728`, `_9`, `_1024`, `_512`, `_16384`, `_8192`, `_8` |
| `sortType` | `query` | no | `string` | `_0` | Sorting criteria for search results.
Available Values:
- `_0`: Default
- `_2`: Latest
- `_4`: Hot |
| enum | values | no | n/a | n/a | `_0`, `_2`, `_4` |
### Request body
No request body.
### Responses
- `200`: OK
Analyze Web Page workflows with JustOneAPI, including hTML Content, rendered HTML Content, and markdown Content.
---
name: Web Page API
description: Analyze Web Page workflows with JustOneAPI, including hTML Content, rendered HTML Content, and markdown Content.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_web"}}
---
# Web Page
This skill wraps 3 Web Page operations exposed by JustOneAPI. It is strongest for hTML Content, rendered HTML Content, and markdown Content. Expect common inputs such as `url`.
## When To Use It
- The user needs hTML Content or rendered HTML Content on Web Page.
- The task lines up with markdown Content rather than a generic cross-platform workflow.
- The user can provide identifiers or filters such as `url`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `htmlV1`: HTML Content — Get the HTML content of a web page
- `renderedHtmlV1`: Rendered HTML Content — Get the Rendered HTML content of a web page
- `markdownV1`: Markdown Content — Get the Markdown content of a web page
## Request Pattern
- 3 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `url`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `htmlV1`, `renderedHtmlV1`, `markdownV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_web&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_web&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the Web Page task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `htmlV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `url`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Web Page workflows with JustOneAPI, including hTML Content, rendered HTML Content, and markdown Content.",
"displayName": "Web Page",
"openapi": "3.1.0",
"platformKey": "web",
"primaryTag": "Web Page",
"skillName": "justoneapi_web",
"slug": "justoneapi-web",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get the HTML content of a web page.",
"method": "GET",
"operationId": "htmlV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the web page to fetch.",
"enumValues": [],
"location": "query",
"name": "url",
"required": true,
"schemaType": "string"
}
],
"path": "/api/web/html/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "HTML Content",
"tags": [
"Web Page"
]
},
{
"description": "Get the Markdown content of a web page.",
"method": "GET",
"operationId": "markdownV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the web page to fetch.",
"enumValues": [],
"location": "query",
"name": "url",
"required": true,
"schemaType": "string"
}
],
"path": "/api/web/markdown/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Markdown Content",
"tags": [
"Web Page"
]
},
{
"description": "Get the Rendered HTML content of a web page.",
"method": "GET",
"operationId": "renderedHtmlV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the web page to fetch.",
"enumValues": [],
"location": "query",
"name": "url",
"required": true,
"schemaType": "string"
}
],
"path": "/api/web/rendered-html/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Rendered HTML Content",
"tags": [
"Web Page"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Web Page workflows with JustOneAPI, including hTML Content, rendered HTML Content, and markdown Content.",
"displayName": "Web Page",
"openapi": "3.1.0",
"operations": [
{
"description": "Get the HTML content of a web page.",
"method": "GET",
"operationId": "htmlV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the web page to fetch.",
"enumValues": [],
"location": "query",
"name": "url",
"required": true,
"schemaType": "string"
}
],
"path": "/api/web/html/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "HTML Content",
"tags": [
"Web Page"
]
},
{
"description": "Get the Markdown content of a web page.",
"method": "GET",
"operationId": "markdownV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the web page to fetch.",
"enumValues": [],
"location": "query",
"name": "url",
"required": true,
"schemaType": "string"
}
],
"path": "/api/web/markdown/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Markdown Content",
"tags": [
"Web Page"
]
},
{
"description": "Get the Rendered HTML content of a web page.",
"method": "GET",
"operationId": "renderedHtmlV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The URL of the web page to fetch.",
"enumValues": [],
"location": "query",
"name": "url",
"required": true,
"schemaType": "string"
}
],
"path": "/api/web/rendered-html/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Rendered HTML Content",
"tags": [
"Web Page"
]
}
],
"platformKey": "web",
"primaryTag": "Web Page",
"skillName": "justoneapi_web",
"slug": "justoneapi-web",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Web Page operations
Generated from JustOneAPI OpenAPI for platform key `web`.
## `htmlV1`
- Method: `GET`
- Path: `/api/web/html/v1`
- Summary: HTML Content
- Description: Get the HTML content of a web page.
- Tags: `Web Page`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token for this API service. |
| `url` | `query` | yes | `string` | n/a | The URL of the web page to fetch. |
### Request body
No request body.
### Responses
- `200`: OK
## `markdownV1`
- Method: `GET`
- Path: `/api/web/markdown/v1`
- Summary: Markdown Content
- Description: Get the Markdown content of a web page.
- Tags: `Web Page`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token for this API service. |
| `url` | `query` | yes | `string` | n/a | The URL of the web page to fetch. |
### Request body
No request body.
### Responses
- `200`: OK
## `renderedHtmlV1`
- Method: `GET`
- Path: `/api/web/rendered-html/v1`
- Summary: Rendered HTML Content
- Description: Get the Rendered HTML content of a web page.
- Tags: `Web Page`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token for this API service. |
| `url` | `query` | yes | `string` | n/a | The URL of the web page to fetch. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze Twitter workflows with JustOneAPI, including user Profile and user Published Posts.
---
name: Twitter API
description: Analyze Twitter workflows with JustOneAPI, including user Profile and user Published Posts.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_twitter"}}
---
# Twitter
This skill wraps 2 Twitter operations exposed by JustOneAPI. It is strongest for user Profile and user Published Posts. Expect common inputs such as `restId`, `cursor`.
## When To Use It
- The user needs user Profile or user Published Posts on Twitter.
- The user can provide identifiers or filters such as `restId`, `cursor`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `getTwitterUserDetailV1`: User Profile — Get Twitter user Profile data, including account metadata, audience metrics, and verification-related fields, for accessing user profile metadata (e.g., description, location, verification status) and collecting follower and following counts
- `getTwitterUserPostsV1`: User Published Posts — Get Twitter user Published Posts data, including post content, timestamps, and engagement data, for account monitoring and content analysis
## Request Pattern
- 2 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `restId`, `cursor`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `getTwitterUserDetailV1`, `getTwitterUserPostsV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_twitter&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_twitter&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the Twitter task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `getTwitterUserDetailV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `restId`, `cursor`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Twitter workflows with JustOneAPI, including user Profile and user Published Posts.",
"displayName": "Twitter",
"openapi": "3.1.0",
"platformKey": "twitter",
"primaryTag": "Twitter",
"skillName": "justoneapi_twitter",
"slug": "justoneapi-twitter",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Twitter user Profile data, including account metadata, audience metrics, and verification-related fields, for accessing user profile metadata (e.g., description, location, verification status) and collecting follower and following counts.",
"method": "GET",
"operationId": "getTwitterUserDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique numeric identifier (Rest ID) for the X user.",
"enumValues": [],
"location": "query",
"name": "restId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/twitter/get-user-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Twitter"
]
},
{
"description": "Get Twitter user Published Posts data, including post content, timestamps, and engagement data, for account monitoring and content analysis.",
"method": "GET",
"operationId": "getTwitterUserPostsV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique numeric identifier (Rest ID) for the X user.",
"enumValues": [],
"location": "query",
"name": "restId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Pagination cursor for navigating through long timelines.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/twitter/get-user-posts/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Posts",
"tags": [
"Twitter"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Twitter workflows with JustOneAPI, including user Profile and user Published Posts.",
"displayName": "Twitter",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Twitter user Profile data, including account metadata, audience metrics, and verification-related fields, for accessing user profile metadata (e.g., description, location, verification status) and collecting follower and following counts.",
"method": "GET",
"operationId": "getTwitterUserDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique numeric identifier (Rest ID) for the X user.",
"enumValues": [],
"location": "query",
"name": "restId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/twitter/get-user-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Twitter"
]
},
{
"description": "Get Twitter user Published Posts data, including post content, timestamps, and engagement data, for account monitoring and content analysis.",
"method": "GET",
"operationId": "getTwitterUserPostsV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique numeric identifier (Rest ID) for the X user.",
"enumValues": [],
"location": "query",
"name": "restId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Pagination cursor for navigating through long timelines.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/twitter/get-user-posts/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Posts",
"tags": [
"Twitter"
]
}
],
"platformKey": "twitter",
"primaryTag": "Twitter",
"skillName": "justoneapi_twitter",
"slug": "justoneapi-twitter",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Twitter operations
Generated from JustOneAPI OpenAPI for platform key `twitter`.
## `getTwitterUserDetailV1`
- Method: `GET`
- Path: `/api/twitter/get-user-detail/v1`
- Summary: User Profile
- Description: Get Twitter user Profile data, including account metadata, audience metrics, and verification-related fields, for accessing user profile metadata (e.g., description, location, verification status) and collecting follower and following counts.
- Tags: `Twitter`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token required for API access. |
| `restId` | `query` | yes | `string` | n/a | The unique numeric identifier (Rest ID) for the X user. |
### Request body
No request body.
### Responses
- `200`: OK
## `getTwitterUserPostsV1`
- Method: `GET`
- Path: `/api/twitter/get-user-posts/v1`
- Summary: User Published Posts
- Description: Get Twitter user Published Posts data, including post content, timestamps, and engagement data, for account monitoring and content analysis.
- Tags: `Twitter`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token required for API access. |
| `restId` | `query` | yes | `string` | n/a | The unique numeric identifier (Rest ID) for the X user. |
| `cursor` | `query` | no | `string` | n/a | Pagination cursor for navigating through long timelines. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze Toutiao workflows with JustOneAPI, including article Details, user Profile, and app Keyword Search across 4 operations.
---
name: Toutiao API
description: Analyze Toutiao workflows with JustOneAPI, including article Details, user Profile, and app Keyword Search across 4 operations.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_toutiao"}}
---
# Toutiao
This skill wraps 4 Toutiao operations exposed by JustOneAPI. It is strongest for article Details, user Profile, app Keyword Search, and web Keyword Search. Expect common inputs such as `keyword`, `id`, `page`, `searchId`, `userId`.
## When To Use It
- The user needs article Details or user Profile on Toutiao.
- The task lines up with app Keyword Search rather than a generic cross-platform workflow.
- The user can provide identifiers or filters such as `keyword`, `id`, `page`, `searchId`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `getToutiaoArticleDetailV1`: Article Details — Get Toutiao article Details data, including article ID, title, and author information, for content performance analysis and media monitoring and verifying article authenticity and metadata retrieval
- `getToutiaoUserDetailV1`: User Profile — Get Toutiao user Profile data, including user ID, nickname, and avatar, for influencer profiling and audience analysis and monitoring creator performance and growth
- `searchToutiaoV1`: App Keyword Search — Get Toutiao app Keyword Search data, including matching articles, videos, and authors, for topic discovery and monitoring
- `searchV2`: Web Keyword Search — Get Toutiao web Keyword Search data, including this is the PC version of the search API. Note that it currently only supports retrieving the first page of results, for first-page discovery of articles, videos, and authors for trend research and monitoring
## Request Pattern
- 4 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `keyword`, `id`, `page`, `searchId`, `userId`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `getToutiaoArticleDetailV1`, `getToutiaoUserDetailV1`, `searchToutiaoV1`, `searchV2`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_toutiao&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_toutiao&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the Toutiao task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `getToutiaoArticleDetailV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `keyword`, `id`, `page`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Toutiao workflows with JustOneAPI, including article Details, user Profile, and app Keyword Search across 4 operations.",
"displayName": "Toutiao",
"openapi": "3.1.0",
"platformKey": "toutiao",
"primaryTag": "Toutiao",
"skillName": "justoneapi_toutiao",
"slug": "justoneapi-toutiao",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Toutiao article Details data, including article ID, title, and author information, for content performance analysis and media monitoring and verifying article authenticity and metadata retrieval.",
"method": "GET",
"operationId": "getToutiaoArticleDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required to access the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier of the Toutiao article.",
"enumValues": [],
"location": "query",
"name": "id",
"required": true,
"schemaType": "string"
}
],
"path": "/api/toutiao/get-article-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Article Details",
"tags": [
"Toutiao"
]
},
{
"description": "Get Toutiao user Profile data, including user ID, nickname, and avatar, for influencer profiling and audience analysis and monitoring creator performance and growth.",
"method": "GET",
"operationId": "getToutiaoUserDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required to access the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier of the Toutiao user.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/toutiao/get-user-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Toutiao"
]
},
{
"description": "Get Toutiao app Keyword Search data, including matching articles, videos, and authors, for topic discovery and monitoring.",
"method": "GET",
"operationId": "searchToutiaoV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required to access the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword or query.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "",
"description": "Search session ID for consistent pagination (not required for the first page).",
"enumValues": [],
"location": "query",
"name": "searchId",
"required": false,
"schemaType": "string"
}
],
"path": "/api/toutiao/search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "App Keyword Search",
"tags": [
"Toutiao"
]
},
{
"description": "Get Toutiao web Keyword Search data, including this is the PC version of the search API. Note that it currently only supports retrieving the first page of results, for first-page discovery of articles, videos, and authors for trend research and monitoring.",
"method": "GET",
"operationId": "searchV2",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required to access the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword or query.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
}
],
"path": "/api/toutiao/search/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Web Keyword Search",
"tags": [
"Toutiao"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Toutiao workflows with JustOneAPI, including article Details, user Profile, and app Keyword Search across 4 operations.",
"displayName": "Toutiao",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Toutiao article Details data, including article ID, title, and author information, for content performance analysis and media monitoring and verifying article authenticity and metadata retrieval.",
"method": "GET",
"operationId": "getToutiaoArticleDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required to access the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier of the Toutiao article.",
"enumValues": [],
"location": "query",
"name": "id",
"required": true,
"schemaType": "string"
}
],
"path": "/api/toutiao/get-article-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Article Details",
"tags": [
"Toutiao"
]
},
{
"description": "Get Toutiao user Profile data, including user ID, nickname, and avatar, for influencer profiling and audience analysis and monitoring creator performance and growth.",
"method": "GET",
"operationId": "getToutiaoUserDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required to access the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier of the Toutiao user.",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/toutiao/get-user-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"Toutiao"
]
},
{
"description": "Get Toutiao app Keyword Search data, including matching articles, videos, and authors, for topic discovery and monitoring.",
"method": "GET",
"operationId": "searchToutiaoV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required to access the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword or query.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "",
"description": "Search session ID for consistent pagination (not required for the first page).",
"enumValues": [],
"location": "query",
"name": "searchId",
"required": false,
"schemaType": "string"
}
],
"path": "/api/toutiao/search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "App Keyword Search",
"tags": [
"Toutiao"
]
},
{
"description": "Get Toutiao web Keyword Search data, including this is the PC version of the search API. Note that it currently only supports retrieving the first page of results, for first-page discovery of articles, videos, and authors for trend research and monitoring.",
"method": "GET",
"operationId": "searchV2",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token required to access the API.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword or query.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
}
],
"path": "/api/toutiao/search/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Web Keyword Search",
"tags": [
"Toutiao"
]
}
],
"platformKey": "toutiao",
"primaryTag": "Toutiao",
"skillName": "justoneapi_toutiao",
"slug": "justoneapi-toutiao",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Toutiao operations
Generated from JustOneAPI OpenAPI for platform key `toutiao`.
## `getToutiaoArticleDetailV1`
- Method: `GET`
- Path: `/api/toutiao/get-article-detail/v1`
- Summary: Article Details
- Description: Get Toutiao article Details data, including article ID, title, and author information, for content performance analysis and media monitoring and verifying article authenticity and metadata retrieval.
- Tags: `Toutiao`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token required to access the API. |
| `id` | `query` | yes | `string` | n/a | The unique identifier of the Toutiao article. |
### Request body
No request body.
### Responses
- `200`: OK
## `getToutiaoUserDetailV1`
- Method: `GET`
- Path: `/api/toutiao/get-user-detail/v1`
- Summary: User Profile
- Description: Get Toutiao user Profile data, including user ID, nickname, and avatar, for influencer profiling and audience analysis and monitoring creator performance and growth.
- Tags: `Toutiao`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token required to access the API. |
| `userId` | `query` | yes | `string` | n/a | The unique identifier of the Toutiao user. |
### Request body
No request body.
### Responses
- `200`: OK
## `searchToutiaoV1`
- Method: `GET`
- Path: `/api/toutiao/search/v1`
- Summary: App Keyword Search
- Description: Get Toutiao app Keyword Search data, including matching articles, videos, and authors, for topic discovery and monitoring.
- Tags: `Toutiao`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token required to access the API. |
| `keyword` | `query` | yes | `string` | n/a | Search keyword or query. |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
| `searchId` | `query` | no | `string` | n/a | Search session ID for consistent pagination (not required for the first page). |
### Request body
No request body.
### Responses
- `200`: OK
## `searchV2`
- Method: `GET`
- Path: `/api/toutiao/search/v2`
- Summary: Web Keyword Search
- Description: Get Toutiao web Keyword Search data, including this is the PC version of the search API. Note that it currently only supports retrieving the first page of results, for first-page discovery of articles, videos, and authors for trend research and monitoring.
- Tags: `Toutiao`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token required to access the API. |
| `keyword` | `query` | yes | `string` | n/a | Search keyword or query. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze TikTok workflows with JustOneAPI, including user Published Posts, post Details, and user Profile across 7 operations.
---
name: TikTok API
description: Analyze TikTok workflows with JustOneAPI, including user Published Posts, post Details, and user Profile across 7 operations.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_tiktok"}}
---
# TikTok
This skill wraps 7 TikTok operations exposed by JustOneAPI. It is strongest for user Published Posts, post Details, user Profile, and post Comments. Expect common inputs such as `cursor`, `awemeId`, `keyword`, `secUid`, `commentId`.
## When To Use It
- The user needs user Published Posts or post Details on TikTok.
- The task lines up with user Profile rather than a generic cross-platform workflow.
- The user can provide identifiers or filters such as `cursor`, `awemeId`, `keyword`, `secUid`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `getUserPostV1`: User Published Posts — Get TikTok user Published Posts data, including video ID, description, and publish time, for user activity analysis and posting frequency tracking, influencer performance evaluation, and content trend monitoring for specific creators
- `getTiktokPostDetailV1`: Post Details — Get TikTok post Details data, including video ID, author information, and description text, for content performance analysis and metadata extraction and influencer evaluation via specific post metrics
- `getTiktokUserDetailV1`: User Profile — Get TikTok user Profile data, including nickname, unique ID, and avatar, for influencer profiling and audience analysis, account performance tracking and growth monitoring, and identifying verified status and official accounts
- `getPostCommentV1`: Post Comments — Get TikTok post Comments data, including comment ID, user information, and text content, for sentiment analysis of the audience's reaction to specific content and engagement measurement via comment volume and quality
## Request Pattern
- 7 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `cursor`, `awemeId`, `keyword`, `secUid`, `commentId`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `getUserPostV1`, `getTiktokPostDetailV1`, `getTiktokUserDetailV1`, `getPostCommentV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_tiktok&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_tiktok&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the TikTok task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `getUserPostV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `cursor`, `awemeId`, `keyword`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze TikTok workflows with JustOneAPI, including user Published Posts, post Details, and user Profile across 7 operations.",
"displayName": "TikTok",
"openapi": "3.1.0",
"platformKey": "tiktok",
"primaryTag": "TikTok",
"skillName": "justoneapi_tiktok",
"slug": "justoneapi-tiktok",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get TikTok post Comments data, including comment ID, user information, and text content, for sentiment analysis of the audience's reaction to specific content and engagement measurement via comment volume and quality.",
"method": "GET",
"operationId": "getPostCommentV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique ID of the TikTok post (awemeId).",
"enumValues": [],
"location": "query",
"name": "awemeId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "0",
"description": "Pagination cursor. Start with '0'.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/get-post-comment/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Comments",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok post Details data, including video ID, author information, and description text, for content performance analysis and metadata extraction and influencer evaluation via specific post metrics.",
"method": "GET",
"operationId": "getTiktokPostDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique ID of the TikTok post.",
"enumValues": [],
"location": "query",
"name": "postId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/tiktok/get-post-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Details",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok comment Replies data, including reply ID, user information, and text content, for understanding detailed user interactions and threaded discussions and identifying influencers or active participants within a comment section.",
"method": "GET",
"operationId": "getPostSubCommentV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique ID of the TikTok post.",
"enumValues": [],
"location": "query",
"name": "awemeId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique ID of the comment to retrieve replies for.",
"enumValues": [],
"location": "query",
"name": "commentId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "0",
"description": "Pagination cursor. Start with '0'.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/get-post-sub-comment/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Comment Replies",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok user Profile data, including nickname, unique ID, and avatar, for influencer profiling and audience analysis, account performance tracking and growth monitoring, and identifying verified status and official accounts.",
"method": "GET",
"operationId": "getTiktokUserDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "The unique handle/username of the user (e.g., 'tiktok').",
"enumValues": [],
"location": "query",
"name": "uniqueId",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "The unique security ID of the user.",
"enumValues": [],
"location": "query",
"name": "secUid",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/get-user-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok user Published Posts data, including video ID, description, and publish time, for user activity analysis and posting frequency tracking, influencer performance evaluation, and content trend monitoring for specific creators.",
"method": "GET",
"operationId": "getUserPostV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique security ID of the TikTok user (e.g., MS4wLjABAAAAonP2...).",
"enumValues": [],
"location": "query",
"name": "secUid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "0",
"description": "Pagination cursor. Use '0' for the first page, then use the 'cursor' value returned in the previous response.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Sorting criteria for the user's posts.\n\nAvailable Values:\n- `_0`: Default (Mixed)\n- `_1`: Highest Liked\n- `_2`: Latest Published",
"enumValues": [
"_0",
"_1",
"_2"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/get-user-post/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Posts",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok post Search data, including key details such as video ID, description, and author information, for trend monitoring and content discovery and keyword-based market analysis and sentiment tracking.",
"method": "GET",
"operationId": "searchPostV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keywords (e.g., 'deepseek').",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Pagination offset, starting from 0 and stepping by 20.",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "RELEVANCE",
"description": "Sorting criteria for search results.\n\nAvailable Values:\n- `RELEVANCE`: Relevance (Default)\n- `MOST_LIKED`: Most Liked",
"enumValues": [
"RELEVANCE",
"MOST_LIKED"
],
"location": "query",
"name": "sortType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Filter posts by publishing time.\n\nAvailable Values:\n- `ALL`: All Time\n- `ONE_DAY`: Last 24 Hours\n- `ONE_WEEK`: Last 7 Days\n- `ONE_MONTH`: Last 30 Days\n- `THREE_MONTHS`: Last 90 Days\n- `HALF_YEAR`: Last 180 Days",
"enumValues": [
"ALL",
"ONE_DAY",
"ONE_WEEK",
"ONE_MONTH",
"THREE_MONTHS",
"HALF_YEAR"
],
"location": "query",
"name": "publishTime",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB').",
"enumValues": [],
"location": "query",
"name": "region",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/search-post/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Search",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok user Search data, including basic profile information such as user ID, nickname, and unique handle, for discovering influencers in specific niches via keywords and identifying target audiences and conducting competitor research.",
"method": "GET",
"operationId": "searchUserV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keywords (e.g., 'deepseek').",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "0",
"description": "Pagination cursor. Start with '0'.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "The 'logid' returned from the previous request for consistent search results.",
"enumValues": [],
"location": "query",
"name": "searchId",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/search-user/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Search",
"tags": [
"TikTok"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze TikTok workflows with JustOneAPI, including user Published Posts, post Details, and user Profile across 7 operations.",
"displayName": "TikTok",
"openapi": "3.1.0",
"operations": [
{
"description": "Get TikTok post Comments data, including comment ID, user information, and text content, for sentiment analysis of the audience's reaction to specific content and engagement measurement via comment volume and quality.",
"method": "GET",
"operationId": "getPostCommentV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique ID of the TikTok post (awemeId).",
"enumValues": [],
"location": "query",
"name": "awemeId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "0",
"description": "Pagination cursor. Start with '0'.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/get-post-comment/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Comments",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok post Details data, including video ID, author information, and description text, for content performance analysis and metadata extraction and influencer evaluation via specific post metrics.",
"method": "GET",
"operationId": "getTiktokPostDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique ID of the TikTok post.",
"enumValues": [],
"location": "query",
"name": "postId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/tiktok/get-post-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Details",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok comment Replies data, including reply ID, user information, and text content, for understanding detailed user interactions and threaded discussions and identifying influencers or active participants within a comment section.",
"method": "GET",
"operationId": "getPostSubCommentV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique ID of the TikTok post.",
"enumValues": [],
"location": "query",
"name": "awemeId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique ID of the comment to retrieve replies for.",
"enumValues": [],
"location": "query",
"name": "commentId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "0",
"description": "Pagination cursor. Start with '0'.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/get-post-sub-comment/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Comment Replies",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok user Profile data, including nickname, unique ID, and avatar, for influencer profiling and audience analysis, account performance tracking and growth monitoring, and identifying verified status and official accounts.",
"method": "GET",
"operationId": "getTiktokUserDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "The unique handle/username of the user (e.g., 'tiktok').",
"enumValues": [],
"location": "query",
"name": "uniqueId",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "The unique security ID of the user.",
"enumValues": [],
"location": "query",
"name": "secUid",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/get-user-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Profile",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok user Published Posts data, including video ID, description, and publish time, for user activity analysis and posting frequency tracking, influencer performance evaluation, and content trend monitoring for specific creators.",
"method": "GET",
"operationId": "getUserPostV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique security ID of the TikTok user (e.g., MS4wLjABAAAAonP2...).",
"enumValues": [],
"location": "query",
"name": "secUid",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "0",
"description": "Pagination cursor. Use '0' for the first page, then use the 'cursor' value returned in the previous response.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "_0",
"description": "Sorting criteria for the user's posts.\n\nAvailable Values:\n- `_0`: Default (Mixed)\n- `_1`: Highest Liked\n- `_2`: Latest Published",
"enumValues": [
"_0",
"_1",
"_2"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/get-user-post/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Published Posts",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok post Search data, including key details such as video ID, description, and author information, for trend monitoring and content discovery and keyword-based market analysis and sentiment tracking.",
"method": "GET",
"operationId": "searchPostV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keywords (e.g., 'deepseek').",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Pagination offset, starting from 0 and stepping by 20.",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": "RELEVANCE",
"description": "Sorting criteria for search results.\n\nAvailable Values:\n- `RELEVANCE`: Relevance (Default)\n- `MOST_LIKED`: Most Liked",
"enumValues": [
"RELEVANCE",
"MOST_LIKED"
],
"location": "query",
"name": "sortType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Filter posts by publishing time.\n\nAvailable Values:\n- `ALL`: All Time\n- `ONE_DAY`: Last 24 Hours\n- `ONE_WEEK`: Last 7 Days\n- `ONE_MONTH`: Last 30 Days\n- `THREE_MONTHS`: Last 90 Days\n- `HALF_YEAR`: Last 180 Days",
"enumValues": [
"ALL",
"ONE_DAY",
"ONE_WEEK",
"ONE_MONTH",
"THREE_MONTHS",
"HALF_YEAR"
],
"location": "query",
"name": "publishTime",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB').",
"enumValues": [],
"location": "query",
"name": "region",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/search-post/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Search",
"tags": [
"TikTok"
]
},
{
"description": "Get TikTok user Search data, including basic profile information such as user ID, nickname, and unique handle, for discovering influencers in specific niches via keywords and identifying target audiences and conducting competitor research.",
"method": "GET",
"operationId": "searchUserV1",
"parameters": [
{
"defaultValue": null,
"description": "Security token for API access.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keywords (e.g., 'deepseek').",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "0",
"description": "Pagination cursor. Start with '0'.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "The 'logid' returned from the previous request for consistent search results.",
"enumValues": [],
"location": "query",
"name": "searchId",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok/search-user/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "User Search",
"tags": [
"TikTok"
]
}
],
"platformKey": "tiktok",
"primaryTag": "TikTok",
"skillName": "justoneapi_tiktok",
"slug": "justoneapi-tiktok",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# TikTok operations
Generated from JustOneAPI OpenAPI for platform key `tiktok`.
## `getPostCommentV1`
- Method: `GET`
- Path: `/api/tiktok/get-post-comment/v1`
- Summary: Post Comments
- Description: Get TikTok post Comments data, including comment ID, user information, and text content, for sentiment analysis of the audience's reaction to specific content and engagement measurement via comment volume and quality.
- Tags: `TikTok`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Security token for API access. |
| `awemeId` | `query` | yes | `string` | n/a | The unique ID of the TikTok post (awemeId). |
| `cursor` | `query` | no | `string` | `0` | Pagination cursor. Start with '0'. |
### Request body
No request body.
### Responses
- `200`: OK
## `getTiktokPostDetailV1`
- Method: `GET`
- Path: `/api/tiktok/get-post-detail/v1`
- Summary: Post Details
- Description: Get TikTok post Details data, including video ID, author information, and description text, for content performance analysis and metadata extraction and influencer evaluation via specific post metrics.
- Tags: `TikTok`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Security token for API access. |
| `postId` | `query` | yes | `string` | n/a | The unique ID of the TikTok post. |
### Request body
No request body.
### Responses
- `200`: OK
## `getPostSubCommentV1`
- Method: `GET`
- Path: `/api/tiktok/get-post-sub-comment/v1`
- Summary: Comment Replies
- Description: Get TikTok comment Replies data, including reply ID, user information, and text content, for understanding detailed user interactions and threaded discussions and identifying influencers or active participants within a comment section.
- Tags: `TikTok`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Security token for API access. |
| `awemeId` | `query` | yes | `string` | n/a | The unique ID of the TikTok post. |
| `commentId` | `query` | yes | `string` | n/a | The unique ID of the comment to retrieve replies for. |
| `cursor` | `query` | no | `string` | `0` | Pagination cursor. Start with '0'. |
### Request body
No request body.
### Responses
- `200`: OK
## `getTiktokUserDetailV1`
- Method: `GET`
- Path: `/api/tiktok/get-user-detail/v1`
- Summary: User Profile
- Description: Get TikTok user Profile data, including nickname, unique ID, and avatar, for influencer profiling and audience analysis, account performance tracking and growth monitoring, and identifying verified status and official accounts.
- Tags: `TikTok`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Security token for API access. |
| `uniqueId` | `query` | no | `string` | n/a | The unique handle/username of the user (e.g., 'tiktok'). |
| `secUid` | `query` | no | `string` | n/a | The unique security ID of the user. |
### Request body
No request body.
### Responses
- `200`: OK
## `getUserPostV1`
- Method: `GET`
- Path: `/api/tiktok/get-user-post/v1`
- Summary: User Published Posts
- Description: Get TikTok user Published Posts data, including video ID, description, and publish time, for user activity analysis and posting frequency tracking, influencer performance evaluation, and content trend monitoring for specific creators.
- Tags: `TikTok`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Security token for API access. |
| `secUid` | `query` | yes | `string` | n/a | The unique security ID of the TikTok user (e.g., MS4wLjABAAAAonP2...). |
| `cursor` | `query` | no | `string` | `0` | Pagination cursor. Use '0' for the first page, then use the 'cursor' value returned in the previous response. |
| `sort` | `query` | no | `string` | `_0` | Sorting criteria for the user's posts.
Available Values:
- `_0`: Default (Mixed)
- `_1`: Highest Liked
- `_2`: Latest Published |
| enum | values | no | n/a | n/a | `_0`, `_1`, `_2` |
### Request body
No request body.
### Responses
- `200`: OK
## `searchPostV1`
- Method: `GET`
- Path: `/api/tiktok/search-post/v1`
- Summary: Post Search
- Description: Get TikTok post Search data, including key details such as video ID, description, and author information, for trend monitoring and content discovery and keyword-based market analysis and sentiment tracking.
- Tags: `TikTok`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Security token for API access. |
| `keyword` | `query` | yes | `string` | n/a | Search keywords (e.g., 'deepseek'). |
| `offset` | `query` | no | `integer` | `0` | Pagination offset, starting from 0 and stepping by 20. |
| `sortType` | `query` | no | `string` | `RELEVANCE` | Sorting criteria for search results.
Available Values:
- `RELEVANCE`: Relevance (Default)
- `MOST_LIKED`: Most Liked |
| enum | values | no | n/a | n/a | `RELEVANCE`, `MOST_LIKED` |
| `publishTime` | `query` | no | `string` | `ALL` | Filter posts by publishing time.
Available Values:
- `ALL`: All Time
- `ONE_DAY`: Last 24 Hours
- `ONE_WEEK`: Last 7 Days
- `ONE_MONTH`: Last 30 Days
- `THREE_MONTHS`: Last 90 Days
- `HALF_YEAR`: Last 180 Days |
| enum | values | no | n/a | n/a | `ALL`, `ONE_DAY`, `ONE_WEEK`, `ONE_MONTH`, `THREE_MONTHS`, `HALF_YEAR` |
| `region` | `query` | no | `string` | `US` | ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB'). |
### Request body
No request body.
### Responses
- `200`: OK
## `searchUserV1`
- Method: `GET`
- Path: `/api/tiktok/search-user/v1`
- Summary: User Search
- Description: Get TikTok user Search data, including basic profile information such as user ID, nickname, and unique handle, for discovering influencers in specific niches via keywords and identifying target audiences and conducting competitor research.
- Tags: `TikTok`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Security token for API access. |
| `keyword` | `query` | yes | `string` | n/a | Search keywords (e.g., 'deepseek'). |
| `cursor` | `query` | no | `string` | `0` | Pagination cursor. Start with '0'. |
| `searchId` | `query` | no | `string` | n/a | The 'logid' returned from the previous request for consistent search results. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze TikTok Shop workflows with JustOneAPI, including product Search and product Details.
---
name: TikTok Shop API
description: Analyze TikTok Shop workflows with JustOneAPI, including product Search and product Details.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_tiktok_shop"}}
---
# TikTok Shop
This skill wraps 2 TikTok Shop operations exposed by JustOneAPI. It is strongest for product Search and product Details. Expect common inputs such as `region`, `keyword`, `offset`, `pageToken`, `productId`.
## When To Use It
- The user needs product Search or product Details on TikTok Shop.
- The user can provide identifiers or filters such as `region`, `keyword`, `offset`, `pageToken`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `searchProductsV1`: Product Search — Get TikTok Shop product Search data, including title, price, and sales, for market research and trend analysis, competitor product discovery, and monitoring product popularity in specific regions
- `getTiktokShopProductDetailV1`: Product Details — Get TikTok Shop product Details data, including title, description, and price, for building product catalogs, price and stock monitoring, and in-depth product analysis
## Request Pattern
- 2 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `region`, `keyword`, `offset`, `pageToken`, `productId`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `searchProductsV1`, `getTiktokShopProductDetailV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_tiktok_shop&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_tiktok_shop&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the TikTok Shop task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `searchProductsV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `region`, `keyword`, `offset`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze TikTok Shop workflows with JustOneAPI, including product Search and product Details.",
"displayName": "TikTok Shop",
"openapi": "3.1.0",
"platformKey": "tiktok-shop",
"primaryTag": "TikTok Shop",
"skillName": "justoneapi_tiktok_shop",
"slug": "justoneapi-tiktok-shop",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get TikTok Shop product Details data, including title, description, and price, for building product catalogs, price and stock monitoring, and in-depth product analysis.",
"method": "GET",
"operationId": "getTiktokShopProductDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "TikTok Shop Product ID.",
"enumValues": [],
"location": "query",
"name": "productId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Target region for product detail.\n\nAvailable Values:\n- `US`: United States\n- `GB`: United Kingdom\n- `SG`: Singapore\n- `MY`: Malaysia\n- `PH`: Philippines\n- `TH`: Thailand\n- `VN`: Vietnam\n- `ID`: Indonesia",
"enumValues": [
"US",
"GB",
"SG",
"MY",
"PH",
"TH",
"VN",
"ID"
],
"location": "query",
"name": "region",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok-shop/get-product-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"TikTok Shop"
]
},
{
"description": "Get TikTok Shop product Search data, including title, price, and sales, for market research and trend analysis, competitor product discovery, and monitoring product popularity in specific regions.",
"method": "GET",
"operationId": "searchProductsV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Target region for product search.\n\nAvailable Values:\n- `US`: United States\n- `GB`: United Kingdom\n- `SG`: Singapore\n- `MY`: Malaysia\n- `PH`: Philippines\n- `TH`: Thailand\n- `VN`: Vietnam\n- `ID`: Indonesia",
"enumValues": [
"US",
"GB",
"SG",
"MY",
"PH",
"TH",
"VN",
"ID"
],
"location": "query",
"name": "region",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Search result offset.",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "Pagination token for the next page.",
"enumValues": [],
"location": "query",
"name": "pageToken",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok-shop/search-products/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Search",
"tags": [
"TikTok Shop"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze TikTok Shop workflows with JustOneAPI, including product Search and product Details.",
"displayName": "TikTok Shop",
"openapi": "3.1.0",
"operations": [
{
"description": "Get TikTok Shop product Details data, including title, description, and price, for building product catalogs, price and stock monitoring, and in-depth product analysis.",
"method": "GET",
"operationId": "getTiktokShopProductDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "TikTok Shop Product ID.",
"enumValues": [],
"location": "query",
"name": "productId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Target region for product detail.\n\nAvailable Values:\n- `US`: United States\n- `GB`: United Kingdom\n- `SG`: Singapore\n- `MY`: Malaysia\n- `PH`: Philippines\n- `TH`: Thailand\n- `VN`: Vietnam\n- `ID`: Indonesia",
"enumValues": [
"US",
"GB",
"SG",
"MY",
"PH",
"TH",
"VN",
"ID"
],
"location": "query",
"name": "region",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok-shop/get-product-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"TikTok Shop"
]
},
{
"description": "Get TikTok Shop product Search data, including title, price, and sales, for market research and trend analysis, competitor product discovery, and monitoring product popularity in specific regions.",
"method": "GET",
"operationId": "searchProductsV1",
"parameters": [
{
"defaultValue": null,
"description": "Authentication token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "US",
"description": "Target region for product search.\n\nAvailable Values:\n- `US`: United States\n- `GB`: United Kingdom\n- `SG`: Singapore\n- `MY`: Malaysia\n- `PH`: Philippines\n- `TH`: Thailand\n- `VN`: Vietnam\n- `ID`: Indonesia",
"enumValues": [
"US",
"GB",
"SG",
"MY",
"PH",
"TH",
"VN",
"ID"
],
"location": "query",
"name": "region",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 0,
"description": "Search result offset.",
"enumValues": [],
"location": "query",
"name": "offset",
"required": false,
"schemaType": "integer"
},
{
"defaultValue": null,
"description": "Pagination token for the next page.",
"enumValues": [],
"location": "query",
"name": "pageToken",
"required": false,
"schemaType": "string"
}
],
"path": "/api/tiktok-shop/search-products/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Search",
"tags": [
"TikTok Shop"
]
}
],
"platformKey": "tiktok-shop",
"primaryTag": "TikTok Shop",
"skillName": "justoneapi_tiktok_shop",
"slug": "justoneapi-tiktok-shop",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# TikTok Shop operations
Generated from JustOneAPI OpenAPI for platform key `tiktok-shop`.
## `getTiktokShopProductDetailV1`
- Method: `GET`
- Path: `/api/tiktok-shop/get-product-detail/v1`
- Summary: Product Details
- Description: Get TikTok Shop product Details data, including title, description, and price, for building product catalogs, price and stock monitoring, and in-depth product analysis.
- Tags: `TikTok Shop`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token for this API service. |
| `productId` | `query` | yes | `string` | n/a | TikTok Shop Product ID. |
| `region` | `query` | no | `string` | `US` | Target region for product detail.
Available Values:
- `US`: United States
- `GB`: United Kingdom
- `SG`: Singapore
- `MY`: Malaysia
- `PH`: Philippines
- `TH`: Thailand
- `VN`: Vietnam
- `ID`: Indonesia |
| enum | values | no | n/a | n/a | `US`, `GB`, `SG`, `MY`, `PH`, `TH`, `VN`, `ID` |
### Request body
No request body.
### Responses
- `200`: OK
## `searchProductsV1`
- Method: `GET`
- Path: `/api/tiktok-shop/search-products/v1`
- Summary: Product Search
- Description: Get TikTok Shop product Search data, including title, price, and sales, for market research and trend analysis, competitor product discovery, and monitoring product popularity in specific regions.
- Tags: `TikTok Shop`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Authentication token for this API service. |
| `keyword` | `query` | yes | `string` | n/a | Search keyword. |
| `region` | `query` | no | `string` | `US` | Target region for product search.
Available Values:
- `US`: United States
- `GB`: United Kingdom
- `SG`: Singapore
- `MY`: Malaysia
- `PH`: Philippines
- `TH`: Thailand
- `VN`: Vietnam
- `ID`: Indonesia |
| enum | values | no | n/a | n/a | `US`, `GB`, `SG`, `MY`, `PH`, `TH`, `VN`, `ID` |
| `offset` | `query` | no | `integer` | `0` | Search result offset. |
| `pageToken` | `query` | no | `string` | n/a | Pagination token for the next page. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze Taobao and Tmall workflows with JustOneAPI, including product Details, product Reviews, and shop Product List across 10 operations.
---
name: Taobao and Tmall API
description: Analyze Taobao and Tmall workflows with JustOneAPI, including product Details, product Reviews, and shop Product List across 10 operations.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_taobao"}}
---
# Taobao and Tmall
This skill wraps 10 Taobao and Tmall operations exposed by JustOneAPI. It is strongest for product Details, product Reviews, shop Product List, and product Search. Expect common inputs such as `itemId`, `page`, `sort`, `userId`, `shopId`.
## When To Use It
- The user needs product Details or product Reviews on Taobao and Tmall.
- The task lines up with shop Product List rather than a generic cross-platform workflow.
- The user can provide identifiers or filters such as `itemId`, `page`, `sort`, `userId`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `getTaobaoItemDetailV1`: Product Details — Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis
- `getItemCommentV3`: Product Reviews — Get Taobao and Tmall product Reviews data, including ratings, timestamps, and reviewer signals, for feedback analysis and product research
- `getTaobaoShopItemListV1`: Shop Product List — Get Taobao and Tmall shop Product List data, including item titles, prices, and images, for seller research and catalog tracking
- `searchItemListV1`: Product Search — Get Taobao and Tmall product Search data, including titles, prices, and images, for product discovery
## Request Pattern
- 10 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `itemId`, `page`, `sort`, `userId`, `shopId`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `getTaobaoItemDetailV1`, `getItemCommentV3`, `getTaobaoShopItemListV1`, `searchItemListV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_taobao&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_taobao&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the Taobao and Tmall task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `getTaobaoItemDetailV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `itemId`, `page`, `sort`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Taobao and Tmall workflows with JustOneAPI, including product Details, product Reviews, and shop Product List across 10 operations.",
"displayName": "Taobao and Tmall",
"openapi": "3.1.0",
"platformKey": "taobao",
"primaryTag": "Taobao and Tmall",
"skillName": "justoneapi_taobao",
"slug": "justoneapi-taobao",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Taobao and Tmall product Reviews data, including ratings, timestamps, and reviewer signals, for feedback analysis and product research.",
"method": "GET",
"operationId": "getItemCommentV3",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "feedbackdate",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `feedbackdate`: Sort by feedback date\n- `general`: General sorting",
"enumValues": [
"feedbackdate",
"general"
],
"location": "query",
"name": "orderType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/taobao/get-item-comment/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Reviews",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.",
"method": "GET",
"operationId": "getTaobaoItemDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/taobao/get-item-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Details data through the task-backed v2 flow. If data is not ready within a short wait, the response returns a pending task status.",
"method": "GET",
"operationId": "getItemDetailV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/taobao/get-item-detail/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.",
"method": "GET",
"operationId": "getItemDetailV4",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/taobao/get-item-detail/v4",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.",
"method": "GET",
"operationId": "getItemDetailV5",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/taobao/get-item-detail/v5",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.",
"method": "GET",
"operationId": "getItemDetailV9",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/taobao/get-item-detail/v9",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall shop Product List data, including item titles, prices, and images, for seller research and catalog tracking.",
"method": "GET",
"operationId": "getTaobaoShopItemListV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Shop identifier. Also known as Seller ID or User ID (they refer to the same value).",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "_sale",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `_sale`: Sales\n- `_default`: Default",
"enumValues": [
"_sale",
"_default"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/taobao/get-shop-item-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Shop Product List",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall shop Product List data, including item titles, prices, and images, for seller research and catalog tracking.",
"method": "GET",
"operationId": "getShopItemListV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Shop identifier. Also known as Seller ID or User ID (they refer to the same value).",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique shop identifier on Taobao/Tmall (shop ID).",
"enumValues": [],
"location": "query",
"name": "shopId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "coefp",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `coefp`: Comprehensive sorting\n- `hotsell`: Hot selling / Sales volume\n- `oldstarts`: New arrivals / Old starts\n- `bid`: Price: Low to High\n- `_bid`: Price: High to Low",
"enumValues": [
"coefp",
"hotsell",
"oldstarts",
"bid",
"_bid"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/taobao/get-shop-item-list/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Shop Product List",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall shop Product List data, including item titles, prices, and images, for seller research and catalog tracking.",
"method": "GET",
"operationId": "getShopItemListV3",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Shop identifier. Also known as Seller ID or User ID (they refer to the same value).",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique shop identifier on Taobao/Tmall (shop ID).",
"enumValues": [],
"location": "query",
"name": "shopId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "coefp",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `coefp`: Comprehensive sorting\n- `hotsell`: Hot selling / Sales volume\n- `oldstarts`: New arrivals / Old starts\n- `bid`: Price: Low to High\n- `_bid`: Price: High to Low",
"enumValues": [
"coefp",
"hotsell",
"oldstarts",
"bid",
"_bid"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/taobao/get-shop-item-list/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Shop Product List",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Search data, including titles, prices, and images, for product discovery.",
"method": "GET",
"operationId": "searchItemListV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "_sale",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `_sale`: Sales\n- `_bid`: Price: High to Low\n- `bid`: Price: Low to High\n- `_coefp`: General",
"enumValues": [
"_sale",
"_bid",
"bid",
"_coefp"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Whether to filter results to Tmall only.",
"enumValues": [],
"location": "query",
"name": "tmall",
"required": false,
"schemaType": "boolean"
},
{
"defaultValue": null,
"description": "Minimum price filter (inclusive).",
"enumValues": [],
"location": "query",
"name": "startPrice",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Maximum price filter (inclusive).",
"enumValues": [],
"location": "query",
"name": "endPrice",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/taobao/search-item-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Search",
"tags": [
"Taobao and Tmall"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Taobao and Tmall workflows with JustOneAPI, including product Details, product Reviews, and shop Product List across 10 operations.",
"displayName": "Taobao and Tmall",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Taobao and Tmall product Reviews data, including ratings, timestamps, and reviewer signals, for feedback analysis and product research.",
"method": "GET",
"operationId": "getItemCommentV3",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "feedbackdate",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `feedbackdate`: Sort by feedback date\n- `general`: General sorting",
"enumValues": [
"feedbackdate",
"general"
],
"location": "query",
"name": "orderType",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/taobao/get-item-comment/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Reviews",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.",
"method": "GET",
"operationId": "getTaobaoItemDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/taobao/get-item-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Details data through the task-backed v2 flow. If data is not ready within a short wait, the response returns a pending task status.",
"method": "GET",
"operationId": "getItemDetailV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/taobao/get-item-detail/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.",
"method": "GET",
"operationId": "getItemDetailV4",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/taobao/get-item-detail/v4",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.",
"method": "GET",
"operationId": "getItemDetailV5",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/taobao/get-item-detail/v5",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.",
"method": "GET",
"operationId": "getItemDetailV9",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "AUnique product identifier on Taobao/Tmall (item ID).",
"enumValues": [],
"location": "query",
"name": "itemId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/taobao/get-item-detail/v9",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Details",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall shop Product List data, including item titles, prices, and images, for seller research and catalog tracking.",
"method": "GET",
"operationId": "getTaobaoShopItemListV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Shop identifier. Also known as Seller ID or User ID (they refer to the same value).",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "_sale",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `_sale`: Sales\n- `_default`: Default",
"enumValues": [
"_sale",
"_default"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/taobao/get-shop-item-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Shop Product List",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall shop Product List data, including item titles, prices, and images, for seller research and catalog tracking.",
"method": "GET",
"operationId": "getShopItemListV2",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Shop identifier. Also known as Seller ID or User ID (they refer to the same value).",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique shop identifier on Taobao/Tmall (shop ID).",
"enumValues": [],
"location": "query",
"name": "shopId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "coefp",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `coefp`: Comprehensive sorting\n- `hotsell`: Hot selling / Sales volume\n- `oldstarts`: New arrivals / Old starts\n- `bid`: Price: Low to High\n- `_bid`: Price: High to Low",
"enumValues": [
"coefp",
"hotsell",
"oldstarts",
"bid",
"_bid"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/taobao/get-shop-item-list/v2",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Shop Product List",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall shop Product List data, including item titles, prices, and images, for seller research and catalog tracking.",
"method": "GET",
"operationId": "getShopItemListV3",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Shop identifier. Also known as Seller ID or User ID (they refer to the same value).",
"enumValues": [],
"location": "query",
"name": "userId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Unique shop identifier on Taobao/Tmall (shop ID).",
"enumValues": [],
"location": "query",
"name": "shopId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "coefp",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `coefp`: Comprehensive sorting\n- `hotsell`: Hot selling / Sales volume\n- `oldstarts`: New arrivals / Old starts\n- `bid`: Price: Low to High\n- `_bid`: Price: High to Low",
"enumValues": [
"coefp",
"hotsell",
"oldstarts",
"bid",
"_bid"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/taobao/get-shop-item-list/v3",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Shop Product List",
"tags": [
"Taobao and Tmall"
]
},
{
"description": "Get Taobao and Tmall product Search data, including titles, prices, and images, for product discovery.",
"method": "GET",
"operationId": "searchItemListV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search keyword.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "_sale",
"description": "Sort order for the result set.\n\nAvailable Values:\n- `_sale`: Sales\n- `_bid`: Price: High to Low\n- `bid`: Price: Low to High\n- `_coefp`: General",
"enumValues": [
"_sale",
"_bid",
"bid",
"_coefp"
],
"location": "query",
"name": "sort",
"required": false,
"schemaType": "string"
},
{
"defaultValue": false,
"description": "Whether to filter results to Tmall only.",
"enumValues": [],
"location": "query",
"name": "tmall",
"required": false,
"schemaType": "boolean"
},
{
"defaultValue": null,
"description": "Minimum price filter (inclusive).",
"enumValues": [],
"location": "query",
"name": "startPrice",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Maximum price filter (inclusive).",
"enumValues": [],
"location": "query",
"name": "endPrice",
"required": false,
"schemaType": "string"
},
{
"defaultValue": 1,
"description": "Page number for pagination.",
"enumValues": [],
"location": "query",
"name": "page",
"required": false,
"schemaType": "integer"
}
],
"path": "/api/taobao/search-item-list/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Product Search",
"tags": [
"Taobao and Tmall"
]
}
],
"platformKey": "taobao",
"primaryTag": "Taobao and Tmall",
"skillName": "justoneapi_taobao",
"slug": "justoneapi-taobao",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Taobao and Tmall operations
Generated from JustOneAPI OpenAPI for platform key `taobao`.
## `getItemCommentV3`
- Method: `GET`
- Path: `/api/taobao/get-item-comment/v3`
- Summary: Product Reviews
- Description: Get Taobao and Tmall product Reviews data, including ratings, timestamps, and reviewer signals, for feedback analysis and product research.
- Tags: `Taobao and Tmall`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |
| `orderType` | `query` | no | `string` | `feedbackdate` | Sort order for the result set.
Available Values:
- `feedbackdate`: Sort by feedback date
- `general`: General sorting |
| enum | values | no | n/a | n/a | `feedbackdate`, `general` |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
### Request body
No request body.
### Responses
- `200`: OK
## `getTaobaoItemDetailV1`
- Method: `GET`
- Path: `/api/taobao/get-item-detail/v1`
- Summary: Product Details
- Description: Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.
- Tags: `Taobao and Tmall`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |
### Request body
No request body.
### Responses
- `200`: OK
## `getItemDetailV2`
- Method: `GET`
- Path: `/api/taobao/get-item-detail/v2`
- Summary: Product Details
- Description: Get Taobao and Tmall product Details data through the task-backed v2 flow. If data is not ready within a short wait, the response returns a pending task status.
- Tags: `Taobao and Tmall`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |
### Request body
No request body.
### Responses
- `200`: OK
## `getItemDetailV4`
- Method: `GET`
- Path: `/api/taobao/get-item-detail/v4`
- Summary: Product Details
- Description: Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.
- Tags: `Taobao and Tmall`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |
### Request body
No request body.
### Responses
- `200`: OK
## `getItemDetailV5`
- Method: `GET`
- Path: `/api/taobao/get-item-detail/v5`
- Summary: Product Details
- Description: Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.
- Tags: `Taobao and Tmall`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |
### Request body
No request body.
### Responses
- `200`: OK
## `getItemDetailV9`
- Method: `GET`
- Path: `/api/taobao/get-item-detail/v9`
- Summary: Product Details
- Description: Get Taobao and Tmall product Details data, including pricing, images, and shop details, for product research, catalog monitoring, and ecommerce analysis.
- Tags: `Taobao and Tmall`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |
### Request body
No request body.
### Responses
- `200`: OK
## `getTaobaoShopItemListV1`
- Method: `GET`
- Path: `/api/taobao/get-shop-item-list/v1`
- Summary: Shop Product List
- Description: Get Taobao and Tmall shop Product List data, including item titles, prices, and images, for seller research and catalog tracking.
- Tags: `Taobao and Tmall`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `userId` | `query` | yes | `string` | n/a | Shop identifier. Also known as Seller ID or User ID (they refer to the same value). |
| `sort` | `query` | no | `string` | `_sale` | Sort order for the result set.
Available Values:
- `_sale`: Sales
- `_default`: Default |
| enum | values | no | n/a | n/a | `_sale`, `_default` |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
### Request body
No request body.
### Responses
- `200`: OK
## `getShopItemListV2`
- Method: `GET`
- Path: `/api/taobao/get-shop-item-list/v2`
- Summary: Shop Product List
- Description: Get Taobao and Tmall shop Product List data, including item titles, prices, and images, for seller research and catalog tracking.
- Tags: `Taobao and Tmall`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `userId` | `query` | yes | `string` | n/a | Shop identifier. Also known as Seller ID or User ID (they refer to the same value). |
| `shopId` | `query` | yes | `string` | n/a | Unique shop identifier on Taobao/Tmall (shop ID). |
| `sort` | `query` | no | `string` | `coefp` | Sort order for the result set.
Available Values:
- `coefp`: Comprehensive sorting
- `hotsell`: Hot selling / Sales volume
- `oldstarts`: New arrivals / Old starts
- `bid`: Price: Low to High
- `_bid`: Price: High to Low |
| enum | values | no | n/a | n/a | `coefp`, `hotsell`, `oldstarts`, `bid`, `_bid` |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
### Request body
No request body.
### Responses
- `200`: OK
## `getShopItemListV3`
- Method: `GET`
- Path: `/api/taobao/get-shop-item-list/v3`
- Summary: Shop Product List
- Description: Get Taobao and Tmall shop Product List data, including item titles, prices, and images, for seller research and catalog tracking.
- Tags: `Taobao and Tmall`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `userId` | `query` | yes | `string` | n/a | Shop identifier. Also known as Seller ID or User ID (they refer to the same value). |
| `shopId` | `query` | yes | `string` | n/a | Unique shop identifier on Taobao/Tmall (shop ID). |
| `sort` | `query` | no | `string` | `coefp` | Sort order for the result set.
Available Values:
- `coefp`: Comprehensive sorting
- `hotsell`: Hot selling / Sales volume
- `oldstarts`: New arrivals / Old starts
- `bid`: Price: Low to High
- `_bid`: Price: High to Low |
| enum | values | no | n/a | n/a | `coefp`, `hotsell`, `oldstarts`, `bid`, `_bid` |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
### Request body
No request body.
### Responses
- `200`: OK
## `searchItemListV1`
- Method: `GET`
- Path: `/api/taobao/search-item-list/v1`
- Summary: Product Search
- Description: Get Taobao and Tmall product Search data, including titles, prices, and images, for product discovery.
- Tags: `Taobao and Tmall`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `keyword` | `query` | yes | `string` | n/a | Search keyword. |
| `sort` | `query` | no | `string` | `_sale` | Sort order for the result set.
Available Values:
- `_sale`: Sales
- `_bid`: Price: High to Low
- `bid`: Price: Low to High
- `_coefp`: General |
| enum | values | no | n/a | n/a | `_sale`, `_bid`, `bid`, `_coefp` |
| `tmall` | `query` | no | `boolean` | `false` | Whether to filter results to Tmall only. |
| `startPrice` | `query` | no | `string` | n/a | Minimum price filter (inclusive). |
| `endPrice` | `query` | no | `string` | n/a | Maximum price filter (inclusive). |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze Social Media workflows with JustOneAPI, including cross-Platform Search.
---
name: Social Media API
description: Analyze Social Media workflows with JustOneAPI, including cross-Platform Search.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_search"}}
---
# Social Media
This skill wraps 1 Social Media operations exposed by JustOneAPI. It is strongest for cross-Platform Search. Expect common inputs such as `end`, `keyword`, `nextCursor`, `source`, `start`.
## When To Use It
- The user needs cross-Platform Search on Social Media.
- The user can provide identifiers or filters such as `end`, `keyword`, `nextCursor`, `source`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `searchCrossPlatformV1`: Cross-Platform Search — Get cross-platform social media search data, including Xiaohongshu, Douyin, Kuaishou, WeChat, Bilibili, Weibo and Zhihu results, for trend research and monitoring
## Request Pattern
- 1 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `end`, `keyword`, `nextCursor`, `source`, `start`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `searchCrossPlatformV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_search&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_search&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the Social Media task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `searchCrossPlatformV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `end`, `keyword`, `nextCursor`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Social Media workflows with JustOneAPI, including cross-Platform Search.",
"displayName": "Social Media",
"openapi": "3.1.0",
"platformKey": "search",
"primaryTag": "Social Media",
"skillName": "justoneapi_search",
"slug": "justoneapi-search",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get cross-platform social media search data, including Xiaohongshu, Douyin, Kuaishou, WeChat, Bilibili, Weibo and Zhihu results, for trend research and monitoring.",
"method": "GET",
"operationId": "searchCrossPlatformV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search query string. Supports:\n- Multiple keywords (AND): keyword1 keyword2\n- Multiple keywords (OR): keyword1~keyword2\n- Excluded keywords (NOT): required_keyword -excluded_keyword",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Target social media platform for search filtering.\n\nAvailable Values:\n- `ALL`: All platforms\n- `NEWS`: News\n- `WEIBO`: Sina Weibo\n- `WEIXIN`: Weixin (WeChat)\n- `ZHIHU`: Zhihu\n- `DOUYIN`: Douyin (TikTok China)\n- `XIAOHONGSHU`: Xiaohongshu (Little Red Book)\n- `BILIBILI`: Bilibili\n- `KUAISHOU`: Kuaishou",
"enumValues": [
"ALL",
"NEWS",
"WEIBO",
"WEIXIN",
"ZHIHU",
"DOUYIN",
"XIAOHONGSHU",
"BILIBILI",
"KUAISHOU"
],
"location": "query",
"name": "source",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Start time of the search period (yyyy-MM-dd HH:mm:ss). Required for initial request.",
"enumValues": [],
"location": "query",
"name": "start",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "End time of the search period (yyyy-MM-dd HH:mm:ss). Required for initial request.",
"enumValues": [],
"location": "query",
"name": "end",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor provided by the 'nextCursor' field in the previous response.",
"enumValues": [],
"location": "query",
"name": "nextCursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Cross-Platform Search",
"tags": [
"Social Media"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Social Media workflows with JustOneAPI, including cross-Platform Search.",
"displayName": "Social Media",
"openapi": "3.1.0",
"operations": [
{
"description": "Get cross-platform social media search data, including Xiaohongshu, Douyin, Kuaishou, WeChat, Bilibili, Weibo and Zhihu results, for trend research and monitoring.",
"method": "GET",
"operationId": "searchCrossPlatformV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search query string. Supports:\n- Multiple keywords (AND): keyword1 keyword2\n- Multiple keywords (OR): keyword1~keyword2\n- Excluded keywords (NOT): required_keyword -excluded_keyword",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": false,
"schemaType": "string"
},
{
"defaultValue": "ALL",
"description": "Target social media platform for search filtering.\n\nAvailable Values:\n- `ALL`: All platforms\n- `NEWS`: News\n- `WEIBO`: Sina Weibo\n- `WEIXIN`: Weixin (WeChat)\n- `ZHIHU`: Zhihu\n- `DOUYIN`: Douyin (TikTok China)\n- `XIAOHONGSHU`: Xiaohongshu (Little Red Book)\n- `BILIBILI`: Bilibili\n- `KUAISHOU`: Kuaishou",
"enumValues": [
"ALL",
"NEWS",
"WEIBO",
"WEIXIN",
"ZHIHU",
"DOUYIN",
"XIAOHONGSHU",
"BILIBILI",
"KUAISHOU"
],
"location": "query",
"name": "source",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Start time of the search period (yyyy-MM-dd HH:mm:ss). Required for initial request.",
"enumValues": [],
"location": "query",
"name": "start",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "End time of the search period (yyyy-MM-dd HH:mm:ss). Required for initial request.",
"enumValues": [],
"location": "query",
"name": "end",
"required": false,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Pagination cursor provided by the 'nextCursor' field in the previous response.",
"enumValues": [],
"location": "query",
"name": "nextCursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Cross-Platform Search",
"tags": [
"Social Media"
]
}
],
"platformKey": "search",
"primaryTag": "Social Media",
"skillName": "justoneapi_search",
"slug": "justoneapi-search",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Social Media operations
Generated from JustOneAPI OpenAPI for platform key `search`.
## `searchCrossPlatformV1`
- Method: `GET`
- Path: `/api/search/v1`
- Summary: Cross-Platform Search
- Description: Get cross-platform social media search data, including Xiaohongshu, Douyin, Kuaishou, WeChat, Bilibili, Weibo and Zhihu results, for trend research and monitoring.
- Tags: `Social Media`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `keyword` | `query` | no | `string` | n/a | Search query string. Supports:
- Multiple keywords (AND): keyword1 keyword2
- Multiple keywords (OR): keyword1~keyword2
- Excluded keywords (NOT): required_keyword -excluded_keyword |
| `source` | `query` | no | `string` | `ALL` | Target social media platform for search filtering.
Available Values:
- `ALL`: All platforms
- `NEWS`: News
- `WEIBO`: Sina Weibo
- `WEIXIN`: Weixin (WeChat)
- `ZHIHU`: Zhihu
- `DOUYIN`: Douyin (TikTok China)
- `XIAOHONGSHU`: Xiaohongshu (Little Red Book)
- `BILIBILI`: Bilibili
- `KUAISHOU`: Kuaishou |
| enum | values | no | n/a | n/a | `ALL`, `NEWS`, `WEIBO`, `WEIXIN`, `ZHIHU`, `DOUYIN`, `XIAOHONGSHU`, `BILIBILI`, `KUAISHOU` |
| `start` | `query` | no | `string` | n/a | Start time of the search period (yyyy-MM-dd HH:mm:ss). Required for initial request. |
| `end` | `query` | no | `string` | n/a | End time of the search period (yyyy-MM-dd HH:mm:ss). Required for initial request. |
| `nextCursor` | `query` | no | `string` | n/a | Pagination cursor provided by the 'nextCursor' field in the previous response. |
### Request body
No request body.
### Responses
- `200`: OK
Analyze Reddit workflows with JustOneAPI, including post Details, post Comments, and keyword Search.
---
name: Reddit API
description: Analyze Reddit workflows with JustOneAPI, including post Details, post Comments, and keyword Search.
author: JustOneAPI
homepage: https://api.justoneapi.com
metadata: {"openclaw":{"homepage":"https://api.justoneapi.com","primaryEnv":"JUST_ONE_API_TOKEN","requires":{"bins":["node"],"env":["JUST_ONE_API_TOKEN"]},"skillKey":"justoneapi_reddit"}}
---
# Reddit
This skill wraps 3 Reddit operations exposed by JustOneAPI. It is strongest for post Details, post Comments, and keyword Search. Expect common inputs such as `postId`, `after`, `cursor`, `keyword`.
## When To Use It
- The user needs post Details or post Comments on Reddit.
- The task lines up with keyword Search rather than a generic cross-platform workflow.
- The user can provide identifiers or filters such as `postId`, `after`, `cursor`, `keyword`.
- The user wants an exact API-backed answer instead of a freeform summary.
## Representative Operations
- `getRedditPostDetailV1`: Post Details — Get Reddit post Details data, including author details, subreddit info, and engagement counts, for content analysis, moderation research, and monitoring
- `getRedditPostCommentsV1`: Post Comments — Get Reddit post Comments data, including text, authors, and timestamps, for discussion analysis and moderation research
- `searchRedditV1`: Keyword Search — Get Reddit keyword Search data, including titles, authors, and subreddit context, for topic discovery and monitoring
## Request Pattern
- 3 operations are available in this skill.
- HTTP methods used here: `GET`.
- The most common non-token parameters are `postId`, `after`, `cursor`, `keyword`.
- All operations in this skill are parameter-driven requests; none require a request body.
## How To Work
1. Read `generated/operations.md` before choosing an endpoint.
2. Start with one of these operations when it matches the user's request: `getRedditPostDetailV1`, `getRedditPostCommentsV1`, `searchRedditV1`.
3. Pick the smallest matching operation instead of guessing.
4. Ask the user for any missing required parameter. Do not invent values.
5. Call the helper with:
```bash
node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}'
```
## Environment
- Required: `JUST_ONE_API_TOKEN`
- This skill uses `JUST_ONE_API_TOKEN` only for authenticated Just One API requests.
- Keep `JUST_ONE_API_TOKEN` private. Do not paste it into chat messages, screenshots, or logs.
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_reddit&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_reddit&utm_content=project_link).
## Output Rules
- Start with a plain-language answer tied to the Reddit task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
- When using `getRedditPostDetailV1`, explain why the returned fields answer the user's question.
- If the user gave filters such as `postId`, `after`, `cursor`, echo those back so the scope is explicit.
- If the backend errors, include the backend payload and the exact operation ID.
FILE:bin/run.mjs
#!/usr/bin/env node
const manifest = {
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Reddit workflows with JustOneAPI, including post Details, post Comments, and keyword Search.",
"displayName": "Reddit",
"openapi": "3.1.0",
"platformKey": "reddit",
"primaryTag": "Reddit",
"skillName": "justoneapi_reddit",
"slug": "justoneapi-reddit",
"sourceTitle": "OpenAPI definition",
"operations": [
{
"description": "Get Reddit post Comments data, including text, authors, and timestamps, for discussion analysis and moderation research.",
"method": "GET",
"operationId": "getRedditPostCommentsV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier of the Reddit post.",
"enumValues": [],
"location": "query",
"name": "postId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Pagination token for the next page of results.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/reddit/get-post-comments/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Comments",
"tags": [
"Reddit"
]
},
{
"description": "Get Reddit post Details data, including author details, subreddit info, and engagement counts, for content analysis, moderation research, and monitoring.",
"method": "GET",
"operationId": "getRedditPostDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier of the Reddit post (e.g., 't3_1q4aqti').",
"enumValues": [],
"location": "query",
"name": "postId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/reddit/get-post-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Details",
"tags": [
"Reddit"
]
},
{
"description": "Get Reddit keyword Search data, including titles, authors, and subreddit context, for topic discovery and monitoring.",
"method": "GET",
"operationId": "searchRedditV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search query keywords.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Pagination token to retrieve the next set of results.",
"enumValues": [],
"location": "query",
"name": "after",
"required": false,
"schemaType": "string"
}
],
"path": "/api/reddit/search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Keyword Search",
"tags": [
"Reddit"
]
}
]
};
const args = parseArgs(process.argv.slice(2));
if (!args.operation) {
fail("Missing required --operation argument.");
}
const operation = manifest.operations.find((item) => item.operationId === args.operation);
if (!operation) {
fail(`Unknown operation "args.operation".`, { availableOperations: manifest.operations.map((item) => item.operationId) });
}
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);
const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);
const requestInit = {
headers: {
"accept": "application/json",
},
method: operation.method,
};
if (operation.requestBody && params.body !== undefined) {
requestInit.body = JSON.stringify(params.body);
requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json";
}
let response;
try {
response = await fetch(url, requestInit);
} catch (error) {
fail("Network request failed.", {
cause: error instanceof Error ? error.message : String(error),
operationId: operation.operationId,
});
}
const rawBody = await response.text();
let parsedBody;
try {
parsedBody = rawBody ? JSON.parse(rawBody) : null;
} catch (error) {
if (!response.ok) {
fail("Backend returned a non-JSON error response.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
fail("Backend returned invalid JSON.", {
body: rawBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
if (!response.ok) {
fail("Backend request failed.", {
body: parsedBody,
operationId: operation.operationId,
status: response.status,
statusText: response.statusText,
});
}
process.stdout.write(`JSON.stringify(parsedBody, null, 2)\n`);
function parseArgs(argv) {
const parsed = { operation: null, paramsJson: "{}", token: null };
for (let index = 0; index < argv.length; index += 1) {
const flag = argv[index];
const value = argv[index + 1];
if (flag === "--operation") {
parsed.operation = value;
index += 1;
continue;
}
if (flag === "--params-json") {
parsed.paramsJson = value;
index += 1;
continue;
}
if (flag === "--token") {
parsed.token = value;
index += 1;
continue;
}
fail(`Unknown argument "flag".`);
}
return parsed;
}
function parseParams(input) {
try {
const parsed = JSON.parse(input || "{}");
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
fail("--params-json must decode to a JSON object.");
}
return parsed;
} catch (error) {
fail("Failed to parse --params-json.", {
cause: error instanceof Error ? error.message : String(error),
});
}
}
function applyDefaults(operation, params) {
for (const parameter of operation.parameters) {
if (params[parameter.name] === undefined && parameter.defaultValue !== null) {
params[parameter.name] = parameter.defaultValue;
}
}
}
function injectToken(operation, params, cliToken) {
const tokenParam = operation.parameters.find((parameter) => parameter.name === "token");
if (!tokenParam || params.token !== undefined) {
return;
}
if (!cliToken) {
fail("--token is required for this operation.", {
operationId: operation.operationId,
});
}
params.token = cliToken;
}
function validateRequired(operation, params) {
const missing = [];
for (const parameter of operation.parameters) {
if (parameter.required && params[parameter.name] === undefined) {
missing.push(parameter.name);
}
}
if (operation.requestBody?.required && params.body === undefined) {
missing.push("body");
}
if (missing.length) {
fail("Missing required parameters.", {
missing,
operationId: operation.operationId,
});
}
}
function applyPathParams(operation, params, url) {
let pathname = url.pathname;
for (const parameter of operation.parameters.filter((item) => item.location === "path")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
pathname = pathname.replace(`{parameter.name}`, encodeURIComponent(String(value)));
}
url.pathname = pathname;
}
function applyQueryParams(operation, params, url) {
for (const parameter of operation.parameters.filter((item) => item.location === "query")) {
const value = params[parameter.name];
if (value === undefined) {
continue;
}
appendValue(url.searchParams, parameter.name, value);
}
}
function appendValue(searchParams, name, value) {
if (Array.isArray(value)) {
for (const item of value) {
appendValue(searchParams, name, item);
}
return;
}
if (value && typeof value === "object") {
searchParams.append(name, JSON.stringify(value));
return;
}
searchParams.append(name, String(value));
}
function ensureBaseUrl(value) {
return value.endsWith("/") ? value : `value/`;
}
function fail(message, details = null) {
const payload = { message };
if (details) {
payload.details = details;
}
process.stderr.write(`JSON.stringify(payload, null, 2)\n`);
process.exit(1);
}
FILE:generated/operations.json
{
"baseUrl": "https://api.justoneapi.com",
"description": "Analyze Reddit workflows with JustOneAPI, including post Details, post Comments, and keyword Search.",
"displayName": "Reddit",
"openapi": "3.1.0",
"operations": [
{
"description": "Get Reddit post Comments data, including text, authors, and timestamps, for discussion analysis and moderation research.",
"method": "GET",
"operationId": "getRedditPostCommentsV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier of the Reddit post.",
"enumValues": [],
"location": "query",
"name": "postId",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Pagination token for the next page of results.",
"enumValues": [],
"location": "query",
"name": "cursor",
"required": false,
"schemaType": "string"
}
],
"path": "/api/reddit/get-post-comments/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Comments",
"tags": [
"Reddit"
]
},
{
"description": "Get Reddit post Details data, including author details, subreddit info, and engagement counts, for content analysis, moderation research, and monitoring.",
"method": "GET",
"operationId": "getRedditPostDetailV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "The unique identifier of the Reddit post (e.g., 't3_1q4aqti').",
"enumValues": [],
"location": "query",
"name": "postId",
"required": true,
"schemaType": "string"
}
],
"path": "/api/reddit/get-post-detail/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Post Details",
"tags": [
"Reddit"
]
},
{
"description": "Get Reddit keyword Search data, including titles, authors, and subreddit context, for topic discovery and monitoring.",
"method": "GET",
"operationId": "searchRedditV1",
"parameters": [
{
"defaultValue": null,
"description": "Access token for this API service.",
"enumValues": [],
"location": "query",
"name": "token",
"required": true,
"schemaType": "string"
},
{
"defaultValue": null,
"description": "Search query keywords.",
"enumValues": [],
"location": "query",
"name": "keyword",
"required": true,
"schemaType": "string"
},
{
"defaultValue": "",
"description": "Pagination token to retrieve the next set of results.",
"enumValues": [],
"location": "query",
"name": "after",
"required": false,
"schemaType": "string"
}
],
"path": "/api/reddit/search/v1",
"requestBody": null,
"responses": [
{
"description": "OK",
"statusCode": "200"
}
],
"summary": "Keyword Search",
"tags": [
"Reddit"
]
}
],
"platformKey": "reddit",
"primaryTag": "Reddit",
"skillName": "justoneapi_reddit",
"slug": "justoneapi-reddit",
"sourceTitle": "OpenAPI definition"
}
FILE:generated/operations.md
# Reddit operations
Generated from JustOneAPI OpenAPI for platform key `reddit`.
## `getRedditPostCommentsV1`
- Method: `GET`
- Path: `/api/reddit/get-post-comments/v1`
- Summary: Post Comments
- Description: Get Reddit post Comments data, including text, authors, and timestamps, for discussion analysis and moderation research.
- Tags: `Reddit`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `postId` | `query` | yes | `string` | n/a | The unique identifier of the Reddit post. |
| `cursor` | `query` | no | `string` | n/a | Pagination token for the next page of results. |
### Request body
No request body.
### Responses
- `200`: OK
## `getRedditPostDetailV1`
- Method: `GET`
- Path: `/api/reddit/get-post-detail/v1`
- Summary: Post Details
- Description: Get Reddit post Details data, including author details, subreddit info, and engagement counts, for content analysis, moderation research, and monitoring.
- Tags: `Reddit`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `postId` | `query` | yes | `string` | n/a | The unique identifier of the Reddit post (e.g., 't3_1q4aqti'). |
### Request body
No request body.
### Responses
- `200`: OK
## `searchRedditV1`
- Method: `GET`
- Path: `/api/reddit/search/v1`
- Summary: Keyword Search
- Description: Get Reddit keyword Search data, including titles, authors, and subreddit context, for topic discovery and monitoring.
- Tags: `Reddit`
### Parameters
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `keyword` | `query` | yes | `string` | n/a | Search query keywords. |
| `after` | `query` | no | `string` | n/a | Pagination token to retrieve the next set of results. |
### Request body
No request body.
### Responses
- `200`: OK