dataxapi 0.2.1__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dataxapi-1.0.0/LICENSE +21 -0
- dataxapi-1.0.0/PKG-INFO +102 -0
- dataxapi-1.0.0/README.md +80 -0
- dataxapi-1.0.0/pyproject.toml +37 -0
- dataxapi-1.0.0/src/dataxapi/__init__.py +18 -0
- dataxapi-1.0.0/src/dataxapi/_generated.py +6725 -0
- dataxapi-1.0.0/src/dataxapi/_runtime.py +510 -0
- dataxapi-1.0.0/src/dataxapi/_transport.py +254 -0
- dataxapi-1.0.0/src/dataxapi/py.typed +0 -0
- dataxapi-1.0.0/src/dataxapi.egg-info/PKG-INFO +102 -0
- {dataxapi-0.2.1 → dataxapi-1.0.0}/src/dataxapi.egg-info/SOURCES.txt +5 -4
- dataxapi-0.2.1/PKG-INFO +0 -34
- dataxapi-0.2.1/README.md +0 -19
- dataxapi-0.2.1/pyproject.toml +0 -34
- dataxapi-0.2.1/src/dataxapi/__init__.py +0 -4
- dataxapi-0.2.1/src/dataxapi/client.py +0 -302
- dataxapi-0.2.1/src/dataxapi/generated.py +0 -7487
- dataxapi-0.2.1/src/dataxapi/py.typed +0 -1
- dataxapi-0.2.1/src/dataxapi.egg-info/PKG-INFO +0 -34
- dataxapi-0.2.1/tests/test_client.py +0 -421
- {dataxapi-0.2.1 → dataxapi-1.0.0}/setup.cfg +0 -0
- {dataxapi-0.2.1 → dataxapi-1.0.0}/src/dataxapi.egg-info/dependency_links.txt +0 -0
- {dataxapi-0.2.1 → dataxapi-1.0.0}/src/dataxapi.egg-info/top_level.txt +0 -0
dataxapi-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aurevant LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dataxapi-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dataxapi
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: DataXAPI for Python: market data from 21 platforms (Douyin, Xiaohongshu/RedNote, TikTok, WeChat, X, YouTube...) over one interface, paid per call.
|
|
5
|
+
Author-email: "DataXAPI (Aurevant LLC)" <support@dataxapi.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://dataxapi.com
|
|
8
|
+
Project-URL: Documentation, https://dataxapi.com/docs/sdk/
|
|
9
|
+
Project-URL: All endpoints, https://dataxapi.com/apis/
|
|
10
|
+
Project-URL: Pricing, https://dataxapi.com/pricing/
|
|
11
|
+
Project-URL: MCP server, https://dataxapi.com/mcp/
|
|
12
|
+
Project-URL: Changelog, https://dataxapi.com/changelog/
|
|
13
|
+
Keywords: dataxapi,market data,social media data api,douyin api,xiaohongshu api,rednote api,tiktok api,wechat api,巨量算数,mcp,ai agents,sdk
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Typing :: Typed
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# DataXAPI for Python
|
|
24
|
+
|
|
25
|
+
[DataXAPI](https://dataxapi.com) is market data infrastructure for developers and AI agents: 204 endpoints across 20
|
|
26
|
+
platforms (Douyin, Xiaohongshu (RedNote), TikTok, WeChat, X, YouTube and more) behind one key and one response
|
|
27
|
+
shape, paid per call from $0.0003, with failed calls free and $0.10 of free credit on sign-up. Social media is the
|
|
28
|
+
largest category; creator rate cards, ad libraries and shop products are the others. Figures as of version 1.0.0
|
|
29
|
+
(October 2026); the live catalog is at [dataxapi.com/apis](https://dataxapi.com/apis/).
|
|
30
|
+
|
|
31
|
+
`dataxapi` is the Python client: every endpoint is a method, generated from the catalog, with its price in its
|
|
32
|
+
docstring.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
pip install dataxapi
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Python 3.9 or later; standard library only.
|
|
41
|
+
|
|
42
|
+
Version 1 is a new client for the new interface. Code written for `dataxapi` 0.x does not carry over: see the
|
|
43
|
+
[guide](https://dataxapi.com/docs/sdk/).
|
|
44
|
+
|
|
45
|
+
## Quick start
|
|
46
|
+
|
|
47
|
+
Make a key in the [console](https://dataxapi.com/console/keys/) and put it in the environment variable
|
|
48
|
+
`DATAXAPI_API_KEY`.
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from dataxapi import DataXAPI
|
|
52
|
+
dx = DataXAPI() # reads DATAXAPI_API_KEY
|
|
53
|
+
result = dx.douyin.videos.comments.list(id="7694940173372575014")
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`result["data"]["items"]` is the page of comments; `result["meta"]["billing"]["amount"]` is what the call was charged.
|
|
57
|
+
|
|
58
|
+
One call is one page, charged on its own. Every call goes out under an idempotency key the SDK makes, so its own
|
|
59
|
+
retries are never charged twice. `dx.call(id, params, options={"max_price": ...})` calls by ID and is refused before
|
|
60
|
+
it runs if it could cost more. `dx.pages(…)` and `dx.items(…)` walk pages within limits on pages, items and money.
|
|
61
|
+
|
|
62
|
+
## Connect an AI agent
|
|
63
|
+
|
|
64
|
+
Paste this into Claude Code, Codex, Cursor or any agent that can read a web page, with your own key in it:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
Read https://dataxapi.com/agents.md and set up DataXAPI in this agent. My API key is dx_…; use it for every DataXAPI call.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Or add the MCP server yourself: `https://api.dataxapi.com/mcp` (streamable HTTP), with the header
|
|
71
|
+
`Authorization: Bearer <your key>`; clients that sign in by OAuth (ChatGPT, Claude) need only the address. Five tools:
|
|
72
|
+
`find`, `describe`, `call`, `read_more`, `account`. `npx dataxapi setup` writes the MCP entry and the base skill for
|
|
73
|
+
Claude Code, Codex and Cursor. Setup guides: [dataxapi.com/mcp](https://dataxapi.com/mcp/).
|
|
74
|
+
|
|
75
|
+
## Platforms and example endpoints
|
|
76
|
+
|
|
77
|
+
| Platform | Example endpoints |
|
|
78
|
+
|---|---|
|
|
79
|
+
| Douyin API (抖音) | `douyin.videos.search`, `douyin.videos.comments.list`, `douyin.users.get`; 巨量算数 keyword index `douyin.index.keywords.history`; 星图 rate card `douyin.xingtu.creators.rates.get` |
|
|
80
|
+
| Xiaohongshu (RedNote) API (小红书) | `xiaohongshu.notes.search`, `xiaohongshu.notes.comments.list`, `xiaohongshu.users.get`; 蒲公英 creators `xiaohongshu.pgy.creators.get` |
|
|
81
|
+
| TikTok API | `tiktok.videos.search`, `tiktok.videos.transcript.get`, `tiktok.shop.products.reviews.list`, `tiktok.creative_center.ads.search` |
|
|
82
|
+
| WeChat (微信公众号, 视频号) | `wechat_mp.accounts.articles.list`, `wechat_mp.articles.metrics`, `wechat_channels.videos.comments.list` |
|
|
83
|
+
| Kuaishou, Bilibili, Weibo, Zhihu | `kuaishou.videos.search`, `bilibili.videos.get`, `weibo.trends.list`, `zhihu.questions.answers.list` |
|
|
84
|
+
| X, YouTube, Instagram, Reddit | `x.posts.search`, `youtube.videos.transcript.get`, `instagram.users.posts.list`, `reddit.posts.comments.list` |
|
|
85
|
+
| Facebook, Threads, LinkedIn, Telegram, Pinterest | `facebook.pages.posts.list`, `threads.posts.search`, `linkedin.companies.posts.list`, `telegram.channels.messages.list`, `pinterest.pins.search` |
|
|
86
|
+
| Ad libraries | `meta.ads.search`, `google.advertisers.ads.list`, `linkedin.ads.search`, `tiktok.ads.search` |
|
|
87
|
+
|
|
88
|
+
Every platform answers in the same shape: the same parameters, paging, errors and fields. A field a platform cannot
|
|
89
|
+
give is listed as missing, not silently dropped.
|
|
90
|
+
|
|
91
|
+
## Links
|
|
92
|
+
|
|
93
|
+
- Pricing: [dataxapi.com/pricing](https://dataxapi.com/pricing/) (every endpoint's price, as a file: [prices.json](https://dataxapi.com/prices.json))
|
|
94
|
+
- Docs: [dataxapi.com/docs](https://dataxapi.com/docs/); this SDK: [dataxapi.com/docs/sdk](https://dataxapi.com/docs/sdk/)
|
|
95
|
+
- All endpoints: [dataxapi.com/apis](https://dataxapi.com/apis/); for agents: [llms.txt](https://dataxapi.com/llms.txt), [openapi.json](https://dataxapi.com/openapi.json)
|
|
96
|
+
- MCP server: [dataxapi.com/mcp](https://dataxapi.com/mcp/); Skills: [dataxapi.com/skills](https://dataxapi.com/skills/)
|
|
97
|
+
- The TypeScript SDK is `@dataxapi/sdk` on npm; the command line is `dataxapi` on npm (`npx dataxapi --help`).
|
|
98
|
+
- 中文:[dataxapi.com/zh](https://dataxapi.com/zh/)
|
|
99
|
+
|
|
100
|
+
## Licence
|
|
101
|
+
|
|
102
|
+
MIT
|
dataxapi-1.0.0/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# DataXAPI for Python
|
|
2
|
+
|
|
3
|
+
[DataXAPI](https://dataxapi.com) is market data infrastructure for developers and AI agents: 204 endpoints across 20
|
|
4
|
+
platforms (Douyin, Xiaohongshu (RedNote), TikTok, WeChat, X, YouTube and more) behind one key and one response
|
|
5
|
+
shape, paid per call from $0.0003, with failed calls free and $0.10 of free credit on sign-up. Social media is the
|
|
6
|
+
largest category; creator rate cards, ad libraries and shop products are the others. Figures as of version 1.0.0
|
|
7
|
+
(October 2026); the live catalog is at [dataxapi.com/apis](https://dataxapi.com/apis/).
|
|
8
|
+
|
|
9
|
+
`dataxapi` is the Python client: every endpoint is a method, generated from the catalog, with its price in its
|
|
10
|
+
docstring.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
pip install dataxapi
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Python 3.9 or later; standard library only.
|
|
19
|
+
|
|
20
|
+
Version 1 is a new client for the new interface. Code written for `dataxapi` 0.x does not carry over: see the
|
|
21
|
+
[guide](https://dataxapi.com/docs/sdk/).
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
|
|
25
|
+
Make a key in the [console](https://dataxapi.com/console/keys/) and put it in the environment variable
|
|
26
|
+
`DATAXAPI_API_KEY`.
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from dataxapi import DataXAPI
|
|
30
|
+
dx = DataXAPI() # reads DATAXAPI_API_KEY
|
|
31
|
+
result = dx.douyin.videos.comments.list(id="7694940173372575014")
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`result["data"]["items"]` is the page of comments; `result["meta"]["billing"]["amount"]` is what the call was charged.
|
|
35
|
+
|
|
36
|
+
One call is one page, charged on its own. Every call goes out under an idempotency key the SDK makes, so its own
|
|
37
|
+
retries are never charged twice. `dx.call(id, params, options={"max_price": ...})` calls by ID and is refused before
|
|
38
|
+
it runs if it could cost more. `dx.pages(…)` and `dx.items(…)` walk pages within limits on pages, items and money.
|
|
39
|
+
|
|
40
|
+
## Connect an AI agent
|
|
41
|
+
|
|
42
|
+
Paste this into Claude Code, Codex, Cursor or any agent that can read a web page, with your own key in it:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
Read https://dataxapi.com/agents.md and set up DataXAPI in this agent. My API key is dx_…; use it for every DataXAPI call.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Or add the MCP server yourself: `https://api.dataxapi.com/mcp` (streamable HTTP), with the header
|
|
49
|
+
`Authorization: Bearer <your key>`; clients that sign in by OAuth (ChatGPT, Claude) need only the address. Five tools:
|
|
50
|
+
`find`, `describe`, `call`, `read_more`, `account`. `npx dataxapi setup` writes the MCP entry and the base skill for
|
|
51
|
+
Claude Code, Codex and Cursor. Setup guides: [dataxapi.com/mcp](https://dataxapi.com/mcp/).
|
|
52
|
+
|
|
53
|
+
## Platforms and example endpoints
|
|
54
|
+
|
|
55
|
+
| Platform | Example endpoints |
|
|
56
|
+
|---|---|
|
|
57
|
+
| Douyin API (抖音) | `douyin.videos.search`, `douyin.videos.comments.list`, `douyin.users.get`; 巨量算数 keyword index `douyin.index.keywords.history`; 星图 rate card `douyin.xingtu.creators.rates.get` |
|
|
58
|
+
| Xiaohongshu (RedNote) API (小红书) | `xiaohongshu.notes.search`, `xiaohongshu.notes.comments.list`, `xiaohongshu.users.get`; 蒲公英 creators `xiaohongshu.pgy.creators.get` |
|
|
59
|
+
| TikTok API | `tiktok.videos.search`, `tiktok.videos.transcript.get`, `tiktok.shop.products.reviews.list`, `tiktok.creative_center.ads.search` |
|
|
60
|
+
| WeChat (微信公众号, 视频号) | `wechat_mp.accounts.articles.list`, `wechat_mp.articles.metrics`, `wechat_channels.videos.comments.list` |
|
|
61
|
+
| Kuaishou, Bilibili, Weibo, Zhihu | `kuaishou.videos.search`, `bilibili.videos.get`, `weibo.trends.list`, `zhihu.questions.answers.list` |
|
|
62
|
+
| X, YouTube, Instagram, Reddit | `x.posts.search`, `youtube.videos.transcript.get`, `instagram.users.posts.list`, `reddit.posts.comments.list` |
|
|
63
|
+
| Facebook, Threads, LinkedIn, Telegram, Pinterest | `facebook.pages.posts.list`, `threads.posts.search`, `linkedin.companies.posts.list`, `telegram.channels.messages.list`, `pinterest.pins.search` |
|
|
64
|
+
| Ad libraries | `meta.ads.search`, `google.advertisers.ads.list`, `linkedin.ads.search`, `tiktok.ads.search` |
|
|
65
|
+
|
|
66
|
+
Every platform answers in the same shape: the same parameters, paging, errors and fields. A field a platform cannot
|
|
67
|
+
give is listed as missing, not silently dropped.
|
|
68
|
+
|
|
69
|
+
## Links
|
|
70
|
+
|
|
71
|
+
- Pricing: [dataxapi.com/pricing](https://dataxapi.com/pricing/) (every endpoint's price, as a file: [prices.json](https://dataxapi.com/prices.json))
|
|
72
|
+
- Docs: [dataxapi.com/docs](https://dataxapi.com/docs/); this SDK: [dataxapi.com/docs/sdk](https://dataxapi.com/docs/sdk/)
|
|
73
|
+
- All endpoints: [dataxapi.com/apis](https://dataxapi.com/apis/); for agents: [llms.txt](https://dataxapi.com/llms.txt), [openapi.json](https://dataxapi.com/openapi.json)
|
|
74
|
+
- MCP server: [dataxapi.com/mcp](https://dataxapi.com/mcp/); Skills: [dataxapi.com/skills](https://dataxapi.com/skills/)
|
|
75
|
+
- The TypeScript SDK is `@dataxapi/sdk` on npm; the command line is `dataxapi` on npm (`npx dataxapi --help`).
|
|
76
|
+
- 中文:[dataxapi.com/zh](https://dataxapi.com/zh/)
|
|
77
|
+
|
|
78
|
+
## Licence
|
|
79
|
+
|
|
80
|
+
MIT
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
# 77 and later read the licence as an SPDX expression.
|
|
3
|
+
requires = ["setuptools>=77"]
|
|
4
|
+
build-backend = "setuptools.build_meta"
|
|
5
|
+
|
|
6
|
+
[project]
|
|
7
|
+
name = "dataxapi"
|
|
8
|
+
version = "1.0.0"
|
|
9
|
+
description = "DataXAPI for Python: market data from 21 platforms (Douyin, Xiaohongshu/RedNote, TikTok, WeChat, X, YouTube...) over one interface, paid per call."
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "DataXAPI (Aurevant LLC)", email = "support@dataxapi.com" }]
|
|
14
|
+
keywords = ["dataxapi", "market data", "social media data api", "douyin api", "xiaohongshu api", "rednote api", "tiktok api", "wechat api", "巨量算数", "mcp", "ai agents", "sdk"]
|
|
15
|
+
requires-python = ">=3.9"
|
|
16
|
+
# Standard library only.
|
|
17
|
+
dependencies = []
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
"Typing :: Typed",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://dataxapi.com"
|
|
27
|
+
Documentation = "https://dataxapi.com/docs/sdk/"
|
|
28
|
+
"All endpoints" = "https://dataxapi.com/apis/"
|
|
29
|
+
Pricing = "https://dataxapi.com/pricing/"
|
|
30
|
+
"MCP server" = "https://dataxapi.com/mcp/"
|
|
31
|
+
Changelog = "https://dataxapi.com/changelog/"
|
|
32
|
+
|
|
33
|
+
[tool.setuptools.packages.find]
|
|
34
|
+
where = ["src"]
|
|
35
|
+
|
|
36
|
+
[tool.setuptools.package-data]
|
|
37
|
+
dataxapi = ["py.typed"]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""DataXAPI for Python: market data over one interface, paid per call.
|
|
2
|
+
|
|
3
|
+
from dataxapi import DataXAPI
|
|
4
|
+
|
|
5
|
+
client = DataXAPI() # reads DATAXAPI_API_KEY
|
|
6
|
+
page = client.douyin.videos.comments.list(id="7694940173372575014")
|
|
7
|
+
|
|
8
|
+
The client with a method per capability is generated from the public catalog
|
|
9
|
+
(_generated.py); what a call does is in the runtime it stands on (_runtime.py
|
|
10
|
+
for what is asked, _transport.py for how one request is sent).
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from ._generated import * # noqa: F401,F403
|
|
14
|
+
from ._generated import DataXAPI, ERRORS, REVISION, ROLES
|
|
15
|
+
from ._runtime import CallOptions, Client, Envelope, KeyTooLongError, Meta, Page, PlatformOutcome, RunRef, UnknownRoleError
|
|
16
|
+
from ._transport import APIConnectionError, DataXAPIError, FailedCall
|
|
17
|
+
|
|
18
|
+
__version__ = "1.0.0"
|