How do I connect Xiaohongshu data to Dify? (2026)
Create a custom tool in Dify, import XTikAPI's /openapi/xiaohongshu.json and set your key as the auth, and your agents and workflows can search Xiaohongshu notes and read comments at $0.02 a call. No Xiaohongshu account or cookie of yours is needed. XTikAPI reads Xiaohongshu with 16 endpoints from $0.02 a call. A failed call is not charged, and a verified account gets $0.50 of trial balance.
Updated 2026-11-19
Steps
Dify's tool docs say custom tools can be imported from an OpenAPI/Swagger description.
- Open Tools → Custom and create a tool.
- Import from URL:
https://xtikapi.com/openapi/xiaohongshu.json(one file per platform, at most 30 operations each). - Set auth to API Key, header
Authorization, type Bearer, with a key that has a spending cap. - Test one endpoint in the tool screen, then add the tool to your app.
If you self-host Dify with Docker, tool requests leave from the Dify container, so it needs internet access.
What XTikAPI returns
xiaohongshu.notes.search
You pass: A search term
You get: A page of notes: title, text, author, engagement
xiaohongshu.notes.detail
You pass: Note ID or share link
You get: One full note
xiaohongshu.comments.list
You pass: Note ID or share link
You get: A page of top-level comments
What one conversation costs
Asking the agent to "find this week's notes about a coffee machine and list the complaints" is usually 1 search plus comments on 5 notes: 6 calls, $0.12. Model costs are separate.
Why XTikAPI
- See before you pay: 192 of 229 endpoints show a recorded real response on their page (13 of 16 for Xiaohongshu).
- One shape: posts, comments and accounts from 19 platforms come back as the same objects, author in author and counts in metrics, so another platform needs no new parser.
- Spending you control: a failed call or a timeout is not charged (charged: false), X-Max-Price caps one call, and the same Idempotency-Key within 24 hours is never billed twice.
- Prepaid balance, no subscription. Balance never expires, and unused top-up money can be refunded within 14 days.
- Made for AI: every page has a Markdown twin, plus llms.txt and OpenAPI, so ChatGPT, Claude and Cursor can read it directly.
- Free trial: a verified account gets $0.50, no card.
Endpoints
Each with its price; the endpoint page has parameters, fields and a recorded response.
Sources
What this page says about other products comes from their own pages and docs, read on 2026-11-19.
More about Xiaohongshu
- Xiaohongshu API
- How do I pull Xiaohongshu notes into a Feishu Bitable automatically?
- How do I collect Xiaohongshu notes automatically with n8n?
- Spider_XHS says "Cookie is invalid or expired" on my server but works locally: why?
- What do Xiaohongshu error 300017 and the X-S signature mean?
- How do I export Xiaohongshu note comments to Excel?
- MediaCrawler can't collect replies to Xiaohongshu comments (406): what now?
- How do I add Xiaohongshu or WeChat Official Account data to TrendRadar?
- xiaohongshu-mcp keeps losing its login or returns 300011: is there a Xiaohongshu tool for AI that needs no login?
- Does Xiaohongshu (RedNote) have an official API for notes?
- Can ChatGPT read Xiaohongshu (RedNote)?
- Is there a hosted alternative to MediaCrawler for Xiaohongshu, Douyin and other Chinese platforms?
- What does status 461 mean on Xiaohongshu?
- What is xsec_token on Xiaohongshu and why do note links break without it?
- What is a good Apify alternative for social media data?
One key. Start now.
19 platforms, 229 endpoints, from $0.002 a call. Errors and timeouts are free.
Start free