saveapi — Python client for saveapi.org
Download videos, photos and audio from Instagram, TikTok, YouTube, Facebook, X (Twitter), Pinterest, Likee, Snapchat, Threads, VK, Rutube, 9GAG and Twitch with one API call. Send a public post link, get back direct media URLs and metadata in one JSON shape.
- Docs: https://saveapi.org/en/docs/
- Free key (1,000 credits, no card): https://saveapi.org/en/signup/
- Pricing: https://saveapi.org/en/pricing/
pip install saveapi
Quick start
from saveapi import SaveAPI
api = SaveAPI("sk_live_...") # or set SAVEAPI_KEY and call SaveAPI()
post = api.download("https://www.tiktok.com/@zachking/video/6768504823336815877")
print(post["platform"], post["meta"]["title"])
for media in post["medias"]:
print(media["type"], media["ext"], media["url"])
download() detects the platform from the link. To call one platform's endpoint directly use api.platform("instagram", url).
Async
import asyncio
from saveapi import AsyncSaveAPI
async def main():
async with AsyncSaveAPI() as api:
post = await api.download("https://www.instagram.com/reel/DdwXSSkMvJz/")
print(post["medias"][0]["url"])
asyncio.run(main())
YouTube
YouTube is two steps: read the available qualities, then create a link for one of them.
info = api.youtube_info("https://youtu.be/dQw4w9WgXcQ") # 2 credits
print([f["quality"] for f in info["formats"]])
link = api.youtube_create("https://youtu.be/dQw4w9WgXcQ", "mp3") # 10 credits
print(link["url"], link["filename"])
Video qualities are H.264 MP4 144p–1080p; mp3 and m4a are audio. The link is short-lived — download it right away.
Errors
Every failed call raises SaveAPIError. Match on error.code, not on the message:
from saveapi import SaveAPI, SaveAPIError
try:
post = api.download(url)
except SaveAPIError as error:
if error.code in ("PRIVATE_CONTENT", "MEDIA_NOT_FOUND"):
print("The post is private or gone") # final answer, costs 0.1 credit
elif error.code == "QUOTA_EXCEEDED":
print("Top up at https://saveapi.org/en/dashboard/billing/")
else:
raise
The client retries only what a retry can fix: UPSTREAM_TIMEOUT and UPSTREAM_ERROR (once by default, max_retries=), and RATE_LIMITED after the Retry-After delay. Private, deleted and unsupported links are never retried. Full list of codes: https://saveapi.org/en/docs/#errors.
All methods
| Method | Endpoint | Cost |
|---|---|---|
download(url, full_meta=False, limit_mb=None) |
/v1/download |
1.5 credits |
platform(name, url, ...) |
/v1/{platform} |
1.5 credits |
youtube_info(url) |
/v1/youtube/info |
2 credits |
youtube_create(url, quality="720p") |
/v1/youtube/create |
10 credits |
instagram_profile(username=None, url=None) |
/v1/instagram/profile |
3 credits |
detect(url) |
/v1/detect |
free |
platforms() |
/v1/platforms |
free |
me() |
/v1/me |
free |
usage(days=30) |
/v1/usage |
free |
Instagram stories cost 5 credits, Rutube 3, and a link the source refuses 0.1. Current prices: https://saveapi.org/en/pricing/.
Guides
- Telegram downloader bot
- Download social media videos in Python
- TikTok without watermark
- YouTube to MP3 API
License
MIT
Metadata
Release files for saveapi 0.1.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 | Actions |
|---|---|---|---|---|
| saveapi-0.1.0.tar.gz | 8.6 kB | Without provenance | Details for saveapi-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| saveapi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for saveapi-0.1.0-py3-none-any.whl |
Total release size: 17.8 kB
Release files / saveapi-0.1.0.tar.gz
| Download URL | saveapi-0.1.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a26474038e4af361096b8af240f86f001353f8e49cc070f819149fb0396d4586
|
|
BLAKE2b-256 checksum How to use checksums |
7595f4e56923fce51627599591dac36eb1dc15136659328bb4fd1264f538ffba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / saveapi-0.1.0-py3-none-any.whl
| Download URL | saveapi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa59f5f3bdb6156865079e62896c642acd99a0267ffc82cd3458c610adf351e1
|
|
BLAKE2b-256 checksum How to use checksums |
0ac621cba606f4b78de5ff6e6391389d4bf6b077715e1effac68cc876a195e49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for saveapi 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.