saverapi-client 1.0.1__tar.gz → 1.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,435 @@
1
+ Metadata-Version: 2.4
2
+ Name: saverapi-client
3
+ Version: 1.0.3
4
+ Summary: Official Python SDK for SaverAPI.NET — download media from Instagram, TikTok, YouTube, Facebook, Twitter, and more. Includes Shazam recognition, NSFW scanner, music search & charts.
5
+ Author-email: "SaverAPI.NET" <saverapinet@gmail.com>
6
+ Project-URL: Homepage, https://saverapi.net
7
+ Project-URL: Documentation, https://saverapi.net/user/documentation
8
+ Keywords: instagram downloader,instagram reel downloader,tiktok downloader,tiktok video api,youtube downloader,youtube api python,social media downloader,video downloader api,media downloader,api client python,python sdk,instagram api,tiktok api,youtube video download,reels downloader,shorts downloader,facebook video downloader,twitter video downloader,x video downloader,scraping api,automation api,fast api client,high performance api,download videos python,python downloader library,saverapi,saverapi client,shazam api,shazam recognize,music recognition,nsfw scanner,nsfw detection,music search api,shazam top charts,youtube info,snapchat downloader,pinterest downloader,threads downloader,soundcloud downloader,spotify downloader,vimeo downloader,twitch downloader,likee downloader,weibo downloader
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.7
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Internet :: WWW/HTTP
21
+ Classifier: Topic :: Multimedia :: Video
22
+ Classifier: Topic :: Multimedia :: Sound/Audio
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.7
25
+ Description-Content-Type: text/markdown
26
+ Requires-Dist: requests
27
+
28
+ <div align="center">
29
+
30
+ # 🚀 SaverAPI Client
31
+
32
+ ### Official Python SDK for **[SaverAPI.NET](https://saverapi.net)**
33
+
34
+ **One library — every platform.**
35
+ Download media from 13+ social networks, recognize tracks with Shazam, search music, fetch global charts, and scan content for NSFW.
36
+
37
+ [![PyPI](https://img.shields.io/pypi/v/saverapi-client.svg?color=6f42c1&label=pypi&logo=pypi&logoColor=white)](https://pypi.org/project/saverapi-client/)
38
+ [![Python](https://img.shields.io/pypi/pyversions/saverapi-client.svg?color=3776ab&logo=python&logoColor=white)](https://pypi.org/project/saverapi-client/)
39
+ [![Downloads](https://img.shields.io/pypi/dm/saverapi-client.svg?color=00C7B7&label=installs)](https://pypi.org/project/saverapi-client/)
40
+ [![License](https://img.shields.io/badge/license-MIT-success.svg)](#-license)
41
+ [![Website](https://img.shields.io/badge/saverapi.net-ff4081?logo=googlechrome&logoColor=white)](https://saverapi.net)
42
+
43
+ </div>
44
+
45
+ ---
46
+
47
+ ## 📦 Installation
48
+
49
+ ```bash
50
+ pip install -U saverapi-client
51
+ ```
52
+
53
+ Get your free API key at **[saverapi.net](https://saverapi.net)**.
54
+
55
+ ---
56
+
57
+ ## ⚡ Initialize the client (once)
58
+
59
+ ```python
60
+ from saverapi import SaverAPI
61
+
62
+ api = SaverAPI(api_key="YOUR_API_KEY")
63
+ ```
64
+
65
+ > All examples below use this single `api` instance.
66
+
67
+ ---
68
+
69
+ ## 🧭 API map
70
+
71
+ | # | Method | Endpoint |
72
+ |:-:|---|---|
73
+ | 1 | `api.nsfw_scan(url)` | `/nsfw-scanner-api` |
74
+ | 2 | `api.shazam_recognize(url)` | `/shazam-recognize` |
75
+ | 3 | `api.youtube_info(url)` | `/youtube-info-v2` |
76
+ | 4 | `api.shazam_top(country)` | `/shazam-music-top` |
77
+ | 5 | `api.music_search(query, limit)` | `/music-search` |
78
+ | 6 | `api.youtube(url, format)` | `/youtube-api` |
79
+ | 7 | `api.download(url)` | `/all-in-one-downloader-api` |
80
+ | 8 | `api.info_balance()` | `/infobalans` |
81
+ | 9 | `api.api_keys_statistics()` | `/api-keys/all-statistics` |
82
+
83
+ ---
84
+
85
+ ## 1️⃣ NSFW Scanner — `nsfw_scan`
86
+
87
+ ```python
88
+ result = api.nsfw_scan("https://example.com/video.mp4")
89
+ print(result)
90
+ ```
91
+
92
+ **Response**
93
+
94
+ ```json
95
+ {
96
+ "nsfw_percentage": "99.96%",
97
+ "is_nsfw": "YES 🔞"
98
+ }
99
+ ```
100
+
101
+ ---
102
+
103
+ ## 2️⃣ Shazam Recognize — `shazam_recognize`
104
+
105
+ Identify any track from a public audio/video URL.
106
+
107
+ ```python
108
+ result = api.shazam_recognize(
109
+ "https://codeskulptor-demos.commondatastorage.googleapis.com/GalaxyInvaders/theme_01.mp3"
110
+ )
111
+
112
+ print(result["track"]["title"], "—", result["track"]["subtitle"])
113
+ print(result["track"]["url"])
114
+ ```
115
+
116
+ **Response (excerpt)**
117
+
118
+ ```json
119
+ {
120
+ "matches": [
121
+ { "id": "850879048", "offset": 111.537570312 }
122
+ ],
123
+ "track": {
124
+ "key": "850879048",
125
+ "title": "Que Tengo Que Hacer",
126
+ "subtitle": "Robert G",
127
+ "images": {
128
+ "coverart": "https://is1-ssl.mzstatic.com/.../400x400cc.jpg"
129
+ },
130
+ "url": "https://www.shazam.com/track/850879048/que-tengo-que-hacer",
131
+ "genres": { "primary": "Modern Dancehall" },
132
+ "isrc": "QZW9L2519842"
133
+ }
134
+ }
135
+ ```
136
+
137
+ ---
138
+
139
+ ## 3️⃣ YouTube Info — `youtube_info`
140
+
141
+ Metadata + every available format/size for a YouTube URL.
142
+
143
+ ```python
144
+ info = api.youtube_info("https://youtu.be/bICMVAhktBE?list=RDT_tyeZfxoXE")
145
+
146
+ print(info["title"], "·", info["author"])
147
+ for f in info["formats"]:
148
+ print(f["type"], f["format"], f["filesize"])
149
+ ```
150
+
151
+ **Response**
152
+
153
+ ```json
154
+ {
155
+ "ok": true,
156
+ "video_id": "YA8PBoIRkIg",
157
+ "title": "【DLEJ】Vaqtinchalik shamol ✦ 나는 잠시 머문 바람",
158
+ "author": "Dreams by dlej",
159
+ "thumbnail": "https://i.ytimg.com/vi/YA8PBoIRkIg/sddefault.jpg",
160
+ "duration": 201,
161
+ "formats": [
162
+ { "type": "video", "format": "144p", "filesize": 4681719 },
163
+ { "type": "video", "format": "240p", "filesize": 5796762 },
164
+ { "type": "video", "format": "360p", "filesize": 8343828 },
165
+ { "type": "video", "format": "480p", "filesize": 11329839 },
166
+ { "type": "video", "format": "720p", "filesize": 19039410 },
167
+ { "type": "video", "format": "1080p", "filesize": 67305699 },
168
+ { "type": "audio", "format": "audio", "filesize": 3253320 }
169
+ ]
170
+ }
171
+ ```
172
+
173
+ ---
174
+
175
+ ## 4️⃣ Shazam Top 200 chart — `shazam_top`
176
+
177
+ ```python
178
+ chart = api.shazam_top(country="us") # us · uz · ru · gb · tr · de · ...
179
+
180
+ print(chart["chart"], "—", chart["total_songs"], "songs")
181
+ for s in chart["songs"][:5]:
182
+ print(f"{s['position']:>3}. {s['title']} — {s['artist']}")
183
+ ```
184
+
185
+ **Response (excerpt)**
186
+
187
+ ```json
188
+ {
189
+ "status": "success",
190
+ "country": "Uzbekistan",
191
+ "country_code": "UZ",
192
+ "chart": "Top 200 Uzbekistan",
193
+ "total_songs": 200,
194
+ "songs": [
195
+ { "position": 1, "title": "Vaqtinchalik Shamol", "artist": "DLEJ" },
196
+ { "position": 2, "title": "Мальборо", "artist": "SAYAN" },
197
+ { "position": 3, "title": "Her E Gul", "artist": "Strane Kurdi" }
198
+ ]
199
+ }
200
+ ```
201
+
202
+ ---
203
+
204
+ ## 5️⃣ Music Search — `music_search`
205
+
206
+ ```python
207
+ results = api.music_search("Hello!", limit=10)
208
+
209
+ for t in results["results"]:
210
+ print(t["title"], "—", t["artist"], f"({t['duration']})")
211
+ ```
212
+
213
+ **Response**
214
+
215
+ ```json
216
+ {
217
+ "query": "hello",
218
+ "total_results": 2,
219
+ "results": [
220
+ {
221
+ "id": "YQHsXMglC9A",
222
+ "title": "Adele - Hello (Official Music Video)",
223
+ "artist": "Adele",
224
+ "duration": "6:07",
225
+ "thumbnail": "https://i.ytimg.com/vi/YQHsXMglC9A/mqdefault.jpg"
226
+ },
227
+ {
228
+ "id": "kK42LZqO0wA",
229
+ "title": "Martin Solveig & Dragonette - Hello (Official Short Video Version HD)",
230
+ "artist": "Kontor.TV",
231
+ "duration": "4:13",
232
+ "thumbnail": "https://i.ytimg.com/vi/kK42LZqO0wA/mqdefault.jpg"
233
+ }
234
+ ]
235
+ }
236
+ ```
237
+
238
+ ---
239
+
240
+ ## 6️⃣ YouTube Downloader — `youtube`
241
+
242
+ Returns a direct, ready-to-stream tunnel URL.
243
+
244
+ ```python
245
+ yt = api.youtube("https://youtu.be/OORSiK8ScTI", format="720")
246
+ # format: "144" | "240" | "360" | "480" | "720" | "1080" | "audio"
247
+
248
+ print(yt["title"], "·", yt["author"])
249
+ print("→", yt["url"])
250
+
251
+ # Optional: stream-save to disk
252
+ api.save_file(yt["url"], "downloads/video.mp4")
253
+ ```
254
+
255
+ **Response**
256
+
257
+ ```json
258
+ {
259
+ "status": "tunnel",
260
+ "url": "https://dl.saverapi.net/tunnel/fef2ca53-6fa7-401c-bd0c-4b303e58ac77.mp4",
261
+ "filename": "【DLEJ】Vaqtinchalik shamol - DLEJ (1080p, h264).mp4",
262
+ "width": 1920,
263
+ "height": 1080,
264
+ "thumbnail": "https://i.ytimg.com/vi/YA8PBoIRkIg/hqdefault.jpg",
265
+ "title": "【DLEJ】Vaqtinchalik shamol ✦ 나는 잠시 머문 바람",
266
+ "author": "DLEJ"
267
+ }
268
+ ```
269
+
270
+ ---
271
+
272
+ ## 7️⃣ All-in-One Downloader — `download`
273
+
274
+ > One endpoint for **every** platform below.
275
+
276
+ ```python
277
+ data = api.download(
278
+ "https://www.instagram.com/reel/DPOi9V-CAqH/?utm_source=ig_web_copy_link"
279
+ )
280
+
281
+ print(data["hosting"], "·", data["type"])
282
+ print("→", data["download_url"])
283
+ ```
284
+
285
+ **Response**
286
+
287
+ ```json
288
+ {
289
+ "error": false,
290
+ "hosting": "instagram",
291
+ "shortcode": "DYEZ4_FIlWf",
292
+ "caption": "1-kun zalni to'ldirib o'tirgan barcha muhlislarimga kattakon raxmat🤗",
293
+ "type": "video",
294
+ "download_url": "https://instagram.fsgn5-5.fna.fbcdn.net/.../video.mp4",
295
+ "thumb": "https://instagram.fsgn5-5.fna.fbcdn.net/.../cover.jpg"
296
+ }
297
+ ```
298
+
299
+ ### 📥 Supported platforms
300
+
301
+ | | Platform | Content |
302
+ |:-:|---|---|
303
+ | 📸 | Instagram | posts, reels, stories, albums |
304
+ | 🎵 | TikTok | videos |
305
+ | 📘 | Facebook | videos, photos |
306
+ | 🐦 | Twitter (X) | videos, photos, GIFs |
307
+ | 👻 | Snapchat | stories, spotlight |
308
+ | 📌 | Pinterest | images, videos |
309
+ | 💖 | Likee | videos |
310
+ | 🎧 | SoundCloud | audio tracks |
311
+ | 🎶 | Spotify | audio tracks |
312
+ | 🧵 | Threads | images, videos |
313
+ | 🎬 | Twitch | clips, videos |
314
+ | 🌐 | Weibo | images, videos |
315
+ | 🎬 | Vimeo | videos |
316
+
317
+ ---
318
+
319
+ ## 8️⃣ Account Balance — `info_balance`
320
+
321
+ Check your plan, remaining credits and subscription dates.
322
+
323
+ ```python
324
+ balance = api.info_balance()
325
+
326
+ print("Plan:", balance["plan"]["name"])
327
+ print("Credits:", balance["credits_remaining"], "/", balance["credits_total"])
328
+ print("Expires:", balance["subscription"]["expires_at"])
329
+ ```
330
+
331
+ **Response**
332
+
333
+ ```json
334
+ {
335
+ "success": true,
336
+ "owner": "user@example.com",
337
+ "plan": { "name": "Pro" },
338
+ "credits_total": 1000,
339
+ "credits_remaining": 420,
340
+ "subscription": {
341
+ "purchased_at": "2025-10-22T19:00:00.000Z",
342
+ "expires_at": "2025-11-21T19:00:00.000Z"
343
+ }
344
+ }
345
+ ```
346
+
347
+ ---
348
+
349
+ ## 9️⃣ API Keys Statistics — `api_keys_statistics`
350
+
351
+ Full per-key usage analytics: hourly / daily / weekly / monthly counts, success rate, and breakdown by platform (YouTube, Instagram, TikTok, Twitter, …).
352
+
353
+ ```python
354
+ stats = api.api_keys_statistics()
355
+
356
+ for key in stats["data"]:
357
+ s = key["statistics"]
358
+ print(f"🔑 {key['apiKeyName']} ({key['apiKey']})")
359
+ print(f" Total: {s['timePeriod']['total']} · Success rate: {s['requests']['successRate']}%")
360
+ for platform, data in s["platforms"].items():
361
+ print(f" • {platform}: {data['total']} ({data['successRate']}%)")
362
+ ```
363
+
364
+ **Response (excerpt)**
365
+
366
+ ```json
367
+ {
368
+ "success": true,
369
+ "data": [
370
+ {
371
+ "apiKeyId": "cmlvlzuuasdsadf1wmzgasdjzkwasdsaxfzbqjz",
372
+ "apiKeyName": "app",
373
+ "apiKey": "sk_mlvlzuue_300dsdsa386...",
374
+ "createdAt": "2026-02-21T00:57:15.495Z",
375
+ "statistics": {
376
+ "timePeriod": {
377
+ "hourly": 47, "daily": 1101, "weekly": 3324,
378
+ "monthly": 3397, "total": 3626
379
+ },
380
+ "requests": { "success": 3559, "failed": 67, "successRate": 98.2 },
381
+ "platforms": {
382
+ "YouTube": { "total": 158, "successRate": 70.9 },
383
+ "Instagram": { "total": 82, "successRate": 98.8 },
384
+ "TikTok": { "total": 19, "successRate": 100 },
385
+ "Twitter": { "total": 7, "successRate": 100 }
386
+ }
387
+ }
388
+ }
389
+ ],
390
+ "cached": false,
391
+ "computedAt": "2026-05-08T10:38:47.308Z"
392
+ }
393
+ ```
394
+
395
+ ---
396
+
397
+ ## 🔁 Run them all in sequence
398
+
399
+ ```python
400
+ from saverapi import SaverAPI, SaverAPIError
401
+
402
+ api = SaverAPI(api_key="YOUR_API_KEY")
403
+
404
+ calls = [
405
+ ("NSFW", lambda: api.nsfw_scan("https://example.com/video.mp4")),
406
+ ("Shazam", lambda: api.shazam_recognize("https://example.com/audio.mp3")),
407
+ ("YT info", lambda: api.youtube_info("https://youtu.be/bICMVAhktBE")),
408
+ ("Top chart", lambda: api.shazam_top("us")),
409
+ ("Search", lambda: api.music_search("Hello!", limit=10)),
410
+ ("YT dl", lambda: api.youtube("https://youtu.be/OORSiK8ScTI", format="720")),
411
+ ("All-in-one", lambda: api.download("https://www.instagram.com/reel/DPOi9V-CAqH/")),
412
+ ("Balance", lambda: api.info_balance()),
413
+ ("Stats", lambda: api.api_keys_statistics()),
414
+ ]
415
+
416
+ for name, fn in calls:
417
+ try:
418
+ print(f"✅ {name}:", fn())
419
+ except SaverAPIError as e:
420
+ print(f"❌ {name}: [{e.status_code}] {e.message}")
421
+ ```
422
+
423
+ ---
424
+
425
+ ## 📞 Support
426
+
427
+ - 🌍 Website — <https://saverapi.net>
428
+ - 📧 Email — saverapinet@gmail.com
429
+ - 💬 Telegram — [@BizBotSupport](https://t.me/BizBotSupport)
430
+
431
+ ---
432
+
433
+ ## 📝 License
434
+
435
+ MIT © [SaverAPI.NET](https://saverapi.net)