I know how to download the result of one search query but is it possible to download results of more than 1 search queries at once? I was thinking pasting the urls separated by commas.


You can use xargs to do this. It takes arguments from standard input and adds them to a command. The commands can also be executed in parallel.

Here is an example:

echo -n "link1,link2" | xargs -d ',' -n 1 -P 10 youtube-dl

This would be roughly equivalent to:

youtube-dl link1 &
youtube-dl link2 &

Parameters used:

-d changes the delimiter for the arguments
-n sets the number of arguments to be used for each command
-P sets the maximum number of parallel processes


youtube-dl accepts multiple URL's as input, so yes you can download multiple videos with one command: youtube-dl url1 url2 url3.

However, if you have a lot of urls, consider putting them in a file, each URL on it's own line, and tell youtube-dl to load the URL's from that file: youtube-dl -a my_url_file.txt, or the more verbose version: youtube-dl --batch-file my_url_file.txt.

protected by andrew.46 Oct 1 '17 at 8:09

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.