v0.1.0 — Initial release
First public release of tiktok-metadata-kit.
What's included
- Research API client (
tiktok_metadata_kit.research_api.ResearchAPIClient)- Automatic OAuth client-credentials token retrieval and proactive refresh
- Single-page primitives:
query_videos,query_user_videos - Streaming generators with cursor-based pagination:
iter_videos,
iter_user_videos,iter_video_pages,iter_user_video_pages - Typed query parameters via
QueryOptions/PageOptionsTypedDicts - Configurable response fields (constructor default + per-call override)
- Retry with exponential backoff on transient failures (429, 5xx, network
errors); honorsRetry-After - Sync
httpxclient with connection pooling and context-manager support
- Python 3.12+, fully typed (
py.typedmarker shipped)
Full Changelog: https://github.com/Nico-AP/tiktok-metadata-kit/commits/v0.1.0
Not yet included
The scraper subpackage is stubbed but not functional. The pip install "tiktok-metadata-kit[scraper]" extra installs its runtime dependencies in anticipation of a future release.
Installation
pip install tiktok-metadata-kitQuick start
from tiktok_metadata_kit.research_api import ResearchAPIClient
with ResearchAPIClient("client_key", "client_secret") as client:
for video in client.iter_user_videos(["username"]):
print(video["id"], video["view_count"])See the README for filter options, pagination control, and field selection.
Requirements
- Python ≥ 3.12
- TikTok Research API credentials (apply at the TikTok developer portal)