تردز دانلودر
با استفاده از این وب سرویس میتوانید ویدیو و عکس پست ها و کاروسل های تردز را با بالاترین کیفیت دانلود کنید.
مشخصات
| مشخصه | مقدار |
|---|---|
| دستهبندی | دانلودر |
| وضعیت | فعال |
| نسخه API | apis-2 |
| فرمت پاسخ | JSON |
| آدرس پایه | https://open.nestapi.ir |
| مسیر | /apis-2/threads-downloader |
| لینک کامل | https://open.nestapi.ir/apis-2/threads-downloader |
متدهای HTTP
| متد | مسیر | نوع ورودی |
|---|---|---|
GET | /apis-2/threads-downloader | Query String |
پارامترها
پارامترهای Query String
| نام | نوع | الزامی | پیشفرض | توضیحات |
|---|---|---|---|---|
url | string | بله | — | لینک پست تردز |
نمونه درخواست
لینک مستقیم
GET https://open.nestapi.ir/apis-2/threads-downloader?url=https://www.threads.com/@gomees.vinicius/post/DfcAKcSEtdt
نمونه کد
- cURL
- PHP
- Python
- JavaScript
curl -X GET "https://open.nestapi.ir/apis-2/threads-downloader?url=https://www.threads.com/@gomees.vinicius/post/DfcAKcSEtdt"
<?php
// composer require nestapi/nestapi
require 'vendor/autoload.php';
use NestApi\NestApi;
use NestApi\Exception\ApiException;
use NestApi\Exception\TransportException;
$api = new NestApi(version: 2);
try {
$response = $api->threadsDownloader(
url: 'https://www.threads.com/@gomees.vinicius/post/DfcAKcSEtdt',
);
print_r($response->data);
} catch (ApiException $e) {
// Error reported by the API (validation, not found, rate limit, ...)
echo $e->getMessage();
} catch (TransportException $e) {
// Network error or unusable response; not a subclass of ApiException
echo 'Network error: ' . $e->getMessage();
}
# pip install nestapi-py
from nestapi import ApiError, NestApi, TransportError
with NestApi(version=2) as api:
try:
response = api.threads_downloader(
url="https://www.threads.com/@gomees.vinicius/post/DfcAKcSEtdt",
)
print(response.data)
except ApiError as e:
# Error reported by the API (validation, not found, rate limit, ...)
print(e.error_code, e)
except TransportError as e:
# Network error or unusable response; not a subclass of ApiError
print("Network error:", e)
// npm install @devh3n/nestapi
import { ApiError, NestApi, TransportError } from "@devh3n/nestapi";
const api = new NestApi({ version: 2 });
try {
const response = await api.threadsDownloader({
url: "https://www.threads.com/@gomees.vinicius/post/DfcAKcSEtdt",
});
console.log(response.data);
} catch (error) {
if (error instanceof ApiError) {
// Error reported by the API (validation, not found, rate limit, ...)
console.error(error.errorCode, error.message);
} else if (error instanceof TransportError) {
// Network error or unusable response; not a subclass of ApiError
console.error("Network error:", error.message);
}
}
کدهای خطا
| کد | وضعیت | علت |
|---|---|---|
NOT_FOUND | 404 | مسیر وجود ندارد، یا متد روی آن ثبت نشده |
PARAM_NOT_FOUND | 400 | پارامتر url ارسال نشده |
VALIDATION_ERROR | 422 | طول url از حد مجاز بیشتر است |
INVALID_URL | 400 | آدرس ارسالی معتبر نیست یا لینک پست تردز نیست (مثلا لینک پروفایل) |
MEDIA_NOT_FOUND | 404 | ویدیو یا عکسی در این پست پیدا نشد، خصوصی است، حذف شده یا فقط متن است |
LOOKUP_TIMEOUT | 504 | مهلت دریافت اطلاعات پست به پایان رسید |
UPSTREAM_ERROR | 502 | دریافت اطلاعات پست در حال حاضر ممکن نیست، کمی بعد دوباره تلاش کنید |