saverapi-client 1.0.0__tar.gz → 1.0.2__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.
- saverapi_client-1.0.2/PKG-INFO +389 -0
- saverapi_client-1.0.2/README.md +360 -0
- saverapi_client-1.0.2/pyproject.toml +83 -0
- saverapi_client-1.0.2/saverapi/__init__.py +4 -0
- saverapi_client-1.0.2/saverapi/client.py +154 -0
- saverapi_client-1.0.2/saverapi_client.egg-info/PKG-INFO +389 -0
- {saverapi_client-1.0.0 → saverapi_client-1.0.2}/saverapi_client.egg-info/SOURCES.txt +1 -0
- {saverapi_client-1.0.0 → saverapi_client-1.0.2}/setup.cfg +4 -4
- saverapi_client-1.0.0/PKG-INFO +0 -27
- saverapi_client-1.0.0/README.md +0 -18
- saverapi_client-1.0.0/pyproject.toml +0 -14
- saverapi_client-1.0.0/saverapi/__init__.py +0 -3
- saverapi_client-1.0.0/saverapi/client.py +0 -32
- saverapi_client-1.0.0/saverapi_client.egg-info/PKG-INFO +0 -27
- {saverapi_client-1.0.0 → saverapi_client-1.0.2}/saverapi_client.egg-info/dependency_links.txt +0 -0
- {saverapi_client-1.0.0 → saverapi_client-1.0.2}/saverapi_client.egg-info/requires.txt +0 -0
- {saverapi_client-1.0.0 → saverapi_client-1.0.2}/saverapi_client.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: saverapi-client
|
|
3
|
+
Version: 1.0.2
|
|
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/docs
|
|
8
|
+
Project-URL: Repository, https://saverapi.net
|
|
9
|
+
Project-URL: Bug Tracker, https://saverapi.net
|
|
10
|
+
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
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
23
|
+
Classifier: Topic :: Multimedia :: Video
|
|
24
|
+
Classifier: Topic :: Multimedia :: Sound/Audio
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
|
+
Requires-Python: >=3.7
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
Requires-Dist: requests
|
|
29
|
+
|
|
30
|
+
<div align="center">
|
|
31
|
+
|
|
32
|
+
# 🚀 SaverAPI Client
|
|
33
|
+
|
|
34
|
+
### Official Python SDK for **[SaverAPI.NET](https://saverapi.net)**
|
|
35
|
+
|
|
36
|
+
**One library — every platform.**
|
|
37
|
+
Download media from 13+ social networks, recognize tracks with Shazam, search music, fetch global charts, and scan content for NSFW.
|
|
38
|
+
|
|
39
|
+
[](https://pypi.org/project/saverapi-client/)
|
|
40
|
+
[](https://pypi.org/project/saverapi-client/)
|
|
41
|
+
[](https://pypi.org/project/saverapi-client/)
|
|
42
|
+
[](#-license)
|
|
43
|
+
[](https://saverapi.net)
|
|
44
|
+
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 📦 Installation
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install -U saverapi-client
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Get your free API key at **[saverapi.net](https://saverapi.net)**.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## ⚡ Initialize the client (once)
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from saverapi import SaverAPI
|
|
63
|
+
|
|
64
|
+
api = SaverAPI(api_key="YOUR_API_KEY")
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
> All examples below use this single `api` instance.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🧭 API map
|
|
72
|
+
|
|
73
|
+
| # | Method | Endpoint |
|
|
74
|
+
|:-:|---|---|
|
|
75
|
+
| 1 | `api.nsfw_scan(url)` | `/nsfw-scanner-api` |
|
|
76
|
+
| 2 | `api.shazam_recognize(url)` | `/shazam-recognize` |
|
|
77
|
+
| 3 | `api.youtube_info(url)` | `/youtube-info-v2` |
|
|
78
|
+
| 4 | `api.shazam_top(country)` | `/shazam-music-top` |
|
|
79
|
+
| 5 | `api.music_search(query, limit)` | `/music-search` |
|
|
80
|
+
| 6 | `api.youtube(url, format)` | `/youtube-api` |
|
|
81
|
+
| 7 | `api.download(url)` | `/all-in-one-downloader-api` |
|
|
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
|
+
## 🔁 Run them all in sequence
|
|
320
|
+
|
|
321
|
+
```python
|
|
322
|
+
from saverapi import SaverAPI, SaverAPIError
|
|
323
|
+
|
|
324
|
+
api = SaverAPI(api_key="YOUR_API_KEY")
|
|
325
|
+
|
|
326
|
+
calls = [
|
|
327
|
+
("NSFW", lambda: api.nsfw_scan("https://example.com/video.mp4")),
|
|
328
|
+
("Shazam", lambda: api.shazam_recognize("https://example.com/audio.mp3")),
|
|
329
|
+
("YT info", lambda: api.youtube_info("https://youtu.be/bICMVAhktBE")),
|
|
330
|
+
("Top chart", lambda: api.shazam_top("us")),
|
|
331
|
+
("Search", lambda: api.music_search("Hello!", limit=10)),
|
|
332
|
+
("YT dl", lambda: api.youtube("https://youtu.be/OORSiK8ScTI", format="720")),
|
|
333
|
+
("All-in-one", lambda: api.download("https://www.instagram.com/reel/DPOi9V-CAqH/")),
|
|
334
|
+
]
|
|
335
|
+
|
|
336
|
+
for name, fn in calls:
|
|
337
|
+
try:
|
|
338
|
+
print(f"✅ {name}:", fn())
|
|
339
|
+
except SaverAPIError as e:
|
|
340
|
+
print(f"❌ {name}: [{e.status_code}] {e.message}")
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## 🛡️ Error handling
|
|
346
|
+
|
|
347
|
+
```python
|
|
348
|
+
from saverapi import SaverAPI, SaverAPIError
|
|
349
|
+
|
|
350
|
+
api = SaverAPI(api_key="YOUR_API_KEY")
|
|
351
|
+
|
|
352
|
+
try:
|
|
353
|
+
api.download("https://broken-link/")
|
|
354
|
+
except SaverAPIError as e:
|
|
355
|
+
print(e.status_code, e.message, e.payload)
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## 🧰 Advanced usage
|
|
361
|
+
|
|
362
|
+
```python
|
|
363
|
+
import requests
|
|
364
|
+
from saverapi import SaverAPI
|
|
365
|
+
|
|
366
|
+
session = requests.Session()
|
|
367
|
+
session.proxies = {"https": "http://127.0.0.1:8080"}
|
|
368
|
+
|
|
369
|
+
api = SaverAPI(
|
|
370
|
+
api_key="YOUR_API_KEY",
|
|
371
|
+
timeout=60,
|
|
372
|
+
session=session, # bring your own session
|
|
373
|
+
base_url="https://saverapi.net/api" # custom base URL if needed
|
|
374
|
+
)
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## 📞 Support
|
|
380
|
+
|
|
381
|
+
- 🌍 Website — <https://saverapi.net>
|
|
382
|
+
- 📧 Email — saverapinet@gmail.com
|
|
383
|
+
- 💬 Telegram — [@BizBotSupport](https://t.me/BizBotSupport)
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## 📝 License
|
|
388
|
+
|
|
389
|
+
MIT © [SaverAPI.NET](https://saverapi.net)
|