Answers
Where does an n8n workflow get Xiaohongshu or Douyin data from?
Short answer
From an HTTP Request node pointed at a social data API, or from the MCP Client tool inside an AI Agent node, because n8n has no built-in Xiaohongshu or Douyin node. With okdata the node sends your key as a Bearer header and gets JSON back: a Xiaohongshu search costs $0.02, a Douyin search $0.02 and a page of Douyin comments $0.002.
A content team runs one n8n workflow every Monday: search five keywords on Xiaohongshu and three on Douyin, keep the top notes and videos, write them to a Feishu sheet, and have an AI node suggest angles for the week. Everything after the first step has an n8n node. The first step does not, which is why people end up wiring in a self-hosted Xiaohongshu MCP with a logged-in browser and then chasing timeouts. A plain HTTP call is enough.
Two ways in
HTTP Request node (for fixed workflows), here with Xiaohongshu note search, Douyin video search and Douyin video comments:
- Method
GET, URLhttps://api.okdata.online/v1/xiaohongshu/notes/search, orhttps://api.okdata.online/v1/douyin/videos/searchfor Douyin. - Authentication: Generic Credential Type, Header Auth, with name
Authorizationand valueBearer okd_.... - Query parameters:
query,sort(latestorpopularon Xiaohongshu), andfieldsto keep the output small. - The items are in
data.items; split them with an Item Lists or Split Out node.
MCP Client tool (for AI Agent nodes): point it at https://api.okdata.online/mcp with the same header. The agent then gets find, describe and call for every endpoint and decides what to fetch. Good for open questions, less predictable in cost.
Full screen-by-screen setup is on the integrations page.
Paging without surprises
The HTTP Request node has built-in pagination. Choose "Update a Parameter in Each Request", set the query parameter cursor to {{ $response.body.page.next_cursor }}, set "Pagination Complete When" to the expression {{ !$response.body.page.has_more }}, and turn on "Limit Pages Fetched". Each page is a separate paid call, so the limit is your budget.
What the Monday workflow costs
| Step | Calls | Cost |
|---|---|---|
| 5 Xiaohongshu keywords × 2 pages | 10 | $0.20 |
| 3 Douyin keywords × 2 pages | 6 | $0.12 |
| 2 pages of comments on 5 Douyin videos | 10 | $0.02 |
| Weekly total | 26 | {{cost:xiaohongshu.notes.search10+douyin.videos.search6+douyin.videos.comments.list*10}} |
| A year of Mondays | 1,352 | {{cost:xiaohongshu.notes.search520+douyin.videos.search312+douyin.videos.comments.list*520}} |
Test the call before building the node
curl -G "https://api.okdata.online/v1/xiaohongshu/notes/search" \
-H "Authorization: Bearer $OKDATA_API_KEY" \
--data-urlencode "query=露营 装备" \
-d sort=popular \
-d fields=id,url,title,metrics.likes,author.name
If this returns notes, the same settings work in the node.
Gotchas
- Errors come back as JSON with
code,messageandretry. In the node's options, turn on "Never Error" and route oncodewith an IF node, so one failed keyword does not stop the run. Failed calls are not charged. - Xiaohongshu does not show view counts;
metrics.viewsis null. - Douyin comments need the video
idfrom the search result, not the share link. - Only public data. Nothing in this setup can post or comment as your account.
Other routes
The open-source xiaohongshu-mcp works with n8n for free and can also publish notes, which the API cannot do. It runs a browser logged into your account, and its issue tracker has a long list of n8n connection errors and request timeouts, so it suits a machine you can watch. Community templates for other paid APIs exist too; pick by price and coverage. For n8n and the other workflow tools, see integrations.
Updated