cURL Cheat Sheet/Append query parameters with --get

Build a GET query string from data parameters.

Section: Request Shaping

Append query parameters with --get

bash
bash
curl --get --data-urlencode 'q=curl examples' https://example.com/search
Explanation

`--get` converts `-d` data into query string parameters.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Request Shaping
Send query parameters in URL
Pass query parameters directly in the URL.
OpenIn sheetbashsame section
POST with no body
Send a POST request with an empty body.
OpenIn sheetbashsame section
Use a custom HTTP method
Send a method such as PUT, PATCH, DELETE, or PURGE.
OpenIn sheetbashsame section
Send a request header
Add a custom request header.
OpenIn sheetbashsame section
Set the User-Agent header
Override the default curl User-Agent.
OpenIn sheetbashsame section
Set the Referer header
Send a custom Referer header.
OpenIn sheetbashsame section