The most basic example (for a dashboard for which there is no authentication required) is just to do:
It’ll cap you at a thousand dashboards, but other than that the result is a list of dashboards with their associated folders.
If you need authentication as well I’d recommend creating API keys from Configuration > API keys
curl -H "Authorization: Bearer <paste key here>" https://play.grafana.com/api/search
but you can also either use basic auth (like in Arve’s comment ) or even a regular cookie-based session (most browsers [at least Firefox, Chrome, and Safari] have a “Copy as cURL” in their development tools, you can start with that and then remove different elements).