Do I need to log in to Xiaohongshu?
No. EveryInfra runs the server and reads public data, so you don't provide a Xiaohongshu account, cookies or a QR-code scan, only your EveryInfra API key. It is read-only: it never posts, likes or sends messages.
Xiaohongshu MCP server
Point Claude, Cursor or ChatGPT at one URL and your agent can search Xiaohongshu notes ranked by likes, saves or comments, read the full text with its topics and IP location, and follow the comment thread to the creator's profile. EveryInfra runs the server, so you need an API key, not a RedNote account, cookies or a QR-code scan, and no browser on your machine.
https://api.everyinfra.com/mcpIn mainland China, use this URL: https://api-cn.everyinfra.com/mcp
Your agent's first call: most-liked notes
everyinfra_call_api
{
"platform": "xiaohongshu",
"action": "search",
"params": {
"keyword": "露营装备",
"sort": "most_liked"
}
}A note's url from search usually carries its xsec_token: pass it unchanged to note and comments, and pass author_id to profile.
Your agent lists these capabilities and their parameters with everyinfra_list_capabilities, then calls one with everyinfra_call_api, setting platform to xiaohongshu and action to a value from the first column. Start with search: it needs only a keyword, no other ID, and the url and author_id it returns go straight into note, comments and profile.
| action | Capability | Price |
|---|---|---|
search | Search | $5.56 per 1,000 requests |
profile | Details | $5.56 per 1,000 requests |
user_posts | Posts by user | $5.56 per 1,000 requests |
note | Note details | $5.56 per 1,000 requests |
video | Video details | $5.56 per 1,000 requests |
comments | Comments | $5.56 per 1,000 requests |
comments_batch | Comments from multiple URLs | $5.56 per 1,000 requests |
sub_comments | Comment replies | $5.56 per 1,000 requests |
search_users | User search | $5.56 per 1,000 requests |
hashtag | Hashtag | $5.56 per 1,000 requests |
trending | Trending | $5.56 per 1,000 requests |
product_search | Product search | $5.56 per 1,000 requests |
product_detail | Product details | $5.56 per 1,000 requests |
reviews | Reviews | $5.56 per 1,000 requests |
followers_list | Follower list | $5.56 per 1,000 requests |
note_location | Note location | $5.56 per 1,000 requests |
pgy_content_square | Pugongying content boards | $16 per 1,000 requests |
Each call feeds the next: search returns the url and author_id, comments returns the comment_id, so the agent never has to ask you for a link or an ID.
Set keyword to words from the note content, not a user ID. Rank with most_liked, most_collected, most_commented or newest, narrow date_range to last_7_days or last_30_days, and set content_type to image or video. Every hit includes its url, like, save and comment counts, and author_id.
Pass the complete url from search, xsec_token included. You get the text, tags, topics with their topic_id, images and IP location, plus is_cooperation_note and has_goods, which flag brand partnerships and linked products. Hand a topic_id to hashtag to see other notes on that topic.
comments takes the same note url and sorts by most_liked or newest; each comment has its like count, IP location, sub_comment_count and an is_author flag. For a busy comment, pass its comment_id to sub_comments to expand the replies; reply_to_author_name shows who each reply answers.
Use author_id as user_id in profile for the exact follower count, likes and saves, Xiaohongshu ID (red_id) and verification status. user_posts lists the creator's notes, with is_pinned for pinned posts and is_goods_note for product-selling ones. Comment results usually show a different 29-character author_id, so convert it with profile and dedupe on the user_id it returns.
The agent checks the capability catalog first, then picks a tool and its parameters. Each example links to the matching API page, so you can review the parameters and fields first.
Search Xiaohongshu for popular notes about camping gear and put them in a table sorted by likes.
Tool used: everyinfra_call_apiXiaohongshu · Search
Read this Xiaohongshu note: the text, tags, and like, save and comment counts.
Tool used: everyinfra_call_apiXiaohongshu · Note details
Pull the comments on this note and summarize the three issues people raise most.
Tool used: everyinfra_call_apiXiaohongshu · Comments
Show this Xiaohongshu creator's follower count, likes and saves, and bio.
Tool used: everyinfra_call_apiXiaohongshu · Details
In any client that supports remote MCP, add https://api.everyinfra.com/mcp and send the header Authorization: Bearer followed by your API key. Besides everyinfra_call_api, the same URL serves search, CAPTCHA solving, AI and account tools, 24 in all.
{ "mcpServers": { "everyinfra": { "url": "https://api.everyinfra.com/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }
Keep the API key in your client's secret or environment settings, and never commit it to a repository.
No. EveryInfra runs the server and reads public data, so you don't provide a Xiaohongshu account, cookies or a QR-code scan, only your EveryInfra API key. It is read-only: it never posts, likes or sends messages.
Pass the complete note URL, with a path of /explore/<note ID> or /discovery/item/<note ID>, and keep every query parameter. The url from a recent search usually includes xsec_token, the note's access token, so give that exact link to note and comments instead of trimming it.
Yes, all through search. sort takes most_liked, most_collected or most_commented for popularity, or newest; date_range runs from last_24_hours to last_1_year; content_type takes image or video. For the next page, pass next_page_token back as page_token.
Yes. comments returns top-level comments, each with its first few replies and a sub_comment_count; for more replies, call sub_comments with the note url and that comment's comment_id. To page, pass the previous next_page_token as page_token; each page counts as one call. For many notes at once, use comments_batch.
Yes, through three fields. is_cooperation_note marks a brand partnership note in search and note results and is absent when unavailable; is_goods_note marks a product-selling note in search and user_posts; has_goods appears in note results when the note links a product.
MCP itself costs nothing extra; Xiaohongshu capabilities cost from $5.56 per 1,000 requests. Capabilities that page, such as search, comments and user_posts, count each page as one call. A call that fails, has invalid parameters or returns nothing isn't charged, and everyinfra_list_capabilities is free.
Google Analytics needs consent. Privacy