Skip to navigation

Search Xiaohongshu notes with your AI

To search Xiaohongshu notes through BeatAPI, find the search capability with a free Search call, check the inputs and price of data:xiaohongshu.app_v2.search_notes with a free Inspect call, then fetch one page of notes with a paid Run call. This guide covers one search only; collecting comments and exporting every result are separate tasks.

Before you start

Connect BeatAPI MCP to your AI client and have a BeatAPI API key ready. Search and Inspect calls are free; a Run call spends your balance.

Give your AI this task

Search Xiaohongshu notes about camping coffee. First find the capability and inspect its required inputs, readiness and price. Tell me the price before running it. After I approve, fetch one page only and show a small preview with source links when available. Do not fetch comments, paginate or retry a paid start without asking.

Find the capability

For an HTTP client, start with a free Search request:

curl -sS https://api.beatapi.io/v1/capabilities/search \
-H "Content-Type: application/json" \
-d '{"query":"小红书 搜索笔记"}'

Copy the reference value from the Search response into an Inspect request. The Inspect request below uses data:xiaohongshu.app_v2.search_notes; if Search returns a different reference, use the returned reference.

curl -sS https://api.beatapi.io/v1/capabilities/inspect \
-H "Content-Type: application/json" \
-d '{"reference":"data:xiaohongshu.app_v2.search_notes"}'

Check before spending

The Inspect response gives the input schema, the price, the readiness state and the next call. Continue only when the readiness state is ready or runnable; a listed capability cannot be executed. In the next call, replace every placeholder with your own input.

Fetch one page

After you approve the price from Inspect, send the Run call from the Inspect response with your API key. For data:xiaohongshu.app_v2.search_notes, the Run request is:

curl -sS https://api.beatapi.io/v1/capabilities/run \
-H "Authorization: Bearer $BEATAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reference":"data:xiaohongshu.app_v2.search_notes","input":{"keyword":"露营咖啡"},"view":"preview","max_items":5}'

The Run request above is an example, not a recorded result. Read the fields in your actual response: a runnable capability does not guarantee a fixed output shape.

Read the result

A preview view can contain fewer items than the original response. A shorter preview is not platform pagination. See Why does my AI only see a few results?.

Costs and limits

This guide starts one paid search with Run; Search and Inspect are free. The current price comes from the Inspect response, not from a fixed amount in this guide. One search page is not guaranteed to contain every matching note, and search rankings are not guaranteed to stay stable.

Capabilities contract · Social Data contract