Answers
Does Xiaohongshu have an official API for searching notes and reading comments?
Short answer
Not for public content. Xiaohongshu's official platforms serve merchants, advertisers and partners with their own stores, ads and creator deals, and do not offer an endpoint to search anyone's notes or pull comments. For public notes, comments and creator profiles, okdata sells API access per call: $0.02 per search page and $0.02 per page of comments.
Product managers usually ask this first, before anyone writes a scraper: is there a proper, official Xiaohongshu API we can sign up for? The short answer is that there are official APIs, but they are about your own business on Xiaohongshu, not about reading what everyone else posts.
What the official channels cover
- Xiaohongshu open platform. For merchants and service providers: store products, orders, after-sales, logistics and similar operations, with access granted per business.
- PGY (蒲公英). The creator marketplace where brands find creators, see their rates and audience data, and book sponsored notes. It is a web platform for advertisers, with its own data for deals made there.
- Ads (聚光) and the creator center. Campaign reporting for your ads, and analytics for your own account.
As far as the public documentation shows, none of these lets a developer search all public notes by keyword, list another account's notes or export the comments on someone else's note. Most teams discover this after applying.
The practical route for public data
okdata offers that read-only layer as a plain HTTP API and an MCP server, with no account, contract or minimum:
| Job | Endpoint | Price |
|---|---|---|
| Search notes by keyword | note search | $0.02 per page of about 20 |
| Read a note | note detail | $0.02 |
| Comments | note comments | $0.02 per page of about 10 |
| Creator profile | account profile | $0.02 |
A typical pilot, 20 search pages and 50 comment pages, costs {{cost:xiaohongshu.notes.search20+xiaohongshu.notes.comments.list50}}.
First call
curl -G "https://api.okdata.online/v1/xiaohongshu/notes/search" \
-H "Authorization: Bearer $OKDATA_API_KEY" \
--data-urlencode 'query=咖啡机 推荐'
The response is the same shape on every platform: data.items, page for paging, and meta.billing showing what the call cost.
Honest trade-offs
- It is public data only: no private notes, no audience demographics, no rates. Those stay in PGY.
- Fields Xiaohongshu does not show publicly, such as view counts, come back null with the reason in
meta.unavailable. - Each page is a separate charge; there is no flat monthly plan.
When to use what
Use the open platform if you run a store on Xiaohongshu. Use PGY if you buy creator campaigns and want their private metrics. Use open-source scrapers like MediaCrawler for small one-off studies where account risk is acceptable. Use a per-call API when public data has to flow into a product or a weekly report. Prices for every platform are on the pricing page.
Updated