# CDS API on Colab

**URL:** <https://forum.ecmwf.int/t/cds-api-on-colab/10849>\
**Category:** Software and Tools\
**Tags:** api, cds, era5\
**Created:** [15 January 2025 11:09 UTC](https://forum.ecmwf.int/t/cds-api-on-colab/10849 "2025-01-15T11:09:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fridah\_Nyakundi](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/f/e47774/32.png) [@Fridah\_Nyakundi](https://forum.ecmwf.int/u/Fridah_Nyakundi)\
**Post date:** [15 January 2025 11:09 UTC](https://forum.ecmwf.int/t/cds-api-on-colab/10849/1 "2025-01-15T11:09:12Z")

</div>

I have tried all morning to install CDS API to Google Colab. I am using colab because I want all the dataset to be on cloud (my pc is out of space). I have ran all the codes to install API and download the data. Has someone tried it? If yes could you please share how you went about it or your code? I am specifically trying to download wind data. Thank you

---

<div class="post-metadata">

**Author:** ![Matteo\_De\_Felice12](https://forum.ecmwf.int/user_avatar/forum.ecmwf.int/matteo_de_felice12/32/413_2.png) [@Matteo\_De\_Felice12](https://forum.ecmwf.int/u/Matteo_De_Felice12)\
**Post date:** [16 January 2025 07:55 UTC](https://forum.ecmwf.int/t/cds-api-on-colab/10849/2 "2025-01-16T07:55:26Z")

</div>

Yes, it is possible.  
I would suggest connecting Colab to Google Drive to have a permanent storage, in fact the files in Colab “disappear” once the virtual machine is closed.  
You can try writing the .cdsapirc using these lines:

url = ‘url: [https://cds.climate.copernicus.eu/api/v2](https://cds.climate.copernicus.eu/api/v2)’  
key = ‘YOUR\_KEY’

with open(‘/root/.cdsapirc’, ‘w’) as f:  
f.write(‘\n’.join([url, key]))

---

<div class="post-metadata">

**Author:** ![Cindy\_Dai](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/c/a3d4f5/32.png) [@Cindy\_Dai](https://forum.ecmwf.int/u/Cindy_Dai)\
**Post date:** [21 January 2025 15:09 UTC](https://forum.ecmwf.int/t/cds-api-on-colab/10849/3 "2025-01-21T15:09:17Z")

</div>

Hello, is this working for you ? from my side this url url: [https://cds.climate.copernicus.eu/api/v2](https://cds.climate.copernicus.eu/api/v2) is not working i have an 404 error

---

<div class="post-metadata">

**Author:** ![Matteo\_De\_Felice12](https://forum.ecmwf.int/user_avatar/forum.ecmwf.int/matteo_de_felice12/32/413_2.png) [@Matteo\_De\_Felice12](https://forum.ecmwf.int/u/Matteo_De_Felice12)\
**Post date:** [21 January 2025 15:37 UTC](https://forum.ecmwf.int/t/cds-api-on-colab/10849/4 "2025-01-21T15:37:11Z")

</div>

Yes, the string has changed, there is no “v2” anymore, look here:  
[Climate Data Store](https://cds.climate.copernicus.eu/how-to-api)
