Skip to main content
GET
https://api.tornadoapi.io
/
batch
/
{id}
Get Batch Status
curl --request GET \
  --url https://api.tornadoapi.io/batch/{id} \
  --header 'x-api-key: <x-api-key>'
{
  "id": "550e8400-e29b-41d4-a716-446655440001",
  "show_url": "https://open.spotify.com/show/7iQXmUT7XGuZSzAMjoNWlX",
  "status": "completed",
  "folder": "huberman-lab-2024",
  "total_episodes": 142,
  "completed_episodes": 142,
  "failed_episodes": 0,
  "episode_jobs": ["uuid-1", "uuid-2", "uuid-3"]
}

Overview

Retrieves the current status and progress of a batch download operation.

Header Parameters

x-api-key
string
required
Your API key for authentication

Path Parameters

id
string
required
The batch UUID returned from POST /jobs when submitting a Spotify show URL

Response

id
string
Batch UUID
show_url
string
Original Spotify show URL
status
string
Batch status: processing, completed, or finished
folder
string
S3 folder prefix for episodes
total_episodes
integer
Total number of episodes in the show
completed_episodes
integer
Number of successfully completed episodes
failed_episodes
integer
Number of failed episodes
episode_jobs
array
List of individual job UUIDs for each episode

Example

curl -X GET "https://api.tornadoapi.io/batch/550e8400-e29b-41d4-a716-446655440001" \
  -H "x-api-key: sk_your_api_key"

Status Values

StatusMeaning
processingBatch is in progress, episodes are being downloaded
completedAll episodes finished successfully (0 failures)
finishedAll episodes done, but some failed

Progress Calculation

Progress = (completed_episodes + failed_episodes) / total_episodes * 100
A batch is finished when:
completed_episodes + failed_episodes >= total_episodes

Polling Example

import requests
import time

def wait_for_batch(batch_id, api_key):
    while True:
        response = requests.get(
            f"https://api.tornadoapi.io/batch/{batch_id}",
            headers={"x-api-key": api_key}
        )
        data = response.json()

        completed = data["completed_episodes"]
        failed = data["failed_episodes"]
        total = data["total_episodes"]

        print(f"Progress: {completed + failed}/{total} ({failed} failed)")

        if data["status"] in ["completed", "finished"]:
            return data

        time.sleep(10)

# Usage
result = wait_for_batch("batch-uuid", "sk_your_api_key")
print(f"Final status: {result['status']}")

Success Response

{
  "id": "550e8400-e29b-41d4-a716-446655440001",
  "show_url": "https://open.spotify.com/show/7iQXmUT7XGuZSzAMjoNWlX",
  "status": "completed",
  "folder": "huberman-lab-2024",
  "total_episodes": 142,
  "completed_episodes": 142,
  "failed_episodes": 0,
  "episode_jobs": ["uuid-1", "uuid-2", "uuid-3"]
}

Error Responses

null

Checking Individual Episodes

To see details about failed episodes, query individual job IDs:
curl -X GET "https://api.tornadoapi.io/jobs/{episode_job_id}" \
  -H "x-api-key: sk_your_api_key"