# Use DataXAPI in Dify

Give Dify public data from 21 platforms. Fill in 4 fields once: 5 tools, 224 endpoints, from $0.0003 a call, and a failed call is never charged. Can Dify read Xiaohongshu and Douyin? Yes: once connected it reads their public data itself, in three steps.

The address Dify connects to: `https://api.dataxapi.com/mcp`. One address and one header: your API key as a bearer token.

## Set it up

Three steps inside Dify. Written from the client's own documentation.

1. Open the place MCP servers are added: Integrations → Tools → MCP → add an MCP server (HTTP)

2. Fill in the fields: Each as written here. The key is typed into the client and kept by it.

| Field | Value |
| --- | --- |
| URL | https://api.dataxapi.com/mcp |
| Name | DataXAPI |
| Server Identifier | dataxapi |
| Advanced Options → Custom Headers | Authorization: Bearer, a space, and your API key |

3. Save, then ask it to list the tools: You should get the five below.

## Check it works

Ask it to list the tools. This is the reply to expect; none of it costs anything.

> List the DataXAPI tools.

DataXAPI is connected with 5 tools: `find` finds the endpoint for a question, `describe` shows its parameters and price, `call` runs it (the only one that is charged), `read_more` re-reads a result for 24 hours, and `account` shows your balance. The catalog has 224 endpoints on 21 platforms.

## A first conversation

A question, the calls it made, and what each one cost.

> What has @nasa posted on TikTok lately?

|  |  |  |
| --- | --- | --- |
| `find({ query: "tiktok account recent videos" })` | Found tiktok.users.videos.list · TikTok user videos · $0.0020 a call | Free |
| `call({ capability: "tiktok.users.videos.list", username: "nasa", max_price: "0.01" })` | Up to 10 videos · compact view | $0.0020 |

2 tool calls · 1 charged · $0.0020

## Tips for Dify

- **Give it its own key.** Create a key named “Dify” with a daily budget in the console. When the budget is used up, calls stop; nothing else on your account is touched.
- **Let the free tools run without asking.** If Dify asks before it runs a tool, allow `find`, `describe`, `read_more` and `account`. Leave `call` on “ask” if you want to approve every charge.
- **Answers fit the context.** A DataXAPI answer stops at about 20 KB on an item boundary and says how to read on; `read_more` gets the rest at no charge.
- **Cap what a call may cost.** Ask it to pass `max_price` with every call. A call that could cost more is refused before anything is charged.

## What to know about Dify

- Headers came in Dify 1.9.0. A self-hosted Dify older than that has no field for the key: sign in with OAuth instead (dynamic client registration is on by default).
- Apps find the server by its identifier: keep `dataxapi`, and use the same one in another workspace.
- The key in a header is shared by the whole workspace: give it a daily budget in the console.

### The first call

Create an Agent app (or an Agent node in a workflow), add the DataXAPI tools, and ask in the preview: “Use DataXAPI to find popular Bilibili videos about camping.”

From Dify's own documentation, read on 2026-10-29. Menus move: if a step differs, the client's page is right.

- https://docs.dify.ai/en/cloud/use-dify/workspace/tools#mcp
- https://github.com/langgenius/dify/pull/24760

## If something is off

| What you see | Why | Fix |
| --- | --- | --- |
| Dify does not list the DataXAPI tools | Dify was started before the entry was added, or the address is not the one above. | Check the entry, then quit Dify and start it again. |
| `find` works, `call` says `unauthorized` | The key did not reach the service from Dify. The two free tools need no key, so they still answer. | Check that the key is where the entry reads it from, and that it starts with `dx_`. Then restart. |
| `call` says `insufficient_balance` or `key_budget_exceeded` | The balance, or this key's budget, does not cover the price of the call. Nothing was charged. | Ask it to run `account`, then top up or raise the key's budget. |

## All clients

- [Use DataXAPI in Claude Code](https://dataxapi.com/integrations/claude-code/)
- [Use DataXAPI in Cursor](https://dataxapi.com/integrations/cursor/)
- [Use DataXAPI in Codex](https://dataxapi.com/integrations/codex/)
- [Use DataXAPI in n8n](https://dataxapi.com/integrations/n8n/)
- [Use DataXAPI in Cherry Studio](https://dataxapi.com/integrations/cherry-studio/)
- [Use DataXAPI in Trae](https://dataxapi.com/integrations/trae/)
- [Use DataXAPI in 扣子 Coze](https://dataxapi.com/integrations/coze/)
- [Use DataXAPI in ChatGPT](https://dataxapi.com/integrations/chatgpt/)
- [Use DataXAPI in Claude](https://dataxapi.com/integrations/claude/)
- [Use DataXAPI in Feishu (Lark)](https://dataxapi.com/integrations/feishu/)
- [MCP](https://dataxapi.com/mcp/)
- [What an agent reads to set itself up](https://dataxapi.com/agents/)

---

Generated from catalog revision 5c3194deef3264cc, price book 6. [Page](https://dataxapi.com/integrations/dify/)
