You can export all your project’s documents in a dataset by requesting the following URL:
For example, if your project id is zp7mbokg and your dataset name is production, the export endpoint URL will be
curl https://<projectId>.api.sanity.io/v1/data/export/<dataset>/ > backup.ndjson
An unauthenticated request will only return publicly available documents. If you include an authentication token, it will include documents that this token has access to (for example: drafts and system documents).