Releases: Nico-AP/tiktok-metadata-kit
Releases · Nico-AP/tiktok-metadata-kit
v0.1.2
v0.1.1
Highlights
- Refactored
query_videossurface around iterator-based methods andQueryVideosOptionsdataclass. - Removed the (non-functional)
scrapersubpackage from the wheel — it was silently shipped in v0.1.0.
Breaking changes
query_user_videos/iter_*removed,query_videosis now used as the general entry point. Usequery_videos,query_videos_pages,query_videos_by_id,query_videos_by_usernameinstead.PageOptions/QueryOptionsTypedDicts removed. UseQueryVideosOptionsdataclass.- New
query_user_info(username)method to call the Query User Info endpoint. [scraper]optional-dependency removed; the subpackage is no longer in the wheel.
See README quickstart for migrated examples.
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)