> ## Documentation Index
> Fetch the complete documentation index at: https://getanyapi.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# RedNote (Xiaohongshu) Search

> Sell rednote.search on AnyAPI: the request your endpoint receives, the response it must return, and what the real-request check judges.

Search RedNote (Xiaohongshu) notes by keyword and return normalized note records with pagination.

This page is the seller-facing summary of one catalog API, `rednote.search`. The transport rules that apply to every API a seller serves - signed requests, the response envelope, timeouts, and body limits - are on [the operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md).

## The price you compete with

AnyAPI publishes this API from **\$10.00 per 1,000 requests**. That is the price a buyer sees today, so it is the price your endpoint has to come in under to win traffic.

## The request your endpoint receives

| Field | Type | Required | What it means |
| - | - | - | - |
| `cursor` | string | no | Pagination cursor from the previous response. |
| `query` | string | yes | Keyword to search for on RedNote (Xiaohongshu). |
| `sort` | string | no | Sort order for matching notes. One of: `general`, `hot`, `time`. Default `"general"`. |

> [accordion] Full input JSON Schema
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/rednote.search.input.json",
>   "example": {
>     "query": "coffee",
>     "sort": "general"
>   },
>   "title": "RedNote (Xiaohongshu) Search input",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "query"
>   ],
>   "properties": {
>     "query": {
>       "type": "string",
>       "minLength": 1,
>       "description": "Keyword to search for on RedNote (Xiaohongshu)."
>     },
>     "sort": {
>       "type": "string",
>       "enum": [
>         "general",
>         "hot",
>         "time"
>       ],
>       "default": "general",
>       "description": "Sort order for matching notes."
>     },
>     "cursor": {
>       "type": "string",
>       "minLength": 1,
>       "description": "Pagination cursor from the previous response."
>     }
>   }
> }
> ```

## The response your endpoint must return

| Field | Type | Always present | What it means |
| - | - | - | - |
| `data` | null or object | yes | Wrapper holding the notes array plus pagination, or null when nothing was found. |
| `data.nextCursor` | string or null | yes | Opaque cursor for the next page of notes, or null when this lane has no more. Pass it back as cursor to continue. |
| `data.notes` | array | yes | Notes matching the search. |
| `data.notes[].authorImage` | string | no | URL of the author's avatar. |
| `data.notes[].authorNickname` | string | no | Display name of the note author. |
| `data.notes[].authorRedId` | string | no | Author's public RedNote ID. |
| `data.notes[].authorUserId` | string | no | Identifier of the note author. |
| `data.notes[].collectCount` | integer | no | Number of times the note was collected. |
| `data.notes[].commentCount` | integer | no | Number of comments on the note. |
| `data.notes[].createdUtc` | number | no | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| `data.notes[].description` | string | no | Short preview of the note text, often cut off mid-sentence; it is not the full note. Pass this noteId to rednote.note for the full text. |
| `data.notes[].image` | string | no | URL of the note cover image. |
| `data.notes[].likeCount` | integer | no | Number of likes on the note. |
| `data.notes[].noteId` | string | yes | Note identifier. |
| `data.notes[].shareCount` | integer | no | Number of times the note was shared. |
| `data.notes[].title` | string | no | Note title. |
| `data.notes[].type` | string | no | Note type, e.g. "normal" or "video". |
| `data.notes[].updatedUtc` | number | no | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| `data.notes[].xsecToken` | string | no | Security token required to fetch the note's full detail. |
| `found` | boolean | yes | True when matching notes were found; false when the search returned nothing. |

Extra fields are kept, missing declared fields fail.

> [accordion] Full output JSON Schema
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/rednote.search.output.json",
>   "title": "RedNote (Xiaohongshu) search output",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean",
>       "description": "True when matching notes were found; false when the search returned nothing."
>     },
>     "data": {
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "required": [
>             "notes",
>             "nextCursor"
>           ],
>           "properties": {
>             "nextCursor": {
>               "type": [
>                 "string",
>                 "null"
>               ],
>               "description": "Opaque cursor for the next page of notes, or null when this lane has no more. Pass it back as cursor to continue."
>             },
>             "notes": {
>               "x-anyapi-must-populate": true,
>               "type": "array",
>               "items": {
>                 "type": "object",
>                 "required": [
>                   "noteId"
>                 ],
>                 "properties": {
>                   "noteId": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Note identifier."
>                   },
>                   "title": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Note title."
>                   },
>                   "description": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Short preview of the note text, often cut off mid-sentence; it is not the full note. Pass this noteId to rednote.note for the full text."
>                   },
>                   "type": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Note type, e.g. \"normal\" or \"video\"."
>                   },
>                   "image": {
>                     "x-anyapi-domain": [
>                       "xhscdn.com",
>                       "rednotecdn.com"
>                     ],
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "URL of the note cover image."
>                   },
>                   "likeCount": {
>                     "type": "integer",
>                     "description": "Number of likes on the note."
>                   },
>                   "commentCount": {
>                     "type": "integer",
>                     "description": "Number of comments on the note."
>                   },
>                   "collectCount": {
>                     "type": "integer",
>                     "description": "Number of times the note was collected."
>                   },
>                   "shareCount": {
>                     "type": "integer",
>                     "description": "Number of times the note was shared."
>                   },
>                   "createdUtc": {
>                     "type": "number",
>                     "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>                   },
>                   "authorUserId": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Identifier of the note author."
>                   },
>                   "authorNickname": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Display name of the note author."
>                   },
>                   "authorImage": {
>                     "x-anyapi-domain": [
>                       "xhscdn.com",
>                       "rednotecdn.com"
>                     ],
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "URL of the author's avatar."
>                   },
>                   "authorRedId": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Author's public RedNote ID."
>                   },
>                   "xsecToken": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Security token required to fetch the note's full detail."
>                   },
>                   "updatedUtc": {
>                     "type": "number",
>                     "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>                   }
>                 }
>               },
>               "description": "Notes matching the search."
>             }
>           }
>         }
>       ],
>       "description": "Wrapper holding the notes array plus pagination, or null when nothing was found."
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `authorImage`
* `authorNickname`
* `authorRedId`
* `authorUserId`
* `description`
* `image`
* `noteId`
* `notes`
* `title`
* `type`
* `xsecToken`

The repository marks these fields as ones every source must be able to fill. An empty value is only correct when the entity itself genuinely has nothing there.

## Not found, and how it differs from empty

When the entity does not exist, answer 2xx with the not-found shape:

```json theme={"dark"}
{
  "found": false,
  "data": null
}
```

This API says what comes back as not found:

> True when matching notes were found; false when the search returned nothing.

Follow that rule: where it calls a case not found, answer with the not-found shape above. Otherwise, an empty list is not a not-found: when the entity exists and has nothing to return, answer 2xx with `found: true` and an empty `notes` array.

This output schema declares no `reason` field, so `found: false` is the whole not-found answer.

## Example request

```json theme={"dark"}
{
  "query": "coffee",
  "sort": "general"
}
```

The registration tests send this example to your endpoint, with the API's other test inputs. After that, the real-request check sends your endpoint real past customer inputs, and an AI reviewer compares each answer with AnyAPI's own answer to the same input.

## Next

* [The operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md) for signing, budgets, and the real-request check.
* [Every API open to sellers](https://getanyapi.com/docs/sell/apis/index.md).
* Want to sell an API that is not on that list? Email [support@getanyapi.com](mailto:support@getanyapi.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.