kaggle
Download and submit Kaggle datasets/competitions
TLDR
View current configuration values
Download a specific file from a competition dataset
List competitions matching a search term
List files available for a specific competition
Submit a file to a competition with a message
List datasets matching a search term
Download all files from a dataset
List kernels (notebooks) matching a search term
SYNOPSIS
kaggle {api,clients,competitions,config,course,credentials,datasets,kernels,models,publish,translate} ... [-h] [-v] [-q] [-V] [--debug]
PARAMETERS
-h, --help
Show help message and exit
-v, --version
Show program's version number and exit
-q, --quiet
Suppress non-error messages
-V, --verbose
Enable verbose output
--debug
Enable debug output (implies verbose)
DESCRIPTION
The kaggle command is the official CLI tool for interacting with the Kaggle platform, a hub for data science competitions, datasets, notebooks, and models. It allows users to manage datasets, competitions, kernels, and more via Kaggle's REST API without a web browser.
Key features include listing public/private datasets with kaggle datasets list, downloading them with kaggle datasets download, submitting competition entries via kaggle competitions submit, and pushing notebooks with kaggle kernels push. It supports authentication through a JSON API token, handles file uploads/downloads, and provides verbose/quiet modes for output control.
Prior to installation (pip install kaggle), users must generate an API token from their Kaggle account settings (under 'Account' > 'Create New API Token'), save it as ~/.kaggle/kaggle.json, and secure it with chmod 600 ~/.kaggle/kaggle.json. The tool is Python-based, cross-platform, and actively maintained, making it essential for automating workflows in machine learning pipelines.
CAVEATS
Requires kaggle Python package and valid API token in ~/.kaggle/kaggle.json (permissions 600). Subject to Kaggle API rate limits. Large file uploads/downloads may require sufficient bandwidth/disk space. Not all features available for private resources without proper access.
AUTHENTICATION SETUP
Download kaggle.json from Kaggle account > API > 'Create New Token'. Move to ~/.kaggle/ and run chmod 600 ~/.kaggle/kaggle.json.
COMMON EXAMPLES
kaggle datasets list - List public datasets
kaggle competitions download -c titanic - Download Titanic data
kaggle kernels pull user/notebook - Pull a kernel.
SUBCOMMANDS OVERVIEW
Core: datasets (list/download/create), competitions (submit/download/leaderboard), kernels (push/pull/list), models (create/push). Utilities: config, credentials.
HISTORY
Released in 2018 by the Kaggle team (Google-owned since 2017) to simplify API access beyond HTTP requests. Initial versions focused on datasets/competitions; later updates (v1.5+ in 2020s) added kernels, models, private dataset support, and bug fixes for Python 3. Evolved with platform features like Courses and Translate.


