<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[okdata]]></title><description><![CDATA[okdata]]></description><link>https://okdata.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6af9e3e9a8d9c171e07033ab/6c350a75-ec0a-46e6-86b3-744d59a49a4a.png</url><title>okdata</title><link>https://okdata.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Nov 2026 20:17:00 GMT</lastBuildDate><atom:link href="https://okdata.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to get RedNote (Xiaohongshu) and Douyin data from outside China, in English]]></title><description><![CDATA[Get public Xiaohongshu (RedNote) notes and Douyin videos, comments and hot search as JSON with English field names, from anywhere. Pay per call.]]></description><link>https://okdata.hashnode.dev/how-to-get-rednote-xiaohongshu-and-douyin-data-from-outside-china-in-english</link><guid isPermaLink="true">https://okdata.hashnode.dev/how-to-get-rednote-xiaohongshu-and-douyin-data-from-outside-china-in-english</guid><category><![CDATA[api]]></category><category><![CDATA[Python]]></category><category><![CDATA[AI]]></category><category><![CDATA[Data Science]]></category><dc:creator><![CDATA[yongxian he]]></dc:creator><pubDate>Mon, 16 Nov 2026 09:51:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af9e3e9a8d9c171e07033ab/1b97cc6c-fc19-4a9c-adce-3ee86ecef9a2.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In January 2025, millions of Americans installed RedNote, the English name of Xiaohongshu, and found out how much of China's consumer conversation happens there and on Douyin, TikTok's Chinese sibling. If you sell into China, run a cross-border shop or study Chinese consumers, those two apps are where the reviews, complaints and trends are. Getting that data into a spreadsheet or an AI agent from outside China is harder than it should be.</p>
<p>Disclosure: I build okdata, the API used below. It sells public social data per call and has a hosted MCP server for AI agents.</p>
<h2>What gets in the way</h2>
<ul>
<li><strong>The website sends you somewhere else.</strong> Since early November 2026, xiaohongshu.com has been redirecting visitors on overseas IPs from note and profile pages to rednote.com, as developers of an open-source Xiaohongshu tool found (<a href="https://github.com/xpzouying/xiaohongshu-mcp/pull/906">xiaohongshu-mcp #906</a>).</li>
<li><strong>Your account may be the wrong kind.</strong> An account registered with a non-Chinese phone number is a RedNote account, and tools that log in to xiaohongshu.com can't use it (<a href="https://github.com/xpzouying/xiaohongshu-mcp/issues/609">#609</a>).</li>
<li><strong>Logged-in scrapers get flagged.</strong> A script driving a real account soon trips the platform's checks: Xiaohongshu answers with error 461 or "account abnormal", and Douyin's web requests need signed parameters that keep changing. The account is what you lose.</li>
<li><strong>The official open platforms are for something else.</strong> They serve merchants and partners working with their own accounts, not searching public posts.</li>
</ul>
<h2>What you can get without any of that</h2>
<p>okdata reads public Xiaohongshu and Douyin pages for you and returns JSON with English field names, in the same shape as its TikTok or YouTube data. You need no Xiaohongshu or Douyin account, no Chinese phone number and no cookies, and it works from a server anywhere.</p>
<table>
<thead>
<tr>
<th>Data</th>
<th>Endpoint</th>
<th>Price</th>
</tr>
</thead>
<tbody><tr>
<td>RedNote note search, about 20 notes a page</td>
<td><code>xiaohongshu.notes.search</code></td>
<td>$0.02 a call</td>
</tr>
<tr>
<td>Full text and images of one note</td>
<td><code>xiaohongshu.notes.get</code></td>
<td>$0.02</td>
</tr>
<tr>
<td>Comments on a note, about 10 a page</td>
<td><code>xiaohongshu.notes.comments.list</code></td>
<td>$0.02 a page</td>
</tr>
<tr>
<td>RedNote hot topics</td>
<td><code>xiaohongshu.trends.list</code></td>
<td>$0.02</td>
</tr>
<tr>
<td>Douyin video search, about 20 a page</td>
<td><code>douyin.videos.search</code></td>
<td>$0.02 a call</td>
</tr>
<tr>
<td>Comments on a Douyin video, about 20 a page</td>
<td><code>douyin.videos.comments.list</code></td>
<td>$0.002 a page</td>
</tr>
<tr>
<td>Douyin hot search board, 50 entries</td>
<td><code>douyin.trends.list</code></td>
<td>$0.002</td>
</tr>
</tbody></table>
<p>A call that reaches the data source is charged even when it comes back empty, not found or failed; a call stopped before that (bad parameters, low balance) costs nothing. You top up a balance by card, Alipay or WeChat Pay, and a new key comes with $0.10 to try it.</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/mz25oi7ma1ml5gohl4re.png" alt="Every endpoint lists its price and page size before you call it." />
<em>Every endpoint lists its price and page size before you call it.</em></p>
<h2>1. Search RedNote in Chinese, read the results in English</h2>
<p>The tip that matters most: search in Chinese. Most notes are written in Chinese, so 防晒霜 finds far more than "sunscreen". Let your model translate the query on the way in and summarize on the way out.</p>
<pre><code class="language-bash">export OKDATA_API_KEY=okd_...
curl -G "https://api.okdata.online/v1/xiaohongshu/notes/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=防晒霜 推荐' \
  --data-urlencode 'sort=popular'
</code></pre>
<p>The docs example, trimmed:</p>
<pre><code class="language-json">{
  "code": "ok",
  "data": {
    "items": [
      {
        "id": "6731f0a2000000001b02c3d4",
        "title": "油皮夏天防晒怎么选｜实测 6 款",
        "text": "连续两周通勤实测，按清爽度和防晒力排了个序，第 3 款意外好用。",
        "lang": "zh",
        "published_at": "2026-11-02T09:30:00Z",
        "metrics": { "likes": 48200, "comments": 1312, "favorites": 9650 },
        "hashtags": ["防晒", "油皮"]
      }
    ]
  },
  "page": { "next_cursor": "eyJvIjoyMH0", "has_more": true },
  "meta": { "billing": { "amount": "0.02", "currency": "USD" } }
}
</code></pre>
<p>The text stays in Chinese and the field names don't. <code>metrics.favorites</code> is RedNote's 收藏 (saves), which people use to bookmark things they mean to buy, so sort on it when you want the notes that sell. Pass <code>page.next_cursor</code> back as <code>cursor</code> for the next 20.</p>
<p>Hand the batch to your model with one instruction: summarize in English and quote the original Chinese next to each claim. You keep the translation honest and can check any line yourself.</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/bhkbf1e68a0em4gab5mn.png" alt="Search in Chinese, read in English: a Chinese query comes back with English field names, and the model summarizes in English with the Chinese quoted" /></p>
<h2>2. What is China talking about today? Douyin hot search</h2>
<pre><code class="language-python">import os, requests

API = "https://api.okdata.online/v1"
H = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}

def get(path, **params):
    r = requests.get(API + path, headers=H, params=params, timeout=60)
    body = r.json()
    if body["code"] != "ok":
        raise RuntimeError(f"{body['code']}: {body['message']}")
    return body["data"]["items"]

for t in get("/douyin/trends/list")[:10]:
    print(t["rank"], t["name"], t["heat"])

# Pick a topic, take the most-liked video, read the comments under it
top = get("/douyin/videos/search", query="防晒霜", sort="most_liked")[0]
comments = get("/douyin/videos/comments/list", id=top["id"])
print(len(comments), "comments on", top["url"])
</code></pre>
<p>That script spends $0.002 + $0.02 + $0.002, about two and a half cents.</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/e7rprn2z8l7oe5hnfrrk.png" alt="The Douyin hot search endpoint: 50 entries with heat, $0.002 a call." />
<em>The Douyin hot search endpoint: 50 entries with heat, $0.002 a call.</em></p>
<h2>3. Or skip the code and ask Claude</h2>
<p>The same data is behind one MCP URL, <code>https://api.okdata.online/mcp</code>. In Claude on the web: Customize → Connectors → Add custom connector, paste the URL, choose <strong>Sign in now</strong> and sign in. In Cursor, add it to <code>~/.cursor/mcp.json</code>:</p>
<pre><code class="language-json">{
  "mcpServers": {
    "okdata": {
      "url": "https://api.okdata.online/mcp",
      "headers": { "Authorization": "Bearer ${env:OKDATA_API_KEY}" }
    }
  }
}
</code></pre>
<p>Then ask in plain English:</p>
<blockquote>
<p>Search Xiaohongshu for 防晒霜 推荐, read the five most-saved notes and their comments, and tell me in English what people with oily skin complain about. Quote the Chinese.</p>
</blockquote>
<p>The server gives the model five tools instead of 200: it finds the endpoint, checks its price for free, then makes the paid call. You see what it will cost before it spends anything.</p>
<h2>What a month of tracking costs</h2>
<table>
<thead>
<tr>
<th>Every week</th>
<th>Calls</th>
<th>Cost</th>
</tr>
</thead>
<tbody><tr>
<td>10 Chinese keywords on RedNote, 2 pages each</td>
<td>20</td>
<td>$0.40</td>
</tr>
<tr>
<td>Full text of the 30 most-saved notes</td>
<td>30</td>
<td>$0.60</td>
</tr>
<tr>
<td>First page of comments on those 30 notes</td>
<td>30</td>
<td>$0.60</td>
</tr>
<tr>
<td>Douyin hot search, once a day</td>
<td>7</td>
<td>$0.014</td>
</tr>
<tr>
<td><strong>Week</strong></td>
<td><strong>87</strong></td>
<td><strong>$1.61</strong></td>
</tr>
</tbody></table>
<p>That is about $6.50 a month, with no subscription.</p>
<h2>Before you start</h2>
<ul>
<li>It returns public posts, comments and profiles only. Nothing behind a login, no private messages.</li>
<li>Cursors stay valid for 24 hours, so finish a paging run the same day.</li>
<li>Personal data in public posts is still personal data. Collect what the question needs and handle it the way your local law asks.</li>
</ul>
<p>You can get a key at <a href="https://okdata.online/signup/?src=devto-rednote">https://okdata.online/signup/?src=devto-rednote</a>. Every endpoint, with its fields and price, is at <a href="https://okdata.online/apis/xiaohongshu/">https://okdata.online/apis/xiaohongshu/</a> and <a href="https://okdata.online/apis/douyin/">https://okdata.online/apis/douyin/</a>.</p>
<p>What are you trying to learn from Chinese social media? I'm happy to answer in the comments, including whether this is the wrong tool for it.</p>
]]></content:encoded></item><item><title><![CDATA[Give Claude or Cursor live TikTok, YouTube, Reddit and X data with one MCP URL]]></title><description><![CDATA[Connect one MCP URL and let Claude or Cursor search TikTok, read Reddit threads, pull YouTube transcripts and check X trends, paid per call.]]></description><link>https://okdata.hashnode.dev/give-claude-or-cursor-live-tiktok-youtube-reddit-and-x-data-with-one-mcp-url</link><guid isPermaLink="true">https://okdata.hashnode.dev/give-claude-or-cursor-live-tiktok-youtube-reddit-and-x-data-with-one-mcp-url</guid><category><![CDATA[mcp]]></category><category><![CDATA[AI]]></category><category><![CDATA[api]]></category><category><![CDATA[claude ai]]></category><dc:creator><![CDATA[yongxian he]]></dc:creator><pubDate>Sun, 15 Nov 2026 17:17:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af9e3e9a8d9c171e07033ab/9e9c9f11-4f2a-46e9-9e22-290a6f29b81d.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Ask Claude what people on TikTok are saying about a product this week and it usually guesses. Web search rarely reaches inside TikTok, Reddit threads or YouTube transcripts, and an agent that writes code against a social platform tends to invent sample data.</p>
<p>Disclosure: I build okdata, the service used below. It is a pay-per-call social data API with a hosted MCP server. This post shows how to connect it and what a few real prompts cost.</p>
<h2>What the agent gets</h2>
<p>One MCP server, <code>https://api.okdata.online/mcp</code>, with five tools:</p>
<ul>
<li><code>find</code> searches the catalog of 200+ endpoints on 17 platforms (TikTok, YouTube, Instagram, X, Reddit, Meta and Google ad libraries, plus Douyin, Xiaohongshu/RedNote and WeChat). Free.</li>
<li><code>describe</code> returns an endpoint's parameters, fields and price. Free.</li>
<li><code>call</code> runs it. This is the only tool that costs money. A call refused before it reaches a data source (bad parameters, low balance) costs nothing.</li>
<li><code>read_more</code> pages through long answers. Free.</li>
<li><code>account</code> shows the balance. Free.</li>
</ul>
<p>So the model does not load 200 tool schemas up front. It looks up what it needs, checks the price, then calls.</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/g4ortkjv5c6pu9tigzk2.png" alt="find, describe, call: the agent looks up an endpoint and its price for free, then pays only for the call" /></p>
<h2>Claude on the web: sign in, no key to copy</h2>
<ol>
<li>Customize → Connectors → Add → Add custom connector.</li>
<li>Name <code>okdata</code>, URL <code>https://api.okdata.online/mcp</code>.</li>
<li>Authentication: choose <strong>Sign in now</strong>. Claude preselects No sign-in, because a few tools work without it, so change it.</li>
<li>Click Add, sign in on the okdata page and allow. Claude gets its own key, capped at $5 a month by default; you can change the cap or revoke it in the console.</li>
<li>In a chat, open + → Connectors and switch okdata on.</li>
</ol>
<p>The same connector then works in Claude Desktop and on mobile with that account.</p>
<h2>Cursor and Claude Code: a key in an env var</h2>
<p>Get a key at <a href="https://okdata.online/signup/?src=devto-mcp">https://okdata.online/signup/?src=devto-mcp</a> (new accounts get $0.10 of credit) and export it as <code>OKDATA_API_KEY</code>.</p>
<p>Cursor, in <code>~/.cursor/mcp.json</code>:</p>
<pre><code class="language-json">{
  "mcpServers": {
    "okdata": {
      "url": "https://api.okdata.online/mcp",
      "headers": { "Authorization": "Bearer ${env:OKDATA_API_KEY}" }
    }
  }
}
</code></pre>
<p>Claude Code:</p>
<pre><code class="language-bash">claude mcp add --transport http --scope user okdata https://api.okdata.online/mcp \
  --header 'Authorization: Bearer ${OKDATA_API_KEY}'
</code></pre>
<p>Keep the single quotes, so the key stays in your environment and out of the settings file.</p>
<h2>Prompts to try, and what they cost</h2>
<p>Every endpoint has a page with its price, page size and what happens when a call fails. Here is TikTok video search:</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/bnrn9v7v8fczw8kiw57m.png" alt="The TikTok video search API page on okdata: $0.002 per call, about 30 videos a page" /></p>
<h3>TikTok comments</h3>
<blockquote>
<p>Find TikTok videos about portable blenders from this month, read the comments under the three most played, and list what people complain about.</p>
</blockquote>
<p><strong>Cost:</strong> one page of TikTok video search ($0.002, about 30 videos) plus three pages of comments ($0.002 each) = <strong>$0.008</strong>.</p>
<h3>X trends</h3>
<blockquote>
<p>What is trending on X in Japan right now?</p>
</blockquote>
<p><strong>Cost:</strong> one call to X trending topics = <strong>$0.009</strong>.</p>
<h3>YouTube transcripts</h3>
<blockquote>
<p>Get the transcripts of this channel's last 10 YouTube videos and list every product they recommend, with timestamps.</p>
</blockquote>
<p><strong>Cost:</strong> ten transcripts at $0.004 plus one channel listing = <strong>about $0.04</strong>.</p>
<h3>Reddit threads</h3>
<blockquote>
<p>Search Reddit for threads asking which budget espresso machine to buy and summarise the top answers.</p>
</blockquote>
<p><strong>Cost:</strong> one page of Reddit search (25 posts) is $0.004, and each thread's comments are $0.002 a page.</p>
<p>The $0.10 trial covers all four. If an agent starts looping through pages, put the limit in the prompt: "one page only" or "stop after three pages and ask me".</p>
<h2>Without MCP</h2>
<p>Every endpoint is also plain HTTPS with the same key, so a script or an n8n workflow can call it directly. The docs and per-endpoint prices are at <a href="https://okdata.online/apis/">https://okdata.online/apis/</a>.</p>
<p>If you try it, I would like to hear which platform or field you were missing.</p>
]]></content:encoded></item></channel></rss>