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.
ylishi_api.py, ~200 lines, MIT licensed. No pip install, no dependencies.YlishiClient() and no API key (20 req/hour per IP).api_key="yl_live_โฆ" (get one free) to unlock the full calculator API.python ylishi_api.py for quick terminal lookups.# 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
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")
| Method | Client call | Endpoint | Returns |
|---|---|---|---|
| GET | c.kw_suggest(kw) | /demo/kw/suggest | Amazon keyword suggestions |
| GET | c.kw_competition(kw) | /demo/kw/competition | Keyword competition estimate |
| GET | c.temu_categories() | /demo/temu/categories | Temu category commission rates |
| GET | c.tiktok_categories() | /demo/tiktok/categories | TikTok Shop category commission rates |
| GET | c.compare_categories() | /demo/compare/categories | Amazon category rates (compare dataset) |
| GET | c.amazon_vs_tiktok_categories() | /demo/amazon-vs-tiktok/categories | Amazon rates for Amazon-vs-TikTok |
| GET | c.simulator_categories() | /demo/simulator/categories | FBA simulator category rates |
| GET | c.images_sizes() | /demo/images/sizes | Amazon image size requirements |
| GET | c.health() | /demo/health | API health snapshot |
Demo budget: 20 requests/hour per IP, minimum 2 seconds apart. The SDK paces itself client-side to respect the floor.
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.
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
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
| Code | Meaning |
|---|---|
429 slow_down | Two requests under 2s apart โ SDK paces automatically |
429 demo_limit_reached | 20/hour demo budget used โ get a free key |
| 401 | Bad key |
| 404 | Unknown service |
| 502 | Upstream error |