Skip to content
Xiaohongshu

xiaohongshu.notes.search@v1

Xiaohongshu note search

NoteSearch

Read one page of public Xiaohongshu notes by keyword, ordering, note type, and publication window.

POST/v1/xiaohongshu/notes/search

Chinese name: 小红书笔记搜索 · 笔记 · 搜索
按关键词、排序、笔记类型和发布时间读取一页公开小红书笔记。

Use it when

  • Use it to discover public image or video notes related to a keyword.

Do not use it for

  • Do not use it for exhaustive recall, arbitrary date ranges, or direct detail retrieval.

Request parameters

FieldqueryTypestringConstraints and defaultsminLength: 1 · maxLength: 128RequirementRequired
FieldsortTypestringConstraints and defaultsenum: "relevance" | "latest" | "most_liked" | "most_commented" | "most_collected" · default: "relevance"RequirementOptional
Fieldnote_typeTypestringConstraints and defaultsenum: "all" | "image" | "video" · default: "all"RequirementOptional
Fieldpublished_withinTypestringConstraints and defaultsenum: "any" | "day" | "week" | "half_year" · default: "any"RequirementOptional
FieldcursorTypestringConstraints and defaultsminLength: 1RequirementOptional
Full request JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "sort": {
      "default": "relevance",
      "type": "string",
      "enum": [
        "relevance",
        "latest",
        "most_liked",
        "most_commented",
        "most_collected"
      ]
    },
    "note_type": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "image",
        "video"
      ]
    },
    "published_within": {
      "default": "any",
      "type": "string",
      "enum": [
        "any",
        "day",
        "week",
        "half_year"
      ]
    },
    "cursor": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}

Static response example

application/json
{
  "code": 200,
  "request_id": "req_example_xhs_search_01",
  "message": "success",
  "data": {
    "items": [
      {
        "id": "search-note-01",
        "title": "Public search example",
        "body": "Public note summary",
        "note_type": "image",
        "created_at": "2026-08-01T12:00:00.000Z",
        "updated_at": null,
        "author": {
          "id": "creator-01",
          "red_id": "example-red-id",
          "name": "Example creator",
          "avatar_url": "https://ci.xiaohongshu.com/avatar"
        },
        "cover_url": "https://ci.xiaohongshu.com/cover",
        "image_count": 3,
        "metrics": {
          "likes": 52,
          "collects": 18,
          "comments": 7,
          "shares": 3
        }
      }
    ]
  },
  "page": {
    "next_cursor": "opaque-cursor"
  },
  "warnings": [],
  "meta": {
    "result_status": "complete",
    "balance_after": "0.81",
    "listing_id": "xiaohongshu.notes.search",
    "version": "v1",
    "catalog_release_id": "catalog-production-2026-09-17.1",
    "price_book_version": "pricebook-production-2026-09-17.1",
    "charged_amount": "0.19",
    "currency": "CNY"
  }
}

Run live

Complete and empty results are charged; partial results and failures are not.

Security check

Loading the security check…

Checking live execution status…

Execution result

// Result

Response contract

The field summary is for scanning; the full JSON Schema is the stable output contract.

FieldcodeTypenumberConstraints and defaultsconst: 200RequirementRequired
Fieldrequest_idTypestringConstraints and defaultsNo additional constraintsRequirementRequired
FieldmessageTypestringConstraints and defaultsconst: "success"RequirementRequired
FielddataTypeobjectConstraints and defaultsNo additional constraintsRequirementRequired
FieldpageTypeobjectConstraints and defaultsNo additional constraintsRequirementRequired
FieldwarningsTypearrayConstraints and defaultsNo additional constraintsRequirementRequired
FieldmetaTypeobjectConstraints and defaultsNo additional constraintsRequirementRequired
Full response JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "const": 200
    },
    "request_id": {
      "type": "string"
    },
    "message": {
      "type": "string",
      "const": "success"
    },
    "data": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "body": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "note_type": {
                "type": "string",
                "enum": [
                  "image",
                  "video"
                ]
              },
              "created_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "author": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "red_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avatar_url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "red_id",
                  "name",
                  "avatar_url"
                ],
                "additionalProperties": false
              },
              "cover_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "image_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "metrics": {
                "type": "object",
                "properties": {
                  "likes": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "collects": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "comments": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "shares": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "likes",
                  "collects",
                  "comments",
                  "shares"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "title",
              "body",
              "note_type",
              "created_at",
              "updated_at",
              "author",
              "cover_url",
              "image_count",
              "metrics"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "items"
      ],
      "additionalProperties": false
    },
    "page": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "next_cursor"
      ],
      "additionalProperties": false
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "listing_id": {
          "type": "string",
          "const": "xiaohongshu.notes.search"
        },
        "version": {
          "type": "string",
          "const": "v1"
        },
        "catalog_release_id": {
          "type": "string",
          "minLength": 1
        },
        "price_book_version": {
          "type": "string",
          "minLength": 1
        },
        "result_status": {
          "type": "string",
          "enum": [
            "complete",
            "empty",
            "partial"
          ]
        },
        "charged_amount": {
          "type": "string"
        },
        "balance_after": {
          "type": "string"
        },
        "currency": {
          "type": "string",
          "const": "CNY"
        }
      },
      "required": [
        "listing_id",
        "version",
        "catalog_release_id",
        "price_book_version",
        "result_status",
        "charged_amount",
        "balance_after",
        "currency"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "code",
    "request_id",
    "message",
    "data",
    "page",
    "warnings",
    "meta"
  ],
  "additionalProperties": false
}

Known limitations

  • A page typically returns about 20 items; the actual count depends on currently public results.
  • Continue only with the Cursor returned by this Listing; V1 does not guarantee exhaustive recall.
  • Publication filters support one day, one week, six months, or any time—not arbitrary dates.

Integration example

REST (cURL)

curl -X POST https://api.dataxapi.com/v1/xiaohongshu/notes/search \
  -H "Authorization: Bearer $DATAXAPI_API_KEY" \
  -H "Idempotency-Key: your-stable-intent-key" \
  -H "Content-Type: application/json" \
  -d '{"query":"AI","sort":"relevance","note_type":"all","published_within":"week"}'

Exact MCP Preview (Codex config)

[mcp_servers.dataxapi]
url = "https://api.dataxapi.com/mcp"
bearer_token_env_var = "DATAXAPI_API_KEY"

The same API key exposes only the precise tools in its scope. Keep the key in an environment variable, never in the config file. Reuse an explicit idempotency_key for safe retries.

View client compatibility →

Catalog release: catalog-production-2026-09-17.1 · PriceBook: pricebook-production-2026-09-17.1