See github page for details of the API.
In order to download and install kaggle api, you must have pip installed. We only talk about how to install and use pip in windows (because in Linux it is really easy).
-
Open anaconda navigator -> Environments. Type "pip" in search box to check whether it is installed.
-
Install pip if it is not installed.
-
Launch qtconsole or spyder.
-
Use commands
!pip install kaggle
to install kaggle api. -
Go to https://www.kaggle.com/username/account and select 'Create API Token'. This will trgger the download of
kaggle.json
-
Save
kaggle.json
to folderC:\Users\<user-name>\.kaggle\
. The trick of creating.kaggle
in Windows is to write the folder name as.kaggle.
. (Do not forget the dot in the end).
-
Use command
!kaggle competitions download -c competition-name -p folder-name
to download all the files of a competition. -
Use command
!kaggle competitions submit -f file-name
to submit result.