Skip to main content

Official Python SDK for SaverAPI.NET — download media from Instagram, TikTok, YouTube, Facebook, Twitter, and more. Includes Shazam recognition, NSFW scanner, music search & charts.

Project description

🚀 SaverAPI Client

Official Python SDK for SaverAPI.NET

One library — every platform. Download media from 13+ social networks, recognize tracks with Shazam, search music, fetch global charts, and scan content for NSFW.

PyPI Python Downloads License Website


📦 Installation

pip install -U saverapi-client

Get your free API key at saverapi.net.


⚡ Initialize the client (once)

from saverapi import SaverAPI

api = SaverAPI(api_key="YOUR_API_KEY")

All examples below use this single api instance.


🧭 API map

# Method Endpoint
1 api.nsfw_scan(url) /nsfw-scanner-api
2 api.shazam_recognize(url) /shazam-recognize
3 api.youtube_info(url) /youtube-info-v2
4 api.shazam_top(country) /shazam-music-top
5 api.music_search(query, limit) /music-search
6 api.youtube(url, format) /youtube-api
7 api.download(url) /all-in-one-downloader-api
8 api.info_balance() /infobalans
9 api.api_keys_statistics() /api-keys/all-statistics

1️⃣ NSFW Scanner — nsfw_scan

result = api.nsfw_scan("https://example.com/video.mp4")
print(result)

Response

{
  "nsfw_percentage": "99.96%",
  "is_nsfw": "YES 🔞"
}

2️⃣ Shazam Recognize — shazam_recognize

Identify any track from a public audio/video URL.

result = api.shazam_recognize(
    "https://codeskulptor-demos.commondatastorage.googleapis.com/GalaxyInvaders/theme_01.mp3"
)

print(result["track"]["title"], "—", result["track"]["subtitle"])
print(result["track"]["url"])

Response (excerpt)

{
  "matches": [
    { "id": "850879048", "offset": 111.537570312 }
  ],
  "track": {
    "key": "850879048",
    "title": "Que Tengo Que Hacer",
    "subtitle": "Robert G",
    "images": {
      "coverart": "https://is1-ssl.mzstatic.com/.../400x400cc.jpg"
    },
    "url": "https://www.shazam.com/track/850879048/que-tengo-que-hacer",
    "genres": { "primary": "Modern Dancehall" },
    "isrc": "QZW9L2519842"
  }
}

3️⃣ YouTube Info — youtube_info

Metadata + every available format/size for a YouTube URL.

info = api.youtube_info("https://youtu.be/bICMVAhktBE?list=RDT_tyeZfxoXE")

print(info["title"], "·", info["author"])
for f in info["formats"]:
    print(f["type"], f["format"], f["filesize"])

Response

{
  "ok": true,
  "video_id": "YA8PBoIRkIg",
  "title": "【DLEJ】Vaqtinchalik shamol ✦ 나는 잠시 머문 바람",
  "author": "Dreams by dlej",
  "thumbnail": "https://i.ytimg.com/vi/YA8PBoIRkIg/sddefault.jpg",
  "duration": 201,
  "formats": [
    { "type": "video", "format": "144p",  "filesize": 4681719 },
    { "type": "video", "format": "240p",  "filesize": 5796762 },
    { "type": "video", "format": "360p",  "filesize": 8343828 },
    { "type": "video", "format": "480p",  "filesize": 11329839 },
    { "type": "video", "format": "720p",  "filesize": 19039410 },
    { "type": "video", "format": "1080p", "filesize": 67305699 },
    { "type": "audio", "format": "audio", "filesize": 3253320 }
  ]
}

4️⃣ Shazam Top 200 chart — shazam_top

chart = api.shazam_top(country="us")   # us · uz · ru · gb · tr · de · ...

print(chart["chart"], "—", chart["total_songs"], "songs")
for s in chart["songs"][:5]:
    print(f"{s['position']:>3}. {s['title']}{s['artist']}")

Response (excerpt)

{
  "status": "success",
  "country": "Uzbekistan",
  "country_code": "UZ",
  "chart": "Top 200 Uzbekistan",
  "total_songs": 200,
  "songs": [
    { "position": 1, "title": "Vaqtinchalik Shamol", "artist": "DLEJ" },
    { "position": 2, "title": "Мальборо", "artist": "SAYAN" },
    { "position": 3, "title": "Her E Gul", "artist": "Strane Kurdi" }
  ]
}

5️⃣ Music Search — music_search

results = api.music_search("Hello!", limit=10)

for t in results["results"]:
    print(t["title"], "—", t["artist"], f"({t['duration']})")

Response

{
  "query": "hello",
  "total_results": 2,
  "results": [
    {
      "id": "YQHsXMglC9A",
      "title": "Adele - Hello (Official Music Video)",
      "artist": "Adele",
      "duration": "6:07",
      "thumbnail": "https://i.ytimg.com/vi/YQHsXMglC9A/mqdefault.jpg"
    },
    {
      "id": "kK42LZqO0wA",
      "title": "Martin Solveig & Dragonette - Hello (Official Short Video Version HD)",
      "artist": "Kontor.TV",
      "duration": "4:13",
      "thumbnail": "https://i.ytimg.com/vi/kK42LZqO0wA/mqdefault.jpg"
    }
  ]
}

6️⃣ YouTube Downloader — youtube

Returns a direct, ready-to-stream tunnel URL.

yt = api.youtube("https://youtu.be/OORSiK8ScTI", format="720")
# format: "144" | "240" | "360" | "480" | "720" | "1080" | "audio"

print(yt["title"], "·", yt["author"])
print("→", yt["url"])

# Optional: stream-save to disk
api.save_file(yt["url"], "downloads/video.mp4")

Response

{
  "status": "tunnel",
  "url": "https://dl.saverapi.net/tunnel/fef2ca53-6fa7-401c-bd0c-4b303e58ac77.mp4",
  "filename": "【DLEJ】Vaqtinchalik shamol - DLEJ (1080p, h264).mp4",
  "width": 1920,
  "height": 1080,
  "thumbnail": "https://i.ytimg.com/vi/YA8PBoIRkIg/hqdefault.jpg",
  "title": "【DLEJ】Vaqtinchalik shamol ✦ 나는 잠시 머문 바람",
  "author": "DLEJ"
}

7️⃣ All-in-One Downloader — download

One endpoint for every platform below.

data = api.download(
    "https://www.instagram.com/reel/DPOi9V-CAqH/?utm_source=ig_web_copy_link"
)

print(data["hosting"], "·", data["type"])
print("→", data["download_url"])

Response

{
  "error": false,
  "hosting": "instagram",
  "shortcode": "DYEZ4_FIlWf",
  "caption": "1-kun zalni to'ldirib o'tirgan barcha muhlislarimga kattakon raxmat🤗",
  "type": "video",
  "download_url": "https://instagram.fsgn5-5.fna.fbcdn.net/.../video.mp4",
  "thumb": "https://instagram.fsgn5-5.fna.fbcdn.net/.../cover.jpg"
}

📥 Supported platforms

Platform Content
📸 Instagram posts, reels, stories, albums
🎵 TikTok videos
📘 Facebook videos, photos
🐦 Twitter (X) videos, photos, GIFs
👻 Snapchat stories, spotlight
📌 Pinterest images, videos
💖 Likee videos
🎧 SoundCloud audio tracks
🎶 Spotify audio tracks
🧵 Threads images, videos
🎬 Twitch clips, videos
🌐 Weibo images, videos
🎬 Vimeo videos

8️⃣ Account Balance — info_balance

Check your plan, remaining credits and subscription dates.

balance = api.info_balance()

print("Plan:", balance["plan"]["name"])
print("Credits:", balance["credits_remaining"], "/", balance["credits_total"])
print("Expires:", balance["subscription"]["expires_at"])

Response

{
  "success": true,
  "owner": "user@example.com",
  "plan": { "name": "Pro" },
  "credits_total": 1000,
  "credits_remaining": 420,
  "subscription": {
    "purchased_at": "2025-10-22T19:00:00.000Z",
    "expires_at": "2025-11-21T19:00:00.000Z"
  }
}

9️⃣ API Keys Statistics — api_keys_statistics

Full per-key usage analytics: hourly / daily / weekly / monthly counts, success rate, and breakdown by platform (YouTube, Instagram, TikTok, Twitter, …).

stats = api.api_keys_statistics()

for key in stats["data"]:
    s = key["statistics"]
    print(f"🔑 {key['apiKeyName']} ({key['apiKey']})")
    print(f"   Total: {s['timePeriod']['total']}  ·  Success rate: {s['requests']['successRate']}%")
    for platform, data in s["platforms"].items():
        print(f"   • {platform}: {data['total']}  ({data['successRate']}%)")

Response (excerpt)

{
  "success": true,
  "data": [
    {
      "apiKeyId": "cmlvlzuuasdsadf1wmzgasdjzkwasdsaxfzbqjz",
      "apiKeyName": "app",
      "apiKey": "sk_mlvlzuue_300dsdsa386...",
      "createdAt": "2026-02-21T00:57:15.495Z",
      "statistics": {
        "timePeriod": {
          "hourly": 47, "daily": 1101, "weekly": 3324,
          "monthly": 3397, "total": 3626
        },
        "requests": { "success": 3559, "failed": 67, "successRate": 98.2 },
        "platforms": {
          "YouTube":   { "total": 158, "successRate": 70.9 },
          "Instagram": { "total": 82,  "successRate": 98.8 },
          "TikTok":    { "total": 19,  "successRate": 100  },
          "Twitter":   { "total": 7,   "successRate": 100  }
        }
      }
    }
  ],
  "cached": false,
  "computedAt": "2026-05-08T10:38:47.308Z"
}

🔁 Run them all in sequence

from saverapi import SaverAPI, SaverAPIError

api = SaverAPI(api_key="YOUR_API_KEY")

calls = [
    ("NSFW",       lambda: api.nsfw_scan("https://example.com/video.mp4")),
    ("Shazam",     lambda: api.shazam_recognize("https://example.com/audio.mp3")),
    ("YT info",    lambda: api.youtube_info("https://youtu.be/bICMVAhktBE")),
    ("Top chart",  lambda: api.shazam_top("us")),
    ("Search",     lambda: api.music_search("Hello!", limit=10)),
    ("YT dl",      lambda: api.youtube("https://youtu.be/OORSiK8ScTI", format="720")),
    ("All-in-one", lambda: api.download("https://www.instagram.com/reel/DPOi9V-CAqH/")),
    ("Balance",    lambda: api.info_balance()),
    ("Stats",      lambda: api.api_keys_statistics()),
]

for name, fn in calls:
    try:
        print(f"✅ {name}:", fn())
    except SaverAPIError as e:
        print(f"❌ {name}: [{e.status_code}] {e.message}")

📞 Support


📝 License

MIT © SaverAPI.NET

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saverapi_client-1.0.3.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saverapi_client-1.0.3-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file saverapi_client-1.0.3.tar.gz.

File metadata

  • Download URL: saverapi_client-1.0.3.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for saverapi_client-1.0.3.tar.gz
Algorithm Hash digest
SHA256 1eb052d0f7597d96ff8259c108aac9110fb34b65d2fefbaf28788128c4ea2156
MD5 9b204bc14c1afb25b171bc5420fdcc37
BLAKE2b-256 2f7ab59fd641cfe73a576c27c03690a5d3ee07c4b999e1073caa289adaba073e

See more details on using hashes here.

File details

Details for the file saverapi_client-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for saverapi_client-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3e677342477b70eab64f17732795500e9c53009af3cf017bfb6cbaa8d17829d8
MD5 6c8527f576eff2e2840401ec30abce07
BLAKE2b-256 8e566a97d942d6cf941ba5cce76ebae48787de9509ad9c1c5da22bdd230dc3ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page