Ozon SDK Pro (ozon-sdk-pro) — Complete Documentation
All-in-One Ozon Sync & Async Python SDK, Composer API v2 widget parser, Seller legal company & INN profiling, Ozon Card checkout discount math, Search Rank & SQLite price-drop trackers, Smart Review Analyzer with Free (g4f>=9.0.3) & Official AI APIs, resilient LRU ProxyPool (6 formats), interactive OzonTelegramBot, 14-command CLI, 9-tool MCP Server, and 7-tab Windows .exe Desktop GUI.
🧭 1. Overview & Composer API v2 Architecture
ozon-sdk-pro queries Ozon's Composer API v2 JSON endpoints and HTML data-state fallbacks across a pure-Python core compatible with CPython 3.8–3.16, Free-Threaded No-GIL, and PyPy.
Composer API & Ozon Card
Parses webStickyProducts, webPrice, specs, gallery & search grids with exact Ozon Card discount math.
Seller INN & Legal Profiling
Queries /modal/shop-in-shop-info for clean company names, 10–15 digit INN, orders, tenure, and rating.
ProxyPool & TLS Auto-Rotation
6-format normalization, LRU pool, complete session/cookie reset on rotation, verified Chrome/Safari TLS pool, and direct-IP guard.
Full Async Parity & SQLite
AsyncOzonClient matches sync methods cleanly, and SQLite trackers use contextlib.closing on Windows.
📦 2. Installation & Optional Extras
uv add "ozon-sdk-pro[tls,ai]"
| Extra | Packages Installed | Capabilities Unlocked |
|---|---|---|
core | httpx[http2], openpyxl, requests, tomli | Sync & Async SDK, ProxyPool, SQLite trackers, CLI, Bot & MCP |
[tls] | curl-cffi>=0.7.0 | Verified Chrome & Safari iOS TLS fingerprinting |
[ai] / [free-ai] | g4f>=9.0.3 | Zero-key AI via g4f>=9.0.3 + Official LLM APIs |
[browser] | selenium, selenium-stealth | Chrome cookie harvester & fallback |
[gui] | customtkinter, pillow, curl-cffi | 7-Tab Desktop GUI |
[all] | GUI + AI + TLS + Pandas | Complete workstation bundle |
🖥️ 3. 7-Tab Desktop GUI & Standalone Windows .exe
Download OzonSDK_Pro_Windows_x64.zip from Releases and run OzonSDK_Pro.exe, or start via ozon-gui.
🛡️ 4. ProxyPool, 6 Proxy Formats & Verified TLS Auto-Rotation
rotate_proxy() closes stale sockets/cookies before switching IP, rotates verified TLS profiles, rejects masked *** credentials, and caps direct-IP retries cleanly.
| Supported Proxy Format | Normalized Output |
|---|---|
http://user:pass@203.0.113.10:8080 | http://user:pass@203.0.113.10:8080 |
user:pass@203.0.113.10:8080 | http://user:pass@203.0.113.10:8080 |
203.0.113.10:8080@user:pass | http://user:pass@203.0.113.10:8080 |
203.0.113.10:8080:user:pass | http://user:pass@203.0.113.10:8080 |
user:pass:203.0.113.10:8080 | http://user:pass@203.0.113.10:8080 |
203.0.113.10:8080 / socks5://user:pass@203.0.113.10:1080 | http://203.0.113.10:8080 / socks5://... |
🐍 5. Python SDK (Sync & Async Parity)
import asyncio
from ozon_parser import AsyncOzonClient, OzonClient, OzonConfig, ProxyPool, to_excel
# 1. Multi-proxy LRU pool (any of 6 formats, multiline string, or proxies.txt)
pool = ProxyPool([
"203.0.113.10:8001:user1:pass1",
"user2:pass2@203.0.113.11:8002|https://changeip.mobileproxy.space/?proxy_key=KEY",
], min_interval=4.0, cooldown_seconds=60.0)
with OzonClient(proxies=pool, tracker_db="ozon_prices.db") as ozon:
items = ozon.search("видеокарта rtx 4060", max_pages=2, with_seller=True)
for item in items[:5]:
print(item.id, item.name, f"{item.price}₽", f"Ozon Карта: {item.card_price}₽", f"ИНН: {item.company_inn}")
to_excel(items, "result/ozon_cards.xlsx")
# 2. Full Async Parity via config.toml or direct kwargs
async def main():
cfg = OzonConfig.from_file("ozon.toml")
async with AsyncOzonClient.from_config(cfg) as az:
print(await az.ping())
results = await az.search("беспроводные наушники", max_pages=2, limit=40)
cat = await az.get_category("/category/naushniki-15548/", max_pages=1)
return results, cat
asyncio.run(main())
🤖 6. Smart Reviews & g4f>=9.0.3 / Official AI Engine
Analyze buyer reviews with Offline NLP, live g4f>=9.0.3 model testing/scanning, local Ollama, or Official OpenAI / Claude / Gemini / DeepSeek / Mistral / xAI / Groq APIs.
from ozon_parser import AIClient, OzonClient, get_g4f_version, quick_scan_ai_providers, reviews_to_excel, test_ai_provider
print("g4f version:", get_g4f_version())
live = [r for r in quick_scan_ai_providers(timeout=12.0) if r.success]
with OzonClient(cookies="__cf_bm=...") as ozon:
summary = ozon.analyze_reviews(1619925434, max_pages=3, ai_mode="free", ai_provider="g4f")
# Or use an Official API (Claude / OpenAI / Gemini / DeepSeek / Groq / Custom):
# claude = AIClient(mode="paid", provider="anthropic", api_key="sk-ant-...").chat("Analyze pros & cons")
reviews_to_excel(summary, "result/ozon_reviews.xlsx")
print(test_ai_provider("g4f", mode="free"))
✈️ 7. Interactive OzonTelegramBot & Live Proxy Commands
| Command | Action |
|---|---|
/start, /status | Control panel & live status |
/search, /drops, /rank, /reviews, /seller | Catalog search, drops, rank, reviews & seller INN |
/proxies <list|off> | Update or clear live ProxyPool |
/proxy <url|off> [key] | Switch single proxy or turn off |
/tg_proxy <socks5://...|off> | Set isolated Telegram API proxy |
⌨️ 8. CLI (14 Commands) & ozon.toml
ozon-parser ping --proxies proxies.txt
ozon-parser card 1619925434 --with-seller -o item.xlsx
ozon-parser search "ноутбук" --pages 3 --proxies proxies.txt --min-discount 15 -o search.xlsx
ozon-parser reviews 1619925434 --mode free --pages 3 -o reviews.xlsx
ozon-parser rank 1619925434 "видеокарта rtx 4060" --pages 3 -o ranks.xlsx
ozon-parser ai --quick-scan
ozon-parser bot --tg-token "123:AAF..." --proxies proxies.txt --tg-proxy "socks5://127.0.0.1:1080"
🔌 9. Native MCP Server (ozon-mcp)
9 JSON-RPC 2.0 stdio tools for AI IDEs with OZON_PROXIES, OZON_TG_PROXY, and Free/Paid AI presets.
{
"mcpServers": {
"ozon": {
"command": "uvx",
"args": ["--from", "ozon-sdk-pro[tls,ai]", "ozon-mcp"],
"env": {
"OZON_PROXIES": "proxies.txt",
"OZON_MOBILEPROXY_KEY": "YOUR_KEY",
"OZON_TG_PROXY": "socks5://127.0.0.1:1080",
"OZON_TRACKER_DB": "ozon_prices.db",
"OZON_AI_MODE": "auto"
}
}
}
}