# Can I connect ChatGPT to Douyin or Xiaohongshu data?

> Hook ChatGPT, a custom GPT or the OpenAI API up to Douyin, Xiaohongshu and Weibo data with an OpenAPI schema or a remote MCP server. What works, costs and code.

Canonical page: https://okdata.online/answers/chatgpt-douyin-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](/apis/weibo/trends/list/), [Xiaohongshu note search](/apis/xiaohongshu/notes/search/) and [Douyin video search](/apis/douyin/videos/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:

```python
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:

```bash
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 | $0.428 |

## 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](/mcp/).

## Endpoints used

- [Douyin video search](https://okdata.online/apis/douyin/videos/search/) `douyin.videos.search`: $0.02 per call · about 20 videos per page
- [Xiaohongshu note search](https://okdata.online/apis/xiaohongshu/notes/search/) `xiaohongshu.notes.search`: $0.02 per call · about 20 notes per page
- [Weibo hot search](https://okdata.online/apis/weibo/trends/list/) `weibo.trends.list`: $0.002 per call · about 50 board entries per page

Updated 2026-11-12
