---
title: "Xiaohongshu (RedNote) Danh sách ghi chú chủ đề API (V1)"
description: "Lấy các ghi chú liên quan đến ID chủ đề trên Xiaohongshu (RedNote), với chức năng sắp xếp theo thứ tự nóng hoặc mới nhất và lọc trang bằng con trỏ. Sử dụng để tìm kiếm nội dung chủ đề, xem xét xu hướng và tiếp tục xem các trang kết quả chủ đề."
lastUpdated: false
aiUsagePrompt: true
---

# Xiaohongshu \(RedNote\) Danh sách ghi chú chủ đề API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/xiaohongshu/get-topic-note-list/v1\"")'
  :summary='JSON.parse("\"Danh sách ghi chú chủ đề (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/xiaohongshu-rednote/topic-note-list-v1-vi.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"Token truy cập cho dịch vụ API này.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"topicId\",\"in\":\"query\",\"description\":\"Định danh duy nhất của chủ đề trên Xiaohongshu.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"sort\",\"in\":\"query\",\"description\":\"Thứ tự sắp xếp kết quả.\\n\\nGiá trị có sẵn:\\n- `time`: Mới nhất\\n- `hot`: Nổi bật\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"hot\",\"description\":\"Tùy chọn sắp xếp chủ đề trên Xiaohongshu\",\"enum\":[\"time\",\"hot\"]}},{\"name\":\"cursor\",\"in\":\"query\",\"description\":\"Cursor pagination từ trang trước.\",\"required\":false,\"schema\":{\"type\":\"string\"}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"Ghi chú và phân trang cho chủ đề Xiaohongshu.\",\"properties\":{\"list\":{\"type\":\"array\",\"description\":\"Bộ thẻ ghi chú được trả về trên trang này cho chủ đề được chọn và thứ tự sắp xếp.\",\"items\":{\"type\":\"object\",\"description\":\"Một thẻ ghi chú được trả về cho chủ đề.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Định danh Xiaohongshu của thẻ ghi chú.\"},\"title\":{\"type\":\"string\",\"description\":\"Tiêu đề của bài đăng.\"},\"desc\":{\"type\":\"string\",\"description\":\"Văn bản mô tả được trả về cho thẻ ghi chú này.\"},\"type\":{\"type\":\"string\",\"description\":\"Loại ghi chú được báo cáo bởi Xiaohongshu.\"},\"create_time\":{\"type\":\"integer\",\"description\":\"Thời gian tạo thẻ ghi chú dưới dạng thời gian Unix trong mili giây.\"},\"style\":{\"type\":\"integer\",\"description\":\"Mã phong cách thẻ ghi chú được Xiaohongshu báo cáo.\"},\"style_name\":{\"type\":\"string\",\"description\":\"Tên phong cách được trả về cho thẻ ghi chú, khi có.\"},\"has_music\":{\"type\":\"boolean\",\"description\":\"Liệu Xiaohongshu có đánh dấu ghi chú này là chứa âm nhạc hay không.\"},\"cursor\":{\"type\":\"string\",\"description\":\"Con trỏ liên quan đến ghi chú này trong danh sách chủ đề. Sử dụng con trỏ trang trong data.cursor để phân trang.\"},\"likes\":{\"type\":\"integer\",\"description\":\"Số lượt thích của bài đăng theo dữ liệu được báo cáo.\"},\"collects\":{\"type\":\"integer\",\"description\":\"Lưu số lần báo cáo trong trường collects cho ghi chú này.\"},\"collected_count\":{\"type\":\"integer\",\"description\":\"Lưu số lần báo cáo trong trường collected_count cho ghi chú này.\"},\"image_count\":{\"type\":\"integer\",\"description\":\"Số lượng hình ảnh được báo cáo liên quan đến ghi chú này.\"},\"images_list\":{\"type\":\"array\",\"description\":\"Hình ảnh hoặc bản xem trước được trả về trong thẻ ghi chú. Danh sách này có thể chứa ít mục hơn image_count.\",\"items\":{\"type\":\"object\",\"description\":\"Một hình ảnh hoặc bản xem trước được trả về cho ghi chú này.\",\"properties\":{\"fileid\":{\"type\":\"string\",\"description\":\"Định danh của tài nguyên hình ảnh được Xiaohongshu báo cáo.\"},\"url\":{\"type\":\"string\",\"description\":\"URL hình ảnh được trả về cho mục này, khi có dữ liệu.\"},\"url_size_large\":{\"type\":\"string\",\"description\":\"URL phiên bản hình ảnh lớn được trả về cho mục này.\"},\"original\":{\"type\":\"string\",\"description\":\"Liên kết hình ảnh gốc, khi có dữ liệu.\"},\"width\":{\"type\":\"integer\",\"description\":\"Chiều rộng hình ảnh được báo cáo trong metadata, tính bằng pixel.\"},\"height\":{\"type\":\"integer\",\"description\":\"Chiều cao hình ảnh được báo cáo trong metadata, tính bằng pixel.\"}}}},\"user\":{\"type\":\"object\",\"description\":\"Thông tin tác giả công khai được trả về cùng với ghi chú.\",\"properties\":{\"userid\":{\"type\":\"string\",\"description\":\"ID tài khoản Xiaohongshu của tác giả ghi chú.\"},\"nickname\":{\"type\":\"string\",\"description\":\"Tên giả được hiển thị cho tác giả ghi chú.\"},\"images\":{\"type\":\"string\",\"description\":\"URL ảnh đại diện của tác giả bài đăng.\"},\"red_official_verify_type\":{\"type\":\"integer\",\"description\":\"Mã loại xác thực chính thức được báo cáo cho tác giả.\"},\"red_official_verified\":{\"type\":\"boolean\",\"description\":\"Liệu tác giả có được xác thực chính thức hay không, khi cung cấp.\"},\"show_red_official_verify_icon\":{\"type\":\"boolean\",\"description\":\"Liệu biểu tượng xác thực chính thức có được hiển thị cùng tác giả hay không, khi cung cấp.\"}}},\"video_id\":{\"type\":\"string\",\"description\":\"Định danh của video liên quan đến ghi chú, khi có dữ liệu.\"},\"video_info\":{\"type\":\"object\",\"description\":\"Chi tiết video khi được cung cấp cho ghi chú. Ghi chú video cũng có thể được trả về chỉ với bản xem trước hình ảnh.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Định danh của video trong chi tiết video.\"},\"duration\":{\"type\":\"integer\",\"description\":\"Thời lượng video được Xiaohongshu báo cáo.\"},\"width\":{\"type\":\"integer\",\"description\":\"Chiều rộng video được ghi nhận trong metadata, tính bằng pixel.\"},\"height\":{\"type\":\"integer\",\"description\":\"Chiều cao video được ghi nhận trong metadata, tính bằng pixel.\"},\"played_count\":{\"type\":\"integer\",\"description\":\"Số lần phát video được báo cáo trong chi tiết video.\"},\"avg_bitrate\":{\"type\":\"integer\",\"description\":\"Giá trị bitrate trung bình được báo cáo cho video.\"},\"vmaf\":{\"type\":\"number\",\"description\":\"Điểm chất lượng video được báo cáo bởi VMAF.\"},\"preload_size\":{\"type\":\"integer\",\"description\":\"Giá trị kích thước được báo cáo cho việc tải trước video.\"},\"first_frame\":{\"type\":\"string\",\"description\":\"URL hình ảnh khung đầu tiên khi được cung cấp.\"},\"thumbnail\":{\"type\":\"string\",\"description\":\"URL ảnh thu nhỏ của video.\"},\"url\":{\"type\":\"string\",\"description\":\"URL phát lại được trả về cho video.\"},\"url_info_list\":{\"type\":\"array\",\"description\":\"Các biến thể phát lại thay thế cho video.\",\"items\":{\"type\":\"object\",\"description\":\"Một biến thể phát lại video thay thế.\",\"properties\":{\"url\":{\"type\":\"string\",\"description\":\"URL phát lại cho biến thể này.\"},\"desc\":{\"type\":\"string\",\"description\":\"Mô tả được trả về cho biến thể phát lại này.\"},\"width\":{\"type\":\"integer\",\"description\":\"Chiều rộng của biến thể phát lại này, tính bằng pixel.\"},\"height\":{\"type\":\"integer\",\"description\":\"Chiều cao của biến thể phát lại này, tính bằng pixel.\"},\"avg_bitrate\":{\"type\":\"integer\",\"description\":\"Giá trị bitrate trung bình được báo cáo cho biến thể phát lại này.\"},\"vmaf\":{\"type\":\"number\",\"description\":\"Điểm chất lượng video VMAF được báo cáo cho biến thể phát lại này.\"}}}}}}}}},\"cursor\":{\"type\":\"string\",\"description\":\"Con trỏ tiếp tục ở cấp độ trang. Khi has_more là true, truyền nó không thay đổi như con trỏ với cùng topicId và sort.\"},\"has_more\":{\"type\":\"boolean\",\"description\":\"Liệu có trang khác có sẵn hay không. Ngừng phân trang khi này là false.\"}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"Các tham số hoặc nội dung yêu cầu không hợp lệ.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"Tài khoản truy cập không hợp lệ hoặc không hoạt động.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"Quyền truy cập bị từ chối.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"Tốc độ yêu cầu hoặc giới hạn hàng ngày đã vượt quá.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"Lỗi máy chủ nội bộ.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"Dịch vụ tạm thời không khả dụng.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"API sản xuất toàn cục (mặc định)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/xiaohongshu/get-topic-note-list/v1\"")' />

<p>Lấy các ghi chú liên quan đến ID chủ đề trên Xiaohongshu (RedNote), với chức năng sắp xếp theo thứ tự nóng hoặc mới nhất và lọc trang bằng con trỏ. Sử dụng để tìm kiếm nội dung chủ đề, xem xét xu hướng và tiếp tục xem các trang kết quả chủ đề.</p>

## Tham số

<div class="api-doc-table api-doc-table--params">

| Tên | Vị trí | Kiểu dữ liệu | Bắt buộc | Mặc định | Mô tả |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | Đúng | - | Token truy cập cho dịch vụ API này. |
| <code>topicId</code> | query | <code>string</code> | Đúng | - | Định danh duy nhất của chủ đề trên Xiaohongshu. |
| <code>sort</code> | query | <code>string</code> | Không | <code>hot</code> | Thứ tự sắp xếp kết quả.<br /><br><br>Giá trị có sẵn:<br /><br>- <code>time</code>: Mới nhất<br /><br>- <code>hot</code>: Nổi bật |
| <code>cursor</code> | query | <code>string</code> | Không | - | Cursor pagination từ trang trước. |

</div>

## Ví dụ mã hóa

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/xiaohongshu/get-topic-note-list/v1?token=YOUR_API_KEY&topicId=VALUE'
```

```text [🤖 Lời hướng dẫn AI]
Tôi muốn sử dụng API "Danh sách ghi chú chủ đề (V1)" từ JustOneAPI.
URL cơ sở: https://api.justoneapi.com.
Đường dẫn API: /api/xiaohongshu/get-topic-note-list/v1?token=YOUR_API_KEY&topicId=VALUE
Điểm cuối API: BASE_URL + /api/xiaohongshu/get-topic-note-list/v1?token=YOUR_API_KEY&topicId=VALUE
Phương thức HTTP: GET
Xác thực: Thêm tham số "token" vào URL.
Định nghĩa OpenAPI: https://docs.justoneapi.com/openapi/xiaohongshu-rednote/topic-note-list-v1-vi.json

Tham số:
- token (query): Token truy cập cho dịch vụ API này. (Bắt buộc)
- topicId (query): Định danh duy nhất của chủ đề trên Xiaohongshu. (Bắt buộc)
- sort (query): Thứ tự sắp xếp kết quả.

Giá trị có sẵn:
- `time`: Mới nhất
- `hot`: Nổi bật
- cursor (query): Cursor pagination từ trang trước.

Định dạng trả về: Xử lý an toàn phản hồi JSON hoặc văn bản dựa trên Content-Type thực tế.

Xử lý phản hồi và mã lỗi:
1. Đọc kết quả xử lý từ trường "code" trong nội dung phản hồi (mã 0 là thành công).
2. Thời gian chờ đề xuất: 120 giây. Nếu 120 giây quá dài, hãy dành ít nhất 60 giây. Một số yêu cầu có thể hết thời gian chờ trước khi có kết quả.
3. Mã kết quả:
   - 0: Thành công
   - 100: Token không hợp lệ hoặc đã bị vô hiệu hóa
   - 301: Không lấy được dữ liệu. Hãy thử lại.
   - 302: Vượt giới hạn tần suất gọi
   - 303: Vượt hạn mức trong ngày
   - 400: Tham số không hợp lệ
   - 500: Lỗi nội bộ máy chủ
   - 600: Không có quyền truy cập
   - 601: Không đủ số dư
   - 602: Đã chạm giới hạn ngân sách token
4. Mã 601 nghĩa là số dư dùng chung của tài khoản không đủ. Mã 602 nghĩa là token API đã chạm giới hạn ngân sách tích lũy riêng. Việc đặt ngân sách cho token không chuyển tiền khỏi số dư dùng chung.

Xin hãy giúp tôi viết một script bằng ngôn ngữ lập trình yêu thích để gọi API này và xử lý phản hồi.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # Được cung cấp bởi các server OpenAPI

url = BASE_URL + "/api/xiaohongshu/get-topic-note-list/v1?token=YOUR_API_KEY&topicId=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // Được cung cấp bởi các server OpenAPI
const url = BASE_URL + "/api/xiaohongshu/get-topic-note-list/v1?token=YOUR_API_KEY&topicId=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // Được cung cấp bởi các server OpenAPI
        final String url = BASE_URL + "/api/xiaohongshu/get-topic-note-list/v1?token=YOUR_API_KEY&topicId=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // Được cung cấp bởi các server OpenAPI

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/xiaohongshu/get-topic-note-list/v1?token=YOUR_API_KEY&topicId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Được cung cấp bởi các server OpenAPI
$url = $BASE_URL . '/api/xiaohongshu/get-topic-note-list/v1?token=YOUR_API_KEY&topicId=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/xiaohongshu-rednote/topic-note-list-v1-vi.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[Định nghĩa OpenAPI (JSON)]</a>
</div>

## Các trường trong phản hồi

Các trường chính trong phản hồi thành công (`code = 0`).

<div class="api-doc-table api-doc-table--response">

| Đường dẫn trường | Kiểu dữ liệu | Mô tả |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | Ghi chú và phân trang cho chủ đề Xiaohongshu. |
| <code>data.list</code> | <code>array</code> | Bộ thẻ ghi chú được trả về trên trang này cho chủ đề được chọn và thứ tự sắp xếp. |
| <code>data.list[]</code> | <code>object</code> | Một thẻ ghi chú được trả về cho chủ đề. |
| <code>data.list[].id</code> | <code>string</code> | Định danh Xiaohongshu của thẻ ghi chú. |
| <code>data.list[].title</code> | <code>string</code> | Tiêu đề của bài đăng. |
| <code>data.list[].desc</code> | <code>string</code> | Văn bản mô tả được trả về cho thẻ ghi chú này. |
| <code>data.list[].type</code> | <code>string</code> | Loại ghi chú được báo cáo bởi Xiaohongshu. |
| <code>data.list[].create_time</code> | <code>integer</code> | Thời gian tạo thẻ ghi chú dưới dạng thời gian Unix trong mili giây. |
| <code>data.list[].style</code> | <code>integer</code> | Mã phong cách thẻ ghi chú được Xiaohongshu báo cáo. |
| <code>data.list[].style_name</code> | <code>string</code> | Tên phong cách được trả về cho thẻ ghi chú, khi có. |
| <code>data.list[].has_music</code> | <code>boolean</code> | Liệu Xiaohongshu có đánh dấu ghi chú này là chứa âm nhạc hay không. |
| <code>data.list[].cursor</code> | <code>string</code> | Con trỏ liên quan đến ghi chú này trong danh sách chủ đề. Sử dụng con trỏ trang trong data.cursor để phân trang. |
| <code>data.list[].likes</code> | <code>integer</code> | Số lượt thích của bài đăng theo dữ liệu được báo cáo. |
| <code>data.list[].collects</code> | <code>integer</code> | Lưu số lần báo cáo trong trường collects cho ghi chú này. |
| <code>data.list[].collected_count</code> | <code>integer</code> | Lưu số lần báo cáo trong trường collected_count cho ghi chú này. |
| <code>data.list[].image_count</code> | <code>integer</code> | Số lượng hình ảnh được báo cáo liên quan đến ghi chú này. |
| <code>data.list[].images_list</code> | <code>array</code> | Hình ảnh hoặc bản xem trước được trả về trong thẻ ghi chú. Danh sách này có thể chứa ít mục hơn image_count. |
| <code>data.list[].images_list[]</code> | <code>object</code> | Một hình ảnh hoặc bản xem trước được trả về cho ghi chú này. |
| <code>data.list[].images_list[].fileid</code> | <code>string</code> | Định danh của tài nguyên hình ảnh được Xiaohongshu báo cáo. |
| <code>data.list[].images_list[].url</code> | <code>string</code> | URL hình ảnh được trả về cho mục này, khi có dữ liệu. |
| <code>data.list[].images_list[].url_size_large</code> | <code>string</code> | URL phiên bản hình ảnh lớn được trả về cho mục này. |
| <code>data.list[].images_list[].original</code> | <code>string</code> | Liên kết hình ảnh gốc, khi có dữ liệu. |
| <code>data.list[].images_list[].width</code> | <code>integer</code> | Chiều rộng hình ảnh được báo cáo trong metadata, tính bằng pixel. |
| <code>data.list[].images_list[].height</code> | <code>integer</code> | Chiều cao hình ảnh được báo cáo trong metadata, tính bằng pixel. |
| <code>data.list[].user</code> | <code>object</code> | Thông tin tác giả công khai được trả về cùng với ghi chú. |
| <code>data.list[].user.userid</code> | <code>string</code> | ID tài khoản Xiaohongshu của tác giả ghi chú. |
| <code>data.list[].user.nickname</code> | <code>string</code> | Tên giả được hiển thị cho tác giả ghi chú. |
| <code>data.list[].user.images</code> | <code>string</code> | URL ảnh đại diện của tác giả bài đăng. |
| <code>data.list[].user.red_official_verify_type</code> | <code>integer</code> | Mã loại xác thực chính thức được báo cáo cho tác giả. |
| <code>data.list[].user.red_official_verified</code> | <code>boolean</code> | Liệu tác giả có được xác thực chính thức hay không, khi cung cấp. |
| <code>data.list[].user.show_red_official_verify_icon</code> | <code>boolean</code> | Liệu biểu tượng xác thực chính thức có được hiển thị cùng tác giả hay không, khi cung cấp. |
| <code>data.list[].video_id</code> | <code>string</code> | Định danh của video liên quan đến ghi chú, khi có dữ liệu. |
| <code>data.list[].video_info</code> | <code>object</code> | Chi tiết video khi được cung cấp cho ghi chú. Ghi chú video cũng có thể được trả về chỉ với bản xem trước hình ảnh. |
| <code>data.list[].video_info.id</code> | <code>string</code> | Định danh của video trong chi tiết video. |
| <code>data.list[].video_info.duration</code> | <code>integer</code> | Thời lượng video được Xiaohongshu báo cáo. |
| <code>data.list[].video_info.width</code> | <code>integer</code> | Chiều rộng video được ghi nhận trong metadata, tính bằng pixel. |
| <code>data.list[].video_info.height</code> | <code>integer</code> | Chiều cao video được ghi nhận trong metadata, tính bằng pixel. |
| <code>data.list[].video_info.played_count</code> | <code>integer</code> | Số lần phát video được báo cáo trong chi tiết video. |
| <code>data.list[].video_info.avg_bitrate</code> | <code>integer</code> | Giá trị bitrate trung bình được báo cáo cho video. |
| <code>data.list[].video_info.vmaf</code> | <code>number</code> | Điểm chất lượng video được báo cáo bởi VMAF. |
| <code>data.list[].video_info.preload_size</code> | <code>integer</code> | Giá trị kích thước được báo cáo cho việc tải trước video. |
| <code>data.list[].video_info.first_frame</code> | <code>string</code> | URL hình ảnh khung đầu tiên khi được cung cấp. |
| <code>data.list[].video_info.thumbnail</code> | <code>string</code> | URL ảnh thu nhỏ của video. |
| <code>data.list[].video_info.url</code> | <code>string</code> | URL phát lại được trả về cho video. |
| <code>data.list[].video_info.url_info_list</code> | <code>array</code> | Các biến thể phát lại thay thế cho video. |
| <code>data.list[].video_info.url_info_list[]</code> | <code>object</code> | Một biến thể phát lại video thay thế. |
| <code>data.list[].video_info.url_info_list[].url</code> | <code>string</code> | URL phát lại cho biến thể này. |
| <code>data.list[].video_info.url_info_list[].desc</code> | <code>string</code> | Mô tả được trả về cho biến thể phát lại này. |
| <code>data.list[].video_info.url_info_list[].width</code> | <code>integer</code> | Chiều rộng của biến thể phát lại này, tính bằng pixel. |
| <code>data.list[].video_info.url_info_list[].height</code> | <code>integer</code> | Chiều cao của biến thể phát lại này, tính bằng pixel. |
| <code>data.list[].video_info.url_info_list[].avg_bitrate</code> | <code>integer</code> | Giá trị bitrate trung bình được báo cáo cho biến thể phát lại này. |
| <code>data.list[].video_info.url_info_list[].vmaf</code> | <code>number</code> | Điểm chất lượng video VMAF được báo cáo cho biến thể phát lại này. |
| <code>data.cursor</code> | <code>string</code> | Con trỏ tiếp tục ở cấp độ trang. Khi has_more là true, truyền nó không thay đổi như con trỏ với cùng topicId và sort. |
| <code>data.has_more</code> | <code>boolean</code> | Liệu có trang khác có sẵn hay không. Ngừng phân trang khi này là false. |

</div>

## Ví dụ phản hồi

<ApiExampleSection :api='JSON.parse("\"/api/xiaohongshu/get-topic-note-list/v1\"")' />

