Xiaohongshu Pgy APIs - Note Details (V1)
DEPRECATED
This endpoint is deprecated and may be removed in future versions.
Get note details (Legacy).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | Yes | User authentication token. |
noteId | query | string | Yes | Note ID. |
acceptCache | query | boolean | No | Enable cache. |
Code Samples
💡 Environment Note
Default samples use https://api.justoneapi.com (prod-global). For users in Mainland China, it is recommended to replace it with http://47.117.133.51:30015 (prod-cn) for better performance. See Environment Guide.
bash
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/xiaohongshu-pgy/get-note-detail/v1?token=YOUR_API_KEY¬eId=VALUE"text
I want to use the "Note Details (V1) [Deprecated]" API from Just One API.
API Endpoint: https://api.justoneapi.com/api/xiaohongshu-pgy/get-note-detail/v1
HTTP Method: GET
Authentication: Append "?token=YOUR_API_KEY" to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/xiaohongshu-pgy-apis/note-details-v1-deprecated-en.json
Parameters:
- token (query): User authentication token. (Required)
- noteId (query): Note ID. (Required)
- acceptCache (query): Enable cache.
Return format: JSON
Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set request timeout to at least 60 seconds.
3. Business Code Reference:
- 0: Success
- 100: Invalid or Inactive Token
- 301: Collection Failed. Please Retry.
- 302: Rate Limit Exceeded
- 303: Daily Quota Exceeded
- 400: Invalid Parameters
- 500: Internal Server Error
- 600: Permission Denied
- 601: Insufficient Balance
Please help me write a script in my preferred programming language to call this API and handle the response.python
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import requests
url = "https://api.justoneapi.com/api/xiaohongshu-pgy/get-note-detail/v1?token=YOUR_API_KEY¬eId=VALUE"
response = requests.get(url)
print(response.json())js
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/xiaohongshu-pgy/get-note-detail/v1?token=YOUR_API_KEY¬eId=VALUE", {
method: "GET"
});
const data = await response.json();
console.log(data);java
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.justoneapi.com/api/xiaohongshu-pgy/get-note-detail/v1?token=YOUR_API_KEY¬eId=VALUE"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}go
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
url := "https://api.justoneapi.com/api/xiaohongshu-pgy/get-note-detail/v1?token=YOUR_API_KEY¬eId=VALUE"
req, _ := http.NewRequest("GET", url, nil)
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}php
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/xiaohongshu-pgy/get-note-detail/v1?token=YOUR_API_KEY¬eId=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;Responses
json
{
"code": 0,
"data": {
"noteId": "67f32a94000000001d02eb4a",
"noteLink": "https://www.xiaohongshu.com/explore/67f32a94000000001d02eb4a?xsec_token=MBhBJYIiKLzqhnqYBouOdEG79_loLP-kryE6IgEeqLViY=&xsec_source=pc_pgy",
"userId": "674eadbb000000001c01981e",
"headPhoto": null,
"name": null,
"redId": null,
"type": 1,
"atUserList": null,
"title": "上海落户普通人指南",
"content": "✌️听说了吗?家人们!上海真的太给力啦!!\n上海为了吸引和留住人才,开年就对上海落户zc再次迎来调整,为各类人才提供更加清晰、多元化的落户路径。很多宝子可能都不知道🤷,千万不能错过哦!!\n-\n✅这次申请上海户口pass三个限制!\n🎈居转户前4年不规定社保!!累计缴纳2倍就行\n🎈人才引进换公司社保可以中断!!\n🎈留学生第一份工作可以不在上海!!\n-\n⭕️但是户口不是白拿的,需要满足其中一个条件哦~\n1️⃣居转户落户\n7年居转户+无中级职称+后4年36个月2倍社保\n7年居转户+有中级职称+后4年36个月1.3倍社保\n5年居住证+5年社保+后4年36个月3倍社保\n5年居住证+5年社保+临港企业其中3年1倍社保\n\t\n2️⃣留学生\nTop50直接落户\nTop51-100+6个月社保/不限基数\nTop101-500+半年1倍社保 Top500以外+1年1.5倍社保\n留学生+入职事业单位有编制\n\t\n3️⃣人才引进落户\n本科双证+高新企业+2年2倍社保\n硕士+高新企业+1年2倍社保\n高级职称+半年2倍社保\n企业高管+3年纳税百万+3倍社保\n-\n申请上海户口有利有弊,需根据个人情况权衡。如果长期在上海发展,那么这些条件是比较利好的。\n希望对大家有帮助,有想申请的,或者解决不了的也可以先嘶我了解!\n#上海落户[话题]##落户上海[话题]##落户[话题]##居转户[话题]##居转户落户上海[话题]##留学生落户[话题]##上海留学生落户[话题]##人才引进[话题]##人才引进落户上海[话题]#",
"imagesList": [
{
"fileId": "1040g2sg31g0do7qs0g805pqelmtn360u19eae60",
"url": "http://ci.xiaohongshu.com/1040g2sg31g0do7qs0g805pqelmtn360u19eae60?imageView2/2/w/1080/format/jpg",
"original": "http://ci.xiaohongshu.com/1040g2sg31g0do7qs0g805pqelmtn360u19eae60",
"width": 1242,
"height": 1656,
"latitude": null,
"longitude": null,
"traceId": "1040g2sg31g0do7qs0g805pqelmtn360u19eae60",
"sticker": null
}
],
"videoInfo": null,
"time": {
"createTime": 1743989396000,
"updateTime": 1744424439000,
"userUpdateTime": 1744074482000
},
"createTime": "2025-04-07 09:29",
"impNum": 0,
"likeNum": 0,
"favNum": 0,
"cmtNum": 0,
"readNum": 0,
"shareNum": 0,
"followCnt": 0,
"reportBrandUserId": null,
"reportBrandName": null,
"featureTags": null,
"userInfo": {
"nickName": "地道的豆汁",
"avatar": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31c50829vh0005pqelmtn360uj9tdd3o?imageView2/2/w/120/format/jpg",
"userId": "674eadbb000000001c01981e",
"advertiserId": null,
"fansNum": 566,
"cooperType": 2,
"priceState": null,
"pictureState": null,
"picturePrice": null,
"videoState": null,
"videoPrice": null,
"userType": 1,
"operateState": null,
"currentLevel": null,
"location": "",
"contentTags": [],
"featureTags": [],
"personalTags": [],
"gender": "女",
"isCollect": false,
"clickMidNum": 0,
"interMidNum": 0,
"pictureInCart": null,
"videoInCart": null,
"kolType": null,
"mengagementNum": 0,
"mEngagementNum": 0
},
"compClickData": null
}
}💡 Note: For list data, the example shows only 1-2 items for simplicity. The actual count depends on the API response.
