Skip to main content
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    jobId := "job_xyz789"
    url := fmt.Sprintf("https://ytrss.xyz/api/v1/poll/job/%s", jobId)

    resp, err := http.Get(url)
    if err != nil {{
        panic(err)
    }}
    defer resp.Body.Close()

    var result map[string]interface{{}}
    json.NewDecoder(resp.Body).Decode(&result)

    fmt.Printf("Job ID: %s\n", result["id"])
    fmt.Printf("Status: %s\n", result["status"])

    if result["status"] == "SUCCESS" {
        metadata := result["video_metadata"].(map[string]interface{})
        fmt.Printf("Title: %s\n", metadata["title"])
        fmt.Printf("Duration: %v seconds\n", metadata["duration"])
        fmt.Printf("Download: %s\n", result["download_endpoint"])
    }
}
{
    "id": "job_xyz789",
    "url": "https://youtube.com/watch?v=dQw4w9WgXcQ",
    "status": "SUCCESS",
    "download_endpoint": "/api/v1/download/job_xyz789",
    "video_metadata": {
        "title": "Rick Astley - Never Gonna Give You Up",
        "description": "The official video for Rick Astley's 1987 hit...",
        "duration": 213,
        "video_id": "dQw4w9WgXcQ",
        "size": 5242880
    },
    "title": "Rick Astley - Never Gonna Give You Up",
}

Overview

Retrieve the current status and details of a specific conversion job. Use this endpoint to monitor job progress.

Path Parameters

jobId
string
required
The unique identifier of the job to retrieve

Response

The response structure varies depending on the job status:

Completed Job Response

id
string
Unique identifier for the job
url
string
The YouTube URL being converted
status
string
SUCCESS
download_endpoint
string
Endpoint to download the converted file (only present when status is SUCCESS)
video_metadata
object
Video metadata (only present when status is SUCCESS)
title
string
Video title

In Progress Job Response

For jobs that are still processing, the response will only include:
id
string
Unique identifier for the job
url
string
The YouTube URL being converted
status
string
Current job status (e.g., CREATED, STARTED, ERROR)
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    jobId := "job_xyz789"
    url := fmt.Sprintf("https://ytrss.xyz/api/v1/poll/job/%s", jobId)

    resp, err := http.Get(url)
    if err != nil {{
        panic(err)
    }}
    defer resp.Body.Close()

    var result map[string]interface{{}}
    json.NewDecoder(resp.Body).Decode(&result)

    fmt.Printf("Job ID: %s\n", result["id"])
    fmt.Printf("Status: %s\n", result["status"])

    if result["status"] == "SUCCESS" {
        metadata := result["video_metadata"].(map[string]interface{})
        fmt.Printf("Title: %s\n", metadata["title"])
        fmt.Printf("Duration: %v seconds\n", metadata["duration"])
        fmt.Printf("Download: %s\n", result["download_endpoint"])
    }
}
{
    "id": "job_xyz789",
    "url": "https://youtube.com/watch?v=dQw4w9WgXcQ",
    "status": "SUCCESS",
    "download_endpoint": "/api/v1/download/job_xyz789",
    "video_metadata": {
        "title": "Rick Astley - Never Gonna Give You Up",
        "description": "The official video for Rick Astley's 1987 hit...",
        "duration": 213,
        "video_id": "dQw4w9WgXcQ",
        "size": 5242880
    },
    "title": "Rick Astley - Never Gonna Give You Up",
}

Job Statuses

StatusDescription
CREATEDJob has been created and is waiting to be queued
STARTEDJob has started processing
SUCCESSJob has completed successfully and file is ready for download
ERRORJob failed due to an error