← 返回 Skills 市场
byungkyu

Kaggle

作者 byungkyu · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
273
总下载
1
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install kaggle-api
功能描述
Kaggle API integration with managed authentication. Access datasets, models, competitions, and kernels. Use this skill when users want to search, download, o...
使用说明 (SKILL.md)

Kaggle

Access Kaggle datasets, models, competitions, and notebooks via managed API authentication.

Quick Start

python \x3C\x3C'EOF'
import urllib.request, os, json
data = json.dumps({}).encode()
req = urllib.request.Request('https://gateway.maton.ai/kaggle/v1/datasets.DatasetApiService/ListDatasets', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Base URL

https://gateway.maton.ai/kaggle/{native-api-path}

The gateway proxies requests to api.kaggle.com and automatically injects your credentials.

Authentication

All requests require the Maton API key:

Authorization: Bearer $MATON_API_KEY

Environment Variable: Set your API key as MATON_API_KEY:

export MATON_API_KEY="YOUR_API_KEY"

Getting Your API Key

  1. Sign in or create an account at maton.ai
  2. Go to maton.ai/settings
  3. Copy your API key

Connection Management

Manage your Kaggle connections at https://ctrl.maton.ai.

List Connections

python \x3C\x3C'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=kaggle&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Create Connection

python \x3C\x3C'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'kaggle'}).encode()
req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Open the returned url in a browser to complete authentication. Kaggle uses API key authentication - you'll need to provide your Kaggle username and API key from kaggle.com/settings.

Delete Connection

python \x3C\x3C'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

API Reference

Kaggle uses an RPC-style API. All requests are POST with JSON body.

POST /kaggle/v1/{ServiceName}/{MethodName}
Content-Type: application/json

Datasets

List Datasets

POST /kaggle/v1/datasets.DatasetApiService/ListDatasets
Content-Type: application/json

{}

Request Body Parameters:

  • search - Search term (optional)
  • user - Filter by username (optional)
  • pageSize - Results per page (optional)
  • pageToken - Pagination token (optional)

Example with search:

{
  "search": "covid"
}

Response:

{
  "datasets": [
    {
      "id": 9481458,
      "ref": "amar5693/screen-time-sleep-and-stress-analysis-dataset",
      "title": "Screen Time, Sleep & Stress Analysis Dataset",
      "subtitle": "ML-ready dataset analyzing smartphone usage and productivity.",
      "totalBytes": 787136,
      "downloadCount": 11659,
      "voteCount": 236,
      "usabilityRating": 1,
      "licenseName": "CC0: Public Domain",
      "ownerName": "Amar Tiwari",
      "tags": [...]
    }
  ]
}

Get Dataset

POST /kaggle/v1/datasets.DatasetApiService/GetDataset
Content-Type: application/json

{
  "ownerSlug": "amar5693",
  "datasetSlug": "screen-time-sleep-and-stress-analysis-dataset"
}

Response:

{
  "id": 9481458,
  "title": "Screen Time, Sleep & Stress Analysis Dataset",
  "subtitle": "ML-ready dataset analyzing smartphone usage and productivity.",
  "totalBytes": 787136,
  "downloadCount": 11659,
  "usabilityRating": 1
}

List Dataset Files

POST /kaggle/v1/datasets.DatasetApiService/ListDatasetFiles
Content-Type: application/json

{
  "ownerSlug": "amar5693",
  "datasetSlug": "screen-time-sleep-and-stress-analysis-dataset"
}

Response:

{
  "datasetFiles": [
    {
      "name": "Smartphone_Usage_Productivity_Dataset_50000.csv",
      "creationDate": "2026-02-13T06:56:19.803Z",
      "totalBytes": 2958561
    }
  ]
}

Get Dataset Metadata

POST /kaggle/v1/datasets.DatasetApiService/GetDatasetMetadata
Content-Type: application/json

{
  "ownerSlug": "amar5693",
  "datasetSlug": "screen-time-sleep-and-stress-analysis-dataset"
}

Response:

{
  "info": {
    "datasetId": 9481458,
    "datasetSlug": "screen-time-sleep-and-stress-analysis-dataset",
    "ownerUser": "amar5693",
    "title": "Screen Time, Sleep & Stress Analysis Dataset",
    "description": "...",
    "totalViews": 44291,
    "totalVotes": 236,
    "totalDownloads": 11661
  }
}

Download Dataset

POST /kaggle/v1/datasets.DatasetApiService/DownloadDataset
Content-Type: application/json

{
  "ownerSlug": "amar5693",
  "datasetSlug": "screen-time-sleep-and-stress-analysis-dataset"
}

Returns binary data (ZIP file). Response headers:

  • Content-Type: application/zip
  • Content-Length: \x3Csize in bytes>

Models

List Models

POST /kaggle/v1/models.ModelApiService/ListModels
Content-Type: application/json

{}

Request Body Parameters:

  • owner - Filter by owner (optional)
  • search - Search term (optional)
  • pageSize - Results per page (optional)

Example:

{
  "owner": "google"
}

Response:

{
  "models": [
    {
      "id": 1,
      "owner": "google",
      "slug": "gemma",
      "title": "Gemma",
      "subtitle": "Gemma is a family of lightweight, state-of-the-art models",
      "instanceCount": 16,
      "framework": "transformers"
    }
  ]
}

Get Model

POST /kaggle/v1/models.ModelApiService/GetModel
Content-Type: application/json

{
  "ownerSlug": "google",
  "modelSlug": "gemma"
}

Response:

{
  "id": 1,
  "title": "Gemma",
  "slug": "gemma",
  "owner": "google",
  "subtitle": "Gemma is a family of lightweight, state-of-the-art models",
  "publishTime": "2024-02-21T16:00:00Z",
  "instanceCount": 16
}

Competitions

List Competitions

POST /kaggle/v1/competitions.CompetitionApiService/ListCompetitions
Content-Type: application/json

{}

Request Body Parameters:

  • search - Search term (optional)
  • category - Filter by category (optional)
  • pageSize - Results per page (optional)

Example:

{
  "search": "nlp"
}

Response:

{
  "competitions": [
    {
      "id": 118448,
      "ref": "https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3",
      "title": "AI Mathematical Olympiad - Progress Prize 3",
      "url": "https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3",
      "deadline": "2026-06-06T23:59:00Z",
      "category": "Featured",
      "reward": "$1,048,576",
      "teamCount": 1234,
      "userHasEntered": false
    }
  ]
}

Kernels (Notebooks)

List Kernels

POST /kaggle/v1/kernels.KernelsApiService/ListKernels
Content-Type: application/json

{}

Request Body Parameters:

  • search - Search term (optional)
  • user - Filter by username (optional)
  • language - Filter by language: python, r, etc. (optional)
  • pageSize - Results per page (optional)

Example:

{
  "search": "titanic"
}

Response:

{
  "kernels": [
    {
      "id": 5660537,
      "ref": "alexisbcook/titanic-tutorial",
      "title": "Titanic Tutorial",
      "author": "alexisbcook",
      "language": "Python",
      "totalVotes": 1234,
      "totalViews": 56789
    }
  ]
}

Get Kernel

POST /kaggle/v1/kernels.KernelsApiService/GetKernel
Content-Type: application/json

{
  "userName": "alexisbcook",
  "kernelSlug": "titanic-tutorial"
}

Response:

{
  "metadata": {
    "id": 5660537,
    "ref": "alexisbcook/titanic-tutorial",
    "title": "Titanic Tutorial",
    "author": "alexisbcook",
    "language": "Python"
  }
}

Code Examples

JavaScript

const response = await fetch(
  'https://gateway.maton.ai/kaggle/v1/datasets.DatasetApiService/ListDatasets',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.MATON_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ search: 'covid' })
  }
);
const data = await response.json();
console.log(data);

Python

import os
import requests

response = requests.post(
    'https://gateway.maton.ai/kaggle/v1/datasets.DatasetApiService/ListDatasets',
    headers={
        'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
        'Content-Type': 'application/json'
    },
    json={'search': 'covid'}
)
print(response.json())

Notes

  • All API calls use POST method with JSON body
  • API follows RPC pattern: /v1/{ServiceName}/{MethodName}
  • Dataset refs use format: {owner}/{dataset-slug}
  • Model refs use format: {owner}/{model-slug}
  • Kernel refs use format: {user}/{kernel-slug}
  • Download endpoints return binary data (ZIP files)
  • Some operations require specific permissions (competition participation, kernel access)

Error Handling

Status Meaning
200 Success
400 Invalid request parameters
401 Invalid or missing authentication
403 Permission denied
404 Resource not found
429 Rate limited

Resources

安全使用建议
This skill routes all Kaggle API activity through Maton (gateway.maton.ai / ctrl.maton.ai) and requires a MATON_API_KEY. Before installing, verify you trust Maton: check their website, privacy policy, and how they store/use credentials. Understand that you may be asked to provide your Kaggle API key during Maton's connection flow, and Maton will see any datasets/models you access through the gateway. If you prefer not to expose Kaggle credentials to a third party, use the official Kaggle CLI/API directly or only provide limited, revocable keys. Also confirm how to revoke MATON_API_KEY and what data retention/logging Maton performs.
功能分析
Type: OpenClaw Skill Name: kaggle-api Version: 1.0.0 The Kaggle API skill bundle provides a legitimate integration for accessing Kaggle resources (datasets, models, competitions) via a managed gateway (gateway.maton.ai). The SKILL.md file contains standard API documentation and code examples that use the required MATON_API_KEY environment variable for authentication. No evidence of malicious intent, data exfiltration, or harmful prompt injection was found.
能力评估
Purpose & Capability
The name/description (Kaggle API integration) aligns with the SKILL.md: all documented calls target Maton's gateway (gateway.maton.ai / ctrl.maton.ai). The single required env var (MATON_API_KEY) is appropriate for a managed gateway proxy.
Instruction Scope
Instructions are narrowly scoped to making POST requests to Maton endpoints and managing connections. They do instruct the user to complete an OAuth-like flow (open a URL) and to provide Kaggle username/API key via Maton's connection flow, which means credentials and data will be handled by Maton rather than directly by the local agent.
Install Mechanism
No install spec and no code files (instruction-only) — nothing is written to disk by the skill itself. This is the lowest-risk install pattern.
Credentials
Only MATON_API_KEY is required, which is proportionate to using a third-party gateway. However, this gives Maton broad access to proxy Kaggle requests and potentially access/download user data; users should treat MATON_API_KEY as highly sensitive and confirm Maton's trustworthiness and token scope/expiration.
Persistence & Privilege
always is false and the skill does not request system-level persistence or modify other skills. Normal autonomous invocation is allowed (platform default).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kaggle-api
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kaggle-api 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release: Kaggle API integration with managed authentication via Maton. - Enables searching, downloading, and interacting with Kaggle datasets, models, competitions, and notebooks. - Authentication is streamlined using a Maton API key, no direct Kaggle API key handling required in requests. - Includes robust connection management: list, create, and delete Kaggle authentications through `ctrl.maton.ai`. - Provides ready-to-use Python examples and clear reference for key Kaggle API endpoints (list/get/download datasets, models, competitions, kernels, etc.).
元数据
Slug kaggle-api
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Kaggle 是什么?

Kaggle API integration with managed authentication. Access datasets, models, competitions, and kernels. Use this skill when users want to search, download, o... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 273 次。

如何安装 Kaggle?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kaggle-api」即可一键安装,无需额外配置。

Kaggle 是免费的吗?

是的,Kaggle 完全免费(开源免费),可自由下载、安装和使用。

Kaggle 支持哪些平台?

Kaggle 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Kaggle?

由 byungkyu(@byungkyu)开发并维护,当前版本 v1.0.0。

💬 留言讨论