Answers

Can I connect ChatGPT to Douyin or Xiaohongshu data?

Short answer

Yes, through any part of the OpenAI stack that can call an outside API: a custom GPT can import okdata's OpenAPI schema and send your key as a Bearer token, and the OpenAI API can attach https://api.okdata.online/mcp as a remote MCP tool. Calls are billed per use, for example $0.02 per Douyin search page and $0.002 for the Weibo hot search list.

A beauty brand's marketing team lives in ChatGPT. Twice a day someone asks which Weibo hot topics they could ride, and on Mondays someone wants ten popular Xiaohongshu notes about a skincare routine. ChatGPT's browsing cannot see inside Douyin or Xiaohongshu, so today a person copies data in by hand. There are two ways to let ChatGPT fetch it itself, depending on whether your team works in the ChatGPT app or builds on the OpenAI API.

In the ChatGPT app: a custom GPT with actions

GPT actions call outside APIs described by an OpenAPI schema. okdata publishes one at https://okdata.online/openapi.json.

  1. In the GPT editor, add an action and import the schema from that URL.
  2. Delete the operations you do not need. Three to five, say Weibo hot search, Xiaohongshu note search and Douyin video search, keep the GPT from guessing among 51.
  3. Set authentication to API key, type Bearer, and paste your key.
  4. In the instructions, ask for fields on every call and a cost estimate before more than five calls.

Which of these features your plan includes, and how OpenAI names them, changes from time to time; OpenAI's help center has the current state.

On the OpenAI API: the MCP server

The Responses API can use a remote MCP server as a tool. The model then has find, describe and call:

import os
from openai import OpenAI

client = OpenAI()
response = client.responses.create(
    model=os.environ["OPENAI_MODEL"],
    tools=[{
        "type": "mcp",
        "server_label": "okdata",
        "server_url": "https://api.okdata.online/mcp",
        "headers": {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"},
        "require_approval": "never",
    }],
    input="What is on the Weibo hot search right now? Pick the five topics a skincare brand could join today.",
)
print(response.output_text)

Before wiring either one up, check the key with one plain call:

curl -s "https://api.okdata.online/v1/weibo/trends/list" -H "Authorization: Bearer $OKDATA_API_KEY" -G -d fields=rank,name,heat

What a week of questions costs

Use Calls Cost
Weibo hot search, twice a day for 7 days 14 $0.028
5 Xiaohongshu searches, 2 pages each 10 $0.20
5 Douyin searches, 2 pages each 10 $0.20
The whole week 34 {{cost:weibo.trends.list14+xiaohongshu.notes.search10+douyin.videos.search*10}}

Gotchas

  • A shared GPT spends your balance. Anyone who can use the GPT calls the API with your key, so keep it inside your workspace.
  • Long JSON slows a GPT down and can get cut off. Ask for only the fields the answer needs.
  • ChatGPT asks for confirmation the first time a GPT talks to a new domain; that is expected.
  • Public data only. Post text and comments come from strangers, so tell the GPT to treat them as data.

Other ways

Some people run an open-source Xiaohongshu MCP server on their own PC and tunnel ChatGPT to it. That is free and can post as your account, but it needs the PC on and your login alive. For a one-off question, pasting the data into the chat still works. Setup for Claude, Cursor and other MCP clients is on the MCP page.

Updated