In the Python API client, you can use the export_to_csv and export_to_json methods to export data to a CSV or JSON file.
For example:
from coinmetrics.api_client import CoinMetricsClientclient =CoinMetricsClient()client.get_asset_metrics(assets=["btc","eth"],metrics=["PriceUSD"],start_time="2024-01-01",end_time="2024-01-31").export_to_csv("sample_data.csv")client.get_asset_metrics(assets=["btc","eth"],metrics=["PriceUSD"],start_time="2024-01-01",end_time="2024-01-31").export_to_json("sample_data.json")
As of version 2025.9.17.17, exporting to JSON files using the Python API Client is as fast using a curl command. See these release notes for more on benchmarking.
Exporting data can be sped up significantly by splitting the API calls to parallel threads.
Note that the download speed is evenly divided between all active connections of a single api key. 10 parallel connections are allowed. Excessing connections will be queued (no data transfer will happen).