Over 60 million real residential IPs from genuine users across 190+ countries.
Over 60 million real residential IPs from genuine users across 190+ countries.
Your First Plan is on Us!
Get 100% of your first residential proxy purchase back as wallet balance, up to $900.
PROXY SOLUTIONS
Over 60 million real residential IPs from genuine users across 190+ countries.
Reliable mobile data extraction, powered by real 4G/5G mobile IPs.
Guaranteed bandwidth — for reliable, large-scale data transfer.
For time-sensitive tasks, utilize residential IPs with unlimited bandwidth.
Fast and cost-efficient IPs optimized for large-scale scraping.
A powerful web data infrastructure built to power AI models, applications, and agents.
High-speed, low-latency proxies for uninterrupted video data scraping.
Extract video and metadata at scale, seamlessly integrate with cloud platforms and OSS.
6B original videos from 700M unique channels - built for LLM and multimodal model training.
Get accurate and in real-time results sourced from Google, Bing, and more.
Execute scripts in stealth browsers with full rendering and automation
No blocks, no CAPTCHAs—unlock websites seamlessly at scale.
Get instant access to ready-to-use datasets from popular domains.
PROXY PRICING
Full details on all features, parameters, and integrations, with code samples in every major language.
LEARNING HUB
ALL LOCATIONS Proxy Locations
TOOLS
RESELLER
Get up to 50%
Contact sales:partner@thordata.com
Proxies $/GB
Over 60 million real residential IPs from genuine users across 190+ countries.
Reliable mobile data extraction, powered by real 4G/5G mobile IPs.
For time-sensitive tasks, utilize residential IPs with unlimited bandwidth.
Fast and cost-efficient IPs optimized for large-scale scraping.
Guaranteed bandwidth — for reliable, large-scale data transfer.
Scrapers $/GB
Fetch real-time data from 100+ websites,No development or maintenance required.
Get real-time results from search engines. Only pay for successful responses.
Execute scripts in stealth browsers with full rendering and automation.
Bid farewell to CAPTCHAs and anti-scraping, scrape public sites effortlessly.
Dataset Marketplace Pre-collected data from 100+ domains.
Data for AI $/GB
A powerful web data infrastructure built to power AI models, applications, and agents.
High-speed, low-latency proxies for uninterrupted video data scraping.
Extract video and metadata at scale, seamlessly integrate with cloud platforms and OSS.
6B original videos from 700M unique channels - built for LLM and multimodal model training.
Pricing $0/GB
Starts from
Starts from
Starts from
Starts from
Starts from
Starts from
Starts from
Starts from
Docs $/GB
Full details on all features, parameters, and integrations, with code samples in every major language.
Resource $/GB
EN
首单免费!
首次购买住宅代理可获得100%返现至钱包余额,最高$900。
代理 $/GB
数据采集 $/GB
AI数据 $/GB
定价 $0/GB
产品文档
资源 $/GB
简体中文$/GB
Blog
Tutorials
cURL is a powerful, open-source command-line tool that allows you to transfer data. In this comprehensive guide, we ‘ll tell you the process of using cURL to download files, covering everything from basic downloads to more advanced operations. By mastering these techniques, you’ll enhance your ability to handle file downloads in an automated and reliable manner.
cURL (short for “Client URL”) is an open-source command-line tool and library for transferring data via URLs. It supports multiple protocols, including:
– HTTP and HTTPS
– FTP and FTPS
– SFTP (when compiled with the appropriate library)
– SCP, SMTP, POP3, IMAP, and more
As a free open-source tool, cURL can fetch and transfer web data and is often used for web debugging. It offers the advantages of being free and easy to use.
cURL is very powerful, and mastering the cURL command line can help software developers with their daily tasks.
Using the original filename
curl -O https://example.com/file.zip
For example, let’s demonstrate how to use the cURL command to download a file from the example website:
The -O (uppercase) option instructs cURL to save the file with the same name as the URL.
Managing Filenames with cURL
If you want to save the file with a custom filename, use the -o (lowercase) option.
curl -o newfile.zip https://thordata.com/file.zip
Handling Redirects
When using cURL to access an HTTP website and encountering status codes 301, 302, or 303, by default cURL will not follow the redirect page information. You will need to use a command to request the URL again.
For detailed status code explanations: MDN Web Docs
|
Status Code |
Meaning |
Common Use Case |
|
301 |
Moved Permanently |
URL changed, SEO redirect |
|
302 |
Found (Temporary Redirect) |
Temporary redirect (e.g., page maintenance) |
|
303 |
See Other |
Form submission redirect to prevent resubmission |
Check Response Headers (including status codes)
curl -I https://example.com
View the full response
This shows detailed request and response information, including the status code and the target URL for redirection.
curl -v https://example.com
Using the -L option to handle redirects
curl -L https://example.com
Automatically handling redirects and downloading the file
You can combine the -L option and the -O (save file) option, so that when a file is redirected, cURL will automatically download the file.
The -O option saves the downloaded file with its original filename.
curl -L -O https://example.com/file.zip
Rate Limiting
url --limit-rate 100k -O https://example.com/file.zip
The –limit-rate 100k option limits the download speed to 100KB/s.
Silent Download
A silent download typically refers to downloading a file without displaying any output such as progress bars, error messages, or other log data. It’s commonly used for automation scripts, background tasks, or when you don’t want to disrupt the user.
curl -s -O https://example.com/file.zip
The -s or –silent flag enables silent mode, meaning no progress bars, error messages, etc., will be shown.
The -O option saves the file with the same name as the URL.
Authentication
Basic authentication is the most common HTTP authentication method, which typically requires a username and password. The server verifies these credentials to confirm the request’s legitimacy.
curl -u username:password -O https://example.com/protectedfile.zip
The -u username: password option is used to provide the username and password.
The -O option saves the file with the same name as the URL.
At Thordata, we work with proxies every day, and cURL is one of our go-to tools for testing and using them. Many of our customers route traffic through proxies for security, logging, or geo-routing, and cURL integrates cleanly with both HTTP and SOCKS proxies, including authenticated ones.
To send cURL traffic through a proxy, we use the `-x` (or `--proxy`) option:
curl -x http://proxy.example.com:8080 -L -O https://example.com/file.zip
For SOCKS proxies:
curl -x socks5://127.0.0.1:9050 -L -O https://example.com/file.zip
When a proxy requires authentication, we often test it like this:
curl -x http://username:password@thordata.net:8080 -L -O https://example.com/file.zip
In longer-term setups, we prefer environment variables such as HTTP_PROXY, HTTPS_PROXY, and NO_PROXY so we do not have to repeat proxy settings in every command. Whether we are using cURL with our residential or ISP proxies, we always remind customers to follow all applicable terms of service, network policies, and legal requirements.
When a file download is interrupted, you can use cURL to resume downloading.
curl -C - -O https://example.com/largefile.zip
The -C – option tells cURL to continue downloading the file from where it was interrupted, and the -O option saves the file with its original filename.
You can download multiple files by calling curl multiple times, or by placing multiple file URLs in a text file.
Method 1: Calling curl multiple times
curl -O https://thordata.com/file1.zip
curl -O https://thordata.com/file2.zip
Method 2: Place multiple file URLs in a text file and use xargs
echo -e "https://example.com/file1.zip\nhttps://thordata.com/file2.zip" | xargs -n 1 -P 2 curl -O
By default, cURL displays a progress bar showing the download progress. If you need more detailed progress information (such as download speed, size, etc.), you can use the –progress-bar flag:
curl --progress-bar -O https://example.com/file.zip
|
Command Example |
Purpose and Action |
|
-O |
Downloads the file and saves it with the URL’s original filename. |
|
-o |
Specifies a custom filename for the downloaded content. |
|
-I |
View the HTTP response headers. |
|
-v |
Display detailed request and response information. |
|
-L |
Handle redirects with the -L option. |
|
-s |
Enable silent mode (no output). |
|
-k |
Ignore SSL certificate verification (useful for self-signed certificates). |
|
-x |
Set the proxy server. |
|
–progress-bar |
Show the download progress bar. |
|
–limit-rate |
Limit download speed. |
For more cURL command-line options, check the manual: cURL Manual
Both cURL and wget can be used to download files, but they have some differences.
Functionality: cURL excels at handling various HTTP request types (e.g., GET, POST). Wget primarily focuses on downloading files from the internet.
Command Parameters: cURL requires the -o parameter to specify a file for downloading, whereas wget does not require parameters to download a file directly.
For simple one-off file downloads, both tools can be used. However, for complex data exchange tasks, cURL is usually recommended. For downloading large, static resources efficiently, wget may be a better choice.
Not Handling Redirects: Failing to handle HTTP redirects during file downloads can cause downloads to fail, especially if the target URL has changed. The best practice is to use -L to redirect cURL to the target site.
Not Using -O or -o to Specify Filenames: This can lead to cURL saving files with default names instead of custom ones.
Not Handling Failures or Errors: If the server returns a 404 error or other failures, cURL will continue attempting to access the error message. The correct approach is to use -f to stop the download when cURL encounters an error.
Not Considering Bandwidth Limitation for Large Files: For large file downloads, setting an appropriate bandwidth limit can prevent disruption to other network activities. Use the –limit-rate option to control download speed.
Using cURL to download files provides a powerful, scriptable, and cross-platform approach to retrieving data from the web and internal services. By understanding core options like `-o`, `-O`, `-L`, `-C -`, and `--retry`, technical users can handle everything from simple one-off downloads to complex, authenticated, and automated retrieval tasks.
Through this guide, you’ll learn how to manage filenames, handle redirects, perform authentication, limit download speed, and avoid common errors.
Frequently asked questions
Can I use cURL instead of wget?
Yes, you can use cURL instead of wget. Both tools can meet most users’ needs for downloading files. However, the execution commands differ, so be mindful of the syntax when switching between them.
How to download a CSV file with cURL?
Use the -o or -O command to set a specific filename when downloading. CSV files can be downloaded just like any other file; refer to the examples in this article for more details.
How to use wget to download a file?
The most common way to download a file with wget is to directly specify the file URL. wget https://example.com/file.csv
About the author
Yulia is a dynamic content manager with extensive experience in social media, project management, and SEO content marketing. She is passionate about exploring new trends in technology and cybersecurity, especially in data privacy and encryption. In her free time, she enjoys relaxing with yoga and trying new dishes.
The thordata Blog offers all its content in its original form and solely for informational intent. We do not offer any guarantees regarding the information found on the thordata Blog or any external sites that it may direct you to. It is essential that you seek legal counsel and thoroughly examine the specific terms of service of any website before engaging in any scraping endeavors, or obtain a scraping permit if required.
Looking for
Top-Tier Residential Proxies?
您在寻找顶级高质量的住宅代理吗?
Top 10 Anti-Detect Browsers for 2026: Best Tools for Multi-Account Management and Privacy
2025-12-22
Best Anti-detect Browser—BitBrowser for Multi-accounting
BitBrowser can be used in various cross-border business scenarios. Using BitBrowser, you can log in to more accounts without any association with each other.
Jenny
2025-12-22
What Is Private Proxy Wingate.me and Top Alternatives in 2025
Discover what private proxy Wingate.me is, its pros/cons, and top alternatives like Thordata in 2025. Includes case studies, comparisons, and tips for optimal anonymity and performance.
Jenny
2025-12-16