๐Ÿ Python SDK

The official lightweight client for the ylishi.tools Public API โ€” Amazon FBA calculators, Temu & TikTok Shop commission data, and keyword research, in ~200 lines of stdlib-only Python.

๐Ÿ“ฆ What You Get

โฌ‡๏ธ Download & Install

# 1. download the single file
curl -O https://ylishi.tools/sdk/ylishi_api.py

# 2. drop it next to your script (or anywhere on sys.path)
# 3. import and go โ€” that's the whole install

๐Ÿš€ Quick Start

from ylishi_api import YlishiClient

c = YlishiClient()  # demo tier โ€” no key needed
print(c.kw_suggest("dog beds"))
print(c.temu_categories())

# keyed tier โ€” full calculator API
c2 = YlishiClient(api_key="yl_live_yourkey")

๐Ÿ“ก Demo Endpoints (no key)

MethodClient callEndpointReturns
GETc.kw_suggest(kw)/demo/kw/suggestAmazon keyword suggestions
GETc.kw_competition(kw)/demo/kw/competitionKeyword competition estimate
GETc.temu_categories()/demo/temu/categoriesTemu category commission rates
GETc.tiktok_categories()/demo/tiktok/categoriesTikTok Shop category commission rates
GETc.compare_categories()/demo/compare/categoriesAmazon category rates (compare dataset)
GETc.amazon_vs_tiktok_categories()/demo/amazon-vs-tiktok/categoriesAmazon rates for Amazon-vs-TikTok
GETc.simulator_categories()/demo/simulator/categoriesFBA simulator category rates
GETc.images_sizes()/demo/images/sizesAmazon image size requirements
GETc.health()/demo/healthAPI health snapshot

Demo budget: 20 requests/hour per IP, minimum 2 seconds apart. The SDK paces itself client-side to respect the floor.

๐Ÿ”‘ Keyed Endpoints (POST โ€” free key required)

from ylishi_api import YlishiClient
c = YlishiClient(api_key="yl_live_โ€ฆ")

r = c.calculate("fba", "referral", price=25.99, category="Kitchen")
r = c.calculate("simulator", "calculate", โ€ฆ)   # FBA profit simulator
r = c.calculate("temu", "calculate", โ€ฆ)        # Temu profit calculator
r = c.calculate("tiktok", "calculate", โ€ฆ)      # TikTok Shop calculator
r = c.calculate("currency", "convert", โ€ฆ)      # ACCS-style conversion

Full parameter tables per service: /developers/. Free key: 200 req/day.

๐Ÿ’ป CLI

python ylishi_api.py suggest "dog beds"
python ylishi_api.py competition "dog beds"
python ylishi_api.py temu-categories

All 9 commands: suggest ยท competition ยท temu-categories ยท tiktok-categories ยท compare-categories ยท amazon-vs-tiktok-categories ยท simulator-categories ยท images-sizes ยท health

โš ๏ธ Error Handling

from ylishi_api import YlishiAPIError

try:
    c.kw_suggest("dog beds")
except YlishiAPIError as e:
    print(e.status, e.body)  # 429 demo_limit_reached โ†’ get a free key
CodeMeaning
429 slow_downTwo requests under 2s apart โ€” SDK paces automatically
429 demo_limit_reached20/hour demo budget used โ€” get a free key
401Bad key
404Unknown service
502Upstream error

๐Ÿ”— Related

Share this tool:𝕏 PostPinterestReddit
← ylishi.tools Home
Ylishi Tools | AlternativeTo