HuntAPI

Video Download

Download a video from a URL via HuntAPI and receive a job id.

Credit cost: 1 credit per request

Async: This endpoint runs asynchronously. Use the jobs endpoint to poll for results.

POST
/v1/video/download

Authorization

ApiKeyAuth
x-api-key<token>

Your API key. Include it in the x-api-key header for every request.

In: header

Query Parameters

query*string

Video URL to download.

Notes: Some videos cannot be downloaded for the following reasons:

  • Private videos: If the video is set as private by its owner

  • Unavailable videos: If the video has been deleted or is no longer accessible

  • Age restricted videos: If the video is age restricted. In these cases, the API will return an explanatory error message.

download_type?string

Desired download type. You have three options:

  • audio_video: Downloads the complete video with audio (default option)

  • audio: Downloads only the audio track of the video (useful for extracting music or podcasts)

  • video: Downloads only the video part, without sound (ideal for visual content only)

Default"audio_video"
max_duration?number

Maximum duration of the downloaded content in seconds.
If the video/audio is longer than this value, only the content up to this duration will be downloaded.

video_quality?string

Desired video quality. Available options:

  • best: Best available quality (default)

  • 1080p: Full HD quality (1920x1080)

  • 720p: HD quality (1280x720)

  • 480p: SD quality (854x480)

  • 360p: Low quality (640x360)

Note: If the video is longer than 1 hour, we automatically lower it to 720p.

Default"best"
video_format?string

Desired output format for the video. Available options:

  • mp4: MP4 format (default option)

  • webm: WebM format

  • mkv: Matroska Video format

Note: This is a format preference. While we will do our best to provide the requested format, due to technical limitations or conversion issues, the final output format may differ from the requested one. In such cases, the video will be provided in the most compatible format available.

Default"mp4"
webhook_url?string

URL of the webhook where results will be sent. When specified, the system will attempt to send the response to this URL up to 3 times with a 5-second delay between each attempt. The results will be sent as a POST request.

The payload will be sent in JSON format with one of the following structures:

On success:

    {
        "id": "string", // the job id,
        "status": "CompletedJob", // the job status,
        "result": {
            "metadata": {
                // filtered metadata object
            },
            "response": "https://s3.huntapi.com/videos/video_id.mp4"
        }
    }

On error:

    {
        "id": "string", // the job id,
        "status": "Error", // the job status,
        "error": "string" // the error message (private, unavailable, age restricted, etc.)
    }
webhook_authorization?string

Authorization header for the webhook. This parameter allows you to add authentication to your webhook endpoint.

This value will be included in the Authorization header when making the webhook request to your server.

Example: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.huntapi.com/v1/video/download?query=string"
{
  "job_id": "0193443f-fb80-9d19-29ba-82bc77c7cd84"
}
{
  "error": "Bad Request"
}
{
  "error": "Invalid API Key"
}
{
  "error": "Payment required"
}
{
  "error": "Rate limit exceeded for the API key: quota monthly"
}
{
  "error": "Internal Error"
}