This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.3 instead.
Reason given by maintainers: Release bug Fixes
Qivaryn
Qivaryn is a high-performance, multi-platform media downloader with a shared command-line interface and Python API. Its platform integrations handle the details that differ between services, while common download options and history management work the same way everywhere.
Features
- Four platforms, one engine: Instagram, TikTok, YouTube and Facebook share the same CLI, filtering, batch limits, resume logic and state database.
- Automatic URL Detection: Pass a URL from any supported platform and Qivaryn routes it to the right downloader.
- Native integrations: Every platform is handled by Qivaryn's own scrapers — no
yt-dlpor other downloader dependency. - High-quality downloads: Platform integrations pick the best available progressive or adaptive stream (up to 1080p where offered) and download carousel slides in original resolution.
- Media Filtering: Filter account downloads by media type where the platform supports it.
- Audio & Video Merging: When a platform provides split video/audio streams (Instagram DASH, YouTube adaptive formats), Qivaryn uses FFmpeg to merge them.
- Batch Limits (
--count): Specify the exact number of new items to save. Previously downloaded content is skipped without counting toward the quota. - Download Resumption: Tracks downloaded items per platform in a local SQLite database (
qivaryn_state.db). - Dual Interface: Offers both a command-line interface (CLI) and a Python library API.
Supported platforms
| Platform | Single items | Account feeds | Playlists | Notes |
|---|---|---|---|---|
| Posts, Reels, carousels | Profile grid + Reels tab | — | Age-gated profiles need an adult session | |
| TikTok | Videos, photo posts | Profile feed | — | Pagination may need cookies |
| YouTube | Videos, Shorts, live URLs | Videos, Shorts, Streams tabs | Yes | See limitations |
| Videos, Reels | Page videos tab (best effort) | — | Page feeds usually require cookies |
Run qivaryn platforms to see the available platforms and filters in your installed version.
Requirements
- Python 3.10 or newer
- FFmpeg available on your system
PATHwhen downloading content with split audio/video streams (Instagram DASH, YouTube adaptive formats). - Authentication is optional but platform-specific. See Authentication.
Installation
Install from PyPI (Recommended)
python -m pip install qivaryn-engine
Install from local checkout (Recommended for development)
git clone https://github.com/usamanadim/qivaryn-engine.git
cd qivaryn-engine
python -m pip install -e .
Install latest development version from GitHub
python -m pip install --upgrade "git+https://github.com/usamanadim/qivaryn-engine.git@main"
Quick Start (Cheatsheet)
# Instagram profile
qivaryn "https://www.instagram.com/USERNAME/"
# TikTok profile
qivaryn "https://www.tiktok.com/@USERNAME"
# YouTube channel
qivaryn "https://www.youtube.com/@CHANNEL/videos"
# Facebook page
qivaryn "https://www.facebook.com/PAGE/videos" --cookies cookies.txt
Qivaryn detects the platform from the URL, so --platform is only needed for the explicit subcommands.
Command-Line Usage
1. Automatic URL Command
qivaryn "<SUPPORTED_URL>" [OPTIONS]
| URL shape | What happens |
|---|---|
Instagram /p/…, /reel/… |
Downloads that item (all carousel slides included) |
Instagram /<username>/ |
Downloads the profile grid, continuing into the Reels tab |
Instagram /<username>/reels/ |
Scans the dedicated Reels tab |
TikTok /@user/video/<id>, /@user/photo/<id> |
Downloads that item |
TikTok /@user |
Downloads the profile feed |
TikTok vm.tiktok.com/… |
Resolves the short link, then downloads that item |
YouTube youtu.be/<id>, /watch?v=<id>, /shorts/<id> |
Downloads that video or Short |
YouTube /playlist?list=<id> |
Downloads every video in the playlist |
YouTube /@handle, /channel/<id> |
Downloads the channel's Videos, Shorts and Streams tabs |
YouTube /@handle/videos, /shorts, /streams |
Downloads that tab only |
Facebook /watch/?v=<id>, /reel/<id>, /page/videos/<id> |
Downloads that video or Reel |
Facebook /<page>, /<page>/videos |
Scans the page's videos tab (best effort) |
Available Options
| Option | Shorthand | Description | Default |
|---|---|---|---|
--platform NAME |
Platform for explicit subcommands: instagram, tiktok, youtube, facebook. |
instagram |
|
--type TYPE |
Filter media where supported. Values depend on the platform. | all |
|
--count N |
-n N, --limit N |
Maximum number of new items to save before stopping. | Unlimited |
--cookies PATH |
--cookies-file |
Path to a Netscape-format cookies.txt file. |
None |
--sessionid STR |
Direct sessionid cookie value (Instagram and TikTok only). |
None | |
--output DIR |
-o DIR |
Directory to save downloaded media files. | ./downloads |
--db PATH |
Path to SQLite state database for download tracking. | qivaryn_state.db |
|
--max-pages N |
Maximum feed pagination pages to scan. | Unlimited | |
--force |
-f |
Re-download and overwrite even if already saved. | False |
2. Explicit Subcommands
qivaryn single
Downloads a single item by URL or identifier:
qivaryn single "https://www.instagram.com/p/SHORTCODE/"
qivaryn single "https://www.tiktok.com/@user/video/7300000000000000000"
qivaryn single "https://youtu.be/VIDEO_ID"
qivaryn single "https://www.facebook.com/watch/?v=123456789" --cookies cookies.txt
qivaryn download
Downloads account or channel content. Use --platform when the account name is not prefixed by a URL:
# Instagram Reels
qivaryn download natgeo --type reels --count 25
# YouTube Shorts from a channel handle
qivaryn download @somechannel --platform youtube --type shorts --count 10
# TikTok profile feed
qivaryn download someuser --platform tiktok --count 20 --cookies cookies.txt
# Facebook page videos
qivaryn download somepage --platform facebook --cookies cookies.txt
qivaryn platforms
Lists the supported platforms and their media filters:
qivaryn platforms
Media Filtering Guide (--type)
| Platform | Values | Notes |
|---|---|---|
all, posts, reels, videos, carousels |
posts = images + carousels; videos = reels |
|
| TikTok | all, videos, photos |
photos includes multi-image photo posts |
| YouTube | all, videos, shorts, streams |
Each value maps to the matching channel tab |
all, videos |
Videos and Reels |
Requesting a filter a platform does not support fails with a clear message rather than silently downloading something else.
Authentication
Authentication is optional for public content. Export cookies with a browser extension such as Get cookies.txt LOCALLY or Cookie-Editor (select Export → Netscape), then:
qivaryn "https://www.instagram.com/USERNAME/" --cookies cookies.txt
| Platform | What cookies unlock |
|---|---|
| Private accounts, deeper pagination, age-gated profiles, fewer HTTP 429 responses | |
| TikTok | Profile pagination beyond the items embedded in the page |
| YouTube | Age-restricted videos and "confirm you're not a bot" challenges |
| Most videos, and almost all page video feeds |
Using --sessionid Directly
For Instagram and TikTok you can pass the sessionid cookie value instead of a cookies file:
qivaryn "https://www.instagram.com/USERNAME/" --sessionid "YOUR_SESSION_ID"
Managing Download History (clear-db)
Download history is stored per platform, so an Instagram shortcode and a TikTok video ID can never collide. clear-db manages history without deleting media files:
# Remove a single item so it can be re-downloaded
qivaryn clear-db SHORTCODE
qivaryn clear-db --item "https://www.instagram.com/p/SHORTCODE/"
# Limit the operation to one platform
qivaryn clear-db --platform youtube --yes
# Prune records for media files that were deleted from disk
qivaryn clear-db --missing
# Clear one platform's history (prompts for confirmation)
qivaryn clear-db --platform tiktok
Databases created by older versions are migrated automatically: existing rows are kept and attributed to Instagram.
File Naming
- Instagram keeps the historical
<shortcode>.<ext>layout. - Other platforms use
<platform>_<id>.<ext>so files from different services never overwrite each other. - Carousels append a slide index:
<stem>_1.<ext>,<stem>_2.<ext>, …
Python Library API
from qivaryn import QivarynEngine
engine = QivarynEngine(
platform="youtube", # "instagram", "tiktok", "youtube" or "facebook"
output_dir="./downloads",
db_path="./qivaryn_state.db",
cookies_file="./cookies.txt", # Optional: omit for public content
consecutive_threshold=3, # Stop after N consecutive known items
allow_network_fallbacks=True, # Retry without the session when it expires
)
# 1. Download automatically from a URL
engine.download_url(
"https://www.youtube.com/@CHANNEL/videos",
count=20,
media_type="videos",
)
# 2. Download account/channel content
engine.download_account(
"@CHANNEL",
media_type_filter="shorts",
count=10,
)
# 3. Download a single item
engine.download_single("https://youtu.be/VIDEO_ID", force=False)
# 4. Playlists (YouTube)
engine.download_playlist("PLxxxxxxxxxxxxxxxx")
InstagramEngine remains available as an alias of QivarynEngine, and the platform clients are importable directly:
from qivaryn import InstagramClient, TikTokClient, YouTubeClient, FacebookClient
See qivaryn/examples/library_usage.py for a complete runnable script.
Platform Limitations
Qivaryn uses native scrapers, so some platform-side restrictions cannot be worked around:
- YouTube: Formats whose URLs are protected by a
signatureCipherrequire executing YouTube's obfuscated JavaScript player. Qivaryn has no JavaScript engine, so a video offering only ciphered formats is reported as unsupported instead of producing a broken file. Some streams also download slower without thenparameter transform. Live streams in progress are not downloadable. - TikTok: The paginated post-list API is request-signed. Qivaryn scans the items TikTok embeds in the profile page and then attempts the API; anonymous pagination may stop early. Supplying
--cookiesnoticeably improves reach. - Facebook: Facebook gates page video feeds behind a login wall. Single video URLs usually work anonymously; page feeds almost always need
--cookies. - Instagram: Age-gated profiles require an adult (19+) session.
Development & Testing
# Run all unit tests
python -m unittest discover -s tests -v
# Build wheels and source distribution
python -m pip install build
python -m build
License and Required Attribution
Qivaryn is licensed under the Qivaryn Attribution License 1.0 in LICENSE. Commercial use is permitted. Anyone using, modifying, incorporating, or distributing Qivaryn must credit the original author:
Qivaryn by Usama Nadeem (@usamanadim) — https://github.com/usamanadim/qivaryn-engine
Machine-readable attribution metadata is available in qivaryn/ATTRIBUTION.json.
Metadata
Release files for qivaryn-engine 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| qivaryn_engine-0.2.0.tar.gz | 70.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qivaryn_engine-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 133.7 kB
Release files / qivaryn_engine-0.2.0.tar.gz
| Download URL | qivaryn_engine-0.2.0.tar.gz |
|---|---|
| Size | 70.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f22ee7ee1a35c51cd5800249be96a48b83694dc2155975e1a3783c2f4385e782
|
|
BLAKE2b-256 checksum How to use checksums |
e77c05db7030d6348966ed2357a9dc1321bdea2021a602d839fdb3e40ea96409
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / qivaryn_engine-0.2.0-py3-none-any.whl
| Download URL | qivaryn_engine-0.2.0-py3-none-any.whl |
|---|---|
| Size | 62.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4457c8280f4203d374931a374cb77acfae4cadadec30584d2746b903e69573c6
|
|
BLAKE2b-256 checksum How to use checksums |
28ed1739787efe81d802785ba4fab2161816499b7cb587811778edf1cff50150
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for qivaryn-engine 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for qivaryn_engine-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.