Pass an API key in the URL.
Section: HTTP Auth and Security
API key in query string
bash
bash
curl 'https://api.example.com/data?api_key=YOUR_API_KEY'Explanation
Some APIs still accept query-string keys, though headers are often preferred.
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 HTTP Auth and Security
Mutual TLS with client cert
Authenticate using a client certificate and key.
Skip TLS certificate verification
Disable certificate verification for testing only.