Skip to content

justoneapi/justoneapi-python

Repository files navigation

PyPI version License

English | 简体中文

Just One API - Python SDK

Official Python SDK for accessing Just One API - a unified data service platform that provides structured data from social media, e-commerce, and content platforms.

Supported platforms include Taobao & Tmall, Xiaohongshu, Xiaohongshu Pugongying, Douyin, Douyin Xingtu, Kuaishou, Weibo, Bilibili, JD, WeChat, Douban, TikTok, TikTok Shop, Youku, Instagram, YouTube, Reddit, Toutiao, Zhihu, Amazon, Facebook, X (Twitter), Beike, IMDb, and more. To explore the full API catalog, visit the official website.

Installation

pip install justoneapi

Quick Start

from justoneapi import JustOneAPIClient

client = JustOneAPIClient(token="your_token")

# Example: Douyin video search
response = client.douyin.search_video_v4(keyword="deepseek")

print(response.success)  # True only when code == 0
print(response.code)     # Business code returned by the API
print(response.message)  # Server message
print(response.data)     # Actual payload

Response Shape

Every API method returns an ApiResponse instance with these fields:

Field Type Description
success bool True only when code == 0.
code Any Raw business code returned by the API.
message str Server message.
data Any Response payload from the API.
raw_json dict Full response payload before SDK normalization.

Error Handling

By default, business failures do not raise exceptions. You can check response.success, response.code, and response.message.

If you prefer exceptions for non-zero business codes:

from justoneapi import JustOneAPIClient, BusinessError

client = JustOneAPIClient(
    token="your_token",
    raise_on_business_error=True,
)

try:
    response = client.douyin.search_video_v4(keyword="deepseek")
except BusinessError as exc:
    print(exc.response.code)
    print(exc.response.message)

Authentication

All API requests require a valid API token.

Register here:

Documentation

Full API documentation:

The documentation includes:

  • Request parameters
  • Response fields
  • Error codes
  • Platform-specific examples

Official Website

Contact

If you have questions, feedback, or partnership inquiries:

License

This project is licensed under the MIT License.

About

Just One API - Python SDK: 接口,接口服务,小红书,Xiaohongshu,rednote,redbook,LittleRedBook,淘宝,天猫,Taobao,Tmall,抖音,Douyin,TikTok,Tiktok Shop,快手,Kuaishou,微博,Sina Weibo,哔哩哔哩,bilibili,豆瓣,douban,小红书蒲公英,抖音星图,微信公众号,Wechat,Weixin,优酷,Youku,贝壳,IMDb,京东,美团,大众点评,携程,今日头条,Toutiao,知乎,Zhihu,亚马逊,Amazon,Facebook,脸书,Twitter,Temu,Reddit,Shopee,拼多多,pinduoduo,Youtube,Instgram

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages