> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> Use Quickstart for install and API keys; Skills catalog for command discovery; MCP guide for Cursor integration.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# Kaggle datasets

> Download and search Kaggle datasets from the terminal using the Kaggle API.

Arka includes a **kaggle** skill for downloading and searching Kaggle datasets. It uses the official Kaggle API via the `kaggle` CLI (preferred) or the Python `kaggle` package.

## Quick examples

```bash theme={null}
kaggle status
kaggle search titanic
kaggle download heptapod/titanic
kaggle download heptapod/titanic --unzip -o ~/Downloads
```

Natural language also works:

```bash theme={null}
arka "download kaggle dataset heptapod/titanic"
arka "kaggle search housing prices"
arka "kaggle status"
```

Or via the CLI subcommand:

```bash theme={null}
arka kaggle download heptapod/titanic --unzip
```

## Commands

| Command                                   | Description                                     |
| ----------------------------------------- | ----------------------------------------------- |
| `kaggle status`                           | Check whether Kaggle credentials are configured |
| `kaggle search <keywords>`                | Search datasets by keyword                      |
| `kaggle download <owner/dataset>`         | Download a dataset to your Downloads folder     |
| `kaggle download <owner/dataset> -o DIR`  | Download to a custom directory                  |
| `kaggle download <owner/dataset> --unzip` | Download and extract archives                   |
| `kaggle open <owner/dataset>`             | Open dataset page in browser (no API key)       |
| `kaggle download <owner/dataset> --open`  | Open in browser when credentials are missing    |

## Credentials

Kaggle requires an API token. Create one at [kaggle.com/settings](https://www.kaggle.com/settings) (Account → API → Create New Token).

**Option A — environment variables** (recommended for Arka):

```bash theme={null}
KAGGLE_USERNAME=your_username
KAGGLE_KEY=your_api_key
```

Add these to `~/.config/arka/.env`.

**Option B — `kaggle.json`** (standard Kaggle layout):

```bash theme={null}
mkdir -p ~/.kaggle
# unzip the token download into ~/.kaggle/kaggle.json
chmod 600 ~/.kaggle/kaggle.json
```

Run `kaggle status` to verify credentials before downloading.

## Without API keys

The official Kaggle API requires credentials. If you do not have an API token yet, you can still open a dataset page in your browser and download files manually from the Kaggle website.

```bash theme={null}
kaggle open heptapod/titanic
kaggle open https://www.kaggle.com/datasets/heptapod/titanic
```

Natural language:

```bash theme={null}
arka "open kaggle dataset heptapod/titanic"
arka "kaggle open heptapod/titanic"
```

You can also pass `--open` (or `--browser`) on download to open the page instead of failing when credentials are missing:

```bash theme={null}
kaggle download heptapod/titanic --open
```

If you run `kaggle download` or `kaggle search` without credentials, Arka prints a short message suggesting `kaggle open owner/dataset` for manual download.

## API approach

The skill prefers the `kaggle` CLI if it is on `PATH`:

```bash theme={null}
kaggle datasets download -d owner/dataset -p /output/dir
kaggle datasets list -s "query"
```

If the CLI is not installed, it falls back to the Python `kaggle` package:

```bash theme={null}
pip install kaggle
```

## Related skills

| Skill           | Example                      |
| --------------- | ---------------------------- |
| `generate_data` | `generate 100 users as csv`  |
| `data_ask`      | `ask data in reports folder` |
| `competitions`  | `search kaggle competitions` |

See also: [Generate data](/guides/generate-data)


## Related topics

- [Exercise dataset](/guides/exercise-dataset.md)
- [GitHub dataset repos](/guides/github-dataset.md)
- [Hackathons and ML competitions search](/guides/competitions.md)
- [Generate data](/guides/generate-data.md)
- [Arka CLI command and flag reference](/guides/cli.md)
