Skip to main content

Bulk Import Status

GET/api/v1/media/videos/bulk-import/{job_id}

Get the current status of a bulk video import job, including progress percentage and per-video results when complete.

Path Parameters

job_idstringrequired

Job ID returned from the bulk import request

Response

job_idstring

The job ID

statusstring

Job status: queued, processing, completed, or failed

totalinteger

Total number of videos in the job

completedinteger

Number of videos successfully imported

failedinteger

Number of videos that failed to import

progress_percentnumber

Progress percentage (0-100)

resultsarray

Per-video results (only included when job is complete). Each result contains:

  • url: Original video URL
  • success: Whether import succeeded
  • video_id: PeerTube video ID (if successful)
  • error: Error message (if failed)

Example

curl "https://spideriq.ai/api/v1/media/videos/bulk-import/bulk_1234567890" \
-H "Authorization: Bearer cli_abc123:sk_xxx:secret_xxx"

Response Example

{
"job_id": "bulk_1234567890",
"status": "processing",
"total": 10,
"completed": 3,
"failed": 0,
"progress_percent": 30.0,
"results": null
}
{
"job_id": "bulk_1234567890",
"status": "completed",
"total": 10,
"completed": 9,
"failed": 1,
"progress_percent": 100.0,
"results": [
{"url": "https://youtube.com/watch?v=abc", "success": true, "video_id": 123},
{"url": "https://youtube.com/watch?v=def", "success": true, "video_id": 124},
{"url": "https://youtube.com/watch?v=ghi", "success": false, "error": "Video unavailable"}
]
}
note

Polling Recommendation: Check status every 30-60 seconds. More frequent polling provides no benefit as videos take time to download and process.

tip

Webhook Support: For production workflows, consider implementing a webhook endpoint to receive notifications when the job completes, rather than polling.