Skill: justoneapi/justoneapi-xiaohongshu-pgy-api-solar-kol-data-v2-notes-detail (version 1.0.0)

--- name: Xiaohongshu Creator Marketplace (Pugongying) User Published Notes API description: Call GET /api/xiaohongshu-pgy/api/solar/kol/dataV2/notesDetail/v1 for Xiaohongshu Creator Marketplace (Pugongying) User Published Notes through JustOneAPI with userId. 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":[REDACTED_SECRET]}} --- # Xiaohongshu Creator Marketplace (Pugongying) User Published Notes Use this focused JustOneAPI skill for user Published Notes in Xiaohongshu Creator Marketplace (Pugongying). It targets `GET /api/xiaohongshu-pgy/api/solar/kol/dataV2/notesDetail/v1`. Required non-token inputs are `userId`. OpenAPI describes it as: Get Xiaohongshu Creator Marketplace (Pugongying) user Published Notes data, including note metadata and engagement signals, for creator monitoring and campaign research. ## Endpoint Scope - Platform key: `xiaohongshu-pgy` - Endpoint key: [REDACTED_SECRET] - Platform family: Xiaohongshu Creator Marketplace (Pugongying) - Skill slug: [REDACTED_SECRET] | Operation | Version | Method | Path | OpenAPI summary | | --- | --- | --- | --- | --- | | `apiSolarKolDataV2NotesDetailV1` | `v1` | `GET` | [REDACTED_SECRET] | User Published Notes | ## Inputs | Parameter | In | Required by | Optional by | Type | Notes | | --- | --- | --- | --- | --- | --- | | `advertiseSwitch` | `query` | n/a | all | `string` | Advertisement filter. Available Values: - `ALL`: All notes - `ORGANIC_ONLY`: Organic notes only | | `advertiseSwitch` enum | values | n/a | n/a | n/a | `ALL`, `ORGANIC_ONLY` | | `isThirdPlatform` | `query` | n/a | all | `string` | Whether from third-party platform. Available Values: - `NO`: No - `YES`: Yes | | `isThirdPlatform` enum | values | n/a | n/a | n/a | `NO`, `YES` | | `noteType` | `query` | n/a | all | `string` | Type of note. Available Values: - `ALL`: All types - `COOPERATION`: Cooperation notes - `PHOTO_TEXT`: Photo and Text - `VIDEO`: Video only | | `noteType` enum | values | n/a | n/a | n/a | `ALL`, `COOPERATION`, `PHOTO_TEXT`, `VIDEO` | | `orderType` | `query` | n/a | all | `string` | Sorting order. Available Values: - `LATEST`: Latest - `MOST_READ`: Most read - `MOST_INTERACT`: Most interactions | | `orderType` enum | values | n/a | n/a | n/a | `LATEST`, `MOST_INTERACT`, `MOST_READ` | | `pageNumber` | `query` | n/a | all | `integer` | Page number | | `userId` | `query` | all | n/a | `string` | KOL's user ID | Request body: none documented; send parameters through path or query arguments. ## Version Choice Use `apiSolarKolDataV2NotesDetailV1` for the documented `v1` endpoint. There are no alternate versions grouped in this skill. ## Run This Endpoint Supported operation IDs in this skill: `apiSolarKolDataV2NotesDetailV1`. ```bash node {baseDir}/bin/run.mjs --operation "apiSolarKolDataV2NotesDetailV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"userId":"<userId>"}' ``` 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_xiaohongshu_pgy_api_solar_kol_data_v2_notes_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_xiaohongshu_pgy_api_solar_kol_data_v2_notes_detail&utm_content=project_link). ## Output Focus - State the operation ID and endpoint path used, for example `apiSolarKolDataV2NotesDetailV1` on [REDACTED_SECRET]. - Echo the required lookup scope (`userId`) before summarizing results. - Prioritize fields that support this endpoint purpose: Get Xiaohongshu Creator Marketplace (Pugongying) user Published Notes data, including note metadata and engagement signals, for creator monitoring and campaign research. - Return raw JSON only after the short, endpoint-specific summary. - If the backend errors, include the backend payload and the exact operation ID.

path: bin/run.mjs
content: #!/usr/bin/env node
const manifest = {
  "baseUrl": "https://api.justoneapi.com",
  "description": "Call GET /api/xiaohongshu-pgy/api/solar/kol/dataV2/notesDetail/v1 for Xiaohongshu Creator Marketplace (Pugongying) User Published Notes through JustOneAPI with userId.",
  "displayName": "Xiaohongshu Creator Marketplace (Pugongying) User Published Notes",
  "openapi": "3.1.0",
  "platformKey": "xiaohongshu-pgy",
  "primaryTag": "Xiaohongshu Creator Marketplace (Pugongying)",
  "skillName": "justoneapi_xiaohongshu_pgy_api_solar_kol_data_v2_notes_detail",
  "slug": "justoneapi-xiaohongshu-pgy-api-solar-kol-data-v2-notes-detail",
  "sourceTitle": "OpenAPI definition",
  "operations": [
    {
      "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": [REDACTED_SECRET],
      "requestBody": null,
      "responses": [
        {
          "description": "OK",
          "statusCode": "200"
        }
      ],
      "summary": "User Published Notes",
      "tags": [
        "Xiaohongshu Creator Marketplace (Pugongying)"
      ]
    }
  ],
  "endpointPath": [REDACTED_SECRET],
  "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.[REDACTED_SECRET];
}

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);
}


path: generated/operations.json
content: {
  "baseUrl": "https://api.justoneapi.com",
  "description": "Call GET /api/xiaohongshu-pgy/api/solar/kol/dataV2/notesDetail/v1 for Xiaohongshu Creator Marketplace (Pugongying) User Published Notes through JustOneAPI with userId.",
  "displayName": "Xiaohongshu Creator Marketplace (Pugongying) User Published Notes",
  "endpointPath": [REDACTED_SECRET],
  "openapi": "3.1.0",
  "operations": [
    {
      "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": [REDACTED_SECRET],
      "requestBody": null,
      "responses": [
        {
          "description": "OK",
          "statusCode": "200"
        }
      ],
      "summary": "User Published Notes",
      "tags": [
        "Xiaohongshu Creator Marketplace (Pugongying)"
      ]
    }
  ],
  "platformKey": "xiaohongshu-pgy",
  "primaryTag": "Xiaohongshu Creator Marketplace (Pugongying)",
  "skillName": "justoneapi_xiaohongshu_pgy_api_solar_kol_data_v2_notes_detail",
  "skillType": "interface",
  "slug": "justoneapi-xiaohongshu-pgy-api-solar-kol-data-v2-notes-detail",
  "sourceTitle": "OpenAPI definition"
}


path: generated/operations.md
content: # Xiaohongshu Creator Marketplace (Pugongying) User Published Notes operations

Generated from JustOneAPI OpenAPI for platform key `xiaohongshu-pgy`.

Endpoint group: [REDACTED_SECRET].

## `apiSolarKolDataV2NotesDetailV1`

- Method: `GET`
- Path: [REDACTED_SECRET]
- 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


Security scan verdicts — ClawScan: suspicious | static analysis: suspicious | VirusTotal: clean | SkillSpector: clean (LOW)