API Reference

Video Download API

The Video Download API allows you to download videos from platforms like YouTube, extract audio, and retrieve metadata. This is an asynchronous API: you initiate a job and then poll for the result.

x-api-key:stringrequired

This parameter specifies the private key you'll need for Hunt access.

Endpoint: GET /api/v1/video/download

query:stringrequired

The URL of the video to download (e.g., YouTube URL).

video_quality:stringopt

Desired video quality. Options: best, 1080p, 720p, 480p, 360p. Note: Videos longer than 1 hour are limited to 720p.

default:best
download_type:stringopt

Content type to download:

  • audio_video: Video with audio (default)
  • audio: Audio track only
  • video: Video track only
default:audio_video
video_format:stringopt

Preferred output format: mp4, webm, mkv. (Best effort basis)

default:mp4
max_duration:numberopt

Maximum duration in seconds. Content exceeding this is trimmed.

webhook_url:stringopt

URL to receive a POST callback when the job finishes.

webhook_authorization:stringopt

Authorization header for the webhook request.

Response

{
    "job_id": "0193443f-fb80-9d19-29ba-82bc77c7cd84"
}

Endpoint: GET /api/v1/jobs/{job_id}

Check the status of your job using the job_id returned from Step 1.

Response Example (Completed)

{
    "id": "0193305e-e144-a995-3acc-6703bb48e13a",
    "status": "CompletedJob",
    "success": true,
    "created_at": "2024-11-15T15:09:04.709497Z",
    "duration_ms": 99592,
    "args": {
        "query": "https://yt.com/watch?v=..."
    },
    "result": {
        "metadata": {
            "title": "The New Claude 3.5 Sonnet",
            "view_count": 82398,
            "upload_date": 1729641600
        },
        "response": "https://s3.huntapi.com/videos/32f88fc4-e728-4c45-b27c-6ee539575595.webm"
    }
}

VIDEO API

Discover why Hunt is the preferred API provider for developers.