https://ytsave.appBuild downloads with YTSave
Resolve a public media URL, select an exact format, create an asynchronous job and hand the signed result to your user. The same bounded production pipeline powers the YTSave website.
البداية السريعة
YTSave handles API host by first identifying support-activated credentials. It follows with an assigned tenant endpoint and keeps a server-only call path in view.
X-API-Key: ys_live_…YTSaveClientv1# Available only after support activation
export YTSAVE_API_KEY="issued-after-review"
curl -X POST https://ytsave.app/v1/resolve \
-H "X-API-Key: $YTSAVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID"}'To explain Credential safety, YTSave separates server-side secret storage from no client bundle embedding. An evidence record gives no public logs or repositories its own place.
حل رابط
YTSave handles Resolve operation by first identifying source detection. It follows with formats from one submitted URL and keeps no invented outputs in view.
/v1/resolveالنطاق: حل| الميدان | نوع المشروع | المطلوب | وصف المشروع |
|---|---|---|---|
url | عنوان URL HTTPS | نعم | صفحة وسائل الإعلام العامة أو المأذون بها لتحليل. |
tenant | سلسلة | لا | نطاق المستأجر المخصص.عادة ما يتم حذفه. |
{
"success": true,
"platform": "youtube",
"title": "Example video",
"formats": [
{"id":"18","type":"video","quality":"360p","container":"mp4"}
],
"cached": false
}To explain Format identifier, YTSave separates the returned value unchanged from per-link availability. An evidence record gives no guessed quality label its own place.
إنشاء ومتابعة عمل التنزيل
For Job creation, YTSave begins with asynchronous preparation. Its evidence record pairs that with a short HTTP request and ends with bounded worker execution.
/v1/jobsالنطاق: الوظائف| الميدان | نوع المشروع | المطلوب | وصف المشروع |
|---|---|---|---|
url | عنوان URL HTTPS | نعم | نفس المصدر المُطّبيع المقدم لحلّ. |
format_id | سلسلة | نعم | معرف دقيق من استجابة الحل. |
tenant | سلسلة | لا | نطاق المستأجر المخصص.عادة ما يتم حذفه. |
curl -X POST https://ytsave.app/v1/jobs \
-H "X-API-Key: $YTSAVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID","format_id":"18"}'job_id.GET /v1/jobs/{job_id} with the same key.| ألف - الحالة | المعنى | إجراءات العملاء |
|---|---|---|
queued | تم القبول في الطابور المحدود. | استطلاع رأي مرة أخرى مع التراجع. |
extracting | تحديث البيانات الوصفية المصدر أو الطريق. | واصلوا التصويت. |
processing | التنزيل أو إعادة المزج أو الدمج. | عرض تقدم الخادم. |
ready | تحميل موقع متاح. | أرسل عنوان URL إلى المستخدم. |
failed | خطأ مهيكلة المحطة الطرفية. | Read error_code. Retry only when advised. |
expired | أزيل الناتج المؤقت. | إنشاء وظيفة جديدة. |
curl https://ytsave.app/v1/jobs/JOB_ID \
-H "X-API-Key: $YTSAVE_API_KEY"YTSave makes Job polling easy to scan. The page starts with one-second initial wait, moves to capped backoff, and clearly states temporary signed delivery.
الأخطاء المتوقعة
For Error contract, YTSave checks one non-2xx envelope before a support request ID. This evidence record also makes predictable client handling clear.
{
"success": false,
"error": {
"code": "RATE_LIMITED",
"category": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"retryable": true,
"details": {"retry_after_seconds": 20}
},
"request_id": "…"
}| بروتوكول نقل الملفات السريع | المعنى النموذجي | الإجراء |
|---|---|---|
| 400 | عنوان URL غير صحيح أو جسم أو تنسيق غير متاح. | تصحيح الطلب.حل مرة أخرى للأشكال. |
| 401 | مفتاح مفقود أو غير صالح أو منتهية الصلاحية أو ذات نطاق خاطئ. | تحقق من وثائق الاعتماد على جانب الخادم. |
| 403 | رفضت سياسة المستأجر أو المصدر الطلب. | لا تتجاوز السياسة اتصل بالدعم. |
| 404 | وظيفة غير معروفة أو منتهية الصلاحية. | قم بإنشاء وظيفة جديدة إذا كان ذلك مناسبًا. |
| 429 | طلب أو حد الوظائف النشطة تم الوصول إليه. | Honor retry_after_seconds. |
| 503 | الطابور / السعة أو أعلى المسار غير متاح مؤقتًا. | حاول مرة أخرى مع التراجع الأسي والتذبذب. |
عقد التشغيل
YTSave issues an operational quota with each approval to safeguard the API consumer and upstream media services.
- استخدم منطق التطبيق idempotent ولا تبدأ أبدًا وظائف مكررة لنفس نقرة المستخدم.
- تقوم ذاكرة التخزين المؤقت بحل البيانات الوصفية باختصار ، ولكنها تعامل دائمًا عناوين URL الموقّعة للتنزيل على أنها تنتهي صلاحيتها.
- Use bounded exponential backoff with jitter for
429,503and retryable errors. - لا تعالج سوى الوسائط العامة أو الوسائط التي تم الإذن لك بالوصول إليها. لا يتم تجاوز DRM وضوابط الوصول.
- احتفظ بأرقام تعريف الطلبات وأرقام تعريف الوظائف في سجلات التشغيل الخاصة.لا تسجل عناوين URL المقدمة دون داع.
YTSave handles Schema access by first identifying activation before exploration. It follows with assigned authentication and keeps documented request shapes in view. مرجع OpenAPI
Request your API key
Document the API consumer, its monthly request estimate and supported platform requirements. YTSave reviews whether resolve, job submission or both are justified before issuing a once-visible key.
Request API access المفاتيح هي مستأجر نطاق، قابل للإلغاء وإصدارها من خلال نموذج الاتصال لا يمكن للنصوص المجهولة تنفيذ عمل المُحمّل.