# Kaggle API

> Kaggle returns public datasets, including size, formats, popularity, and license details, through a workflow and API.

Kaggle (Kaggle Datasets) uses Search datasets to find public datasets by required topic, with optional format, sorting, and result count.

- Page: https://fous.com/tools/kaggle
- Handle: `@kaggle`
- Category: [Data](https://fous.com/tools/category/data)
- Source website: https://kaggle.com/datasets
- Last verified: Sep 29, 2026

## Methods

### Search datasets

Operation `search_datasets`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find public Kaggle datasets on a topic, with size, file formats, usability, popularity and license. Lists at most 100 results in Kaggle’s order; files are not downloaded.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `sort` | string | no | `"most_votes"` | How Kaggle orders the results, for example most_votes. |
| `query` | string | yes | `"housing"` | Topic to search for, for example house prices. |
| `file_type` | string | no | `"parquet"` | Only include datasets of this file format, for example csv. |
| `max_results` | integer | no | `3` | Maximum number of datasets to return, for example 20. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "sort": {
      "enum": [
        "hottest",
        "most_votes",
        "newest",
        "recently_updated",
        "most_usable"
      ],
      "type": "string",
      "default": "hottest",
      "description": "How Kaggle orders the results, for example most_votes.",
      "examples": [
        "most_votes"
      ]
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Topic to search for, for example house prices.",
      "examples": [
        "housing",
        "house prices",
        "__zznotarealdataset99999__"
      ]
    },
    "file_type": {
      "enum": [
        "any",
        "csv",
        "json",
        "sqlite",
        "bigquery",
        "parquet"
      ],
      "type": "string",
      "default": "any",
      "description": "Only include datasets of this file format, for example csv.",
      "examples": [
        "parquet"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum number of datasets to return, for example 20.",
      "x-fous-developer": true,
      "examples": [
        3
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "sort": "most_votes",
      "query": "housing",
      "file_type": "parquet",
      "max_results": 3
    },
    {
      "query": "house prices"
    },
    {
      "query": "__zznotarealdataset99999__"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `datasets` | array |  |  |
| `datasets[].owner` | string or null | `"Rob Mulla"` | Dataset owner. |
| `datasets[].title` | string or null | `"Zillow Home Value Index (Updated Monthly)"` | Dataset title. |
| `datasets[].votes` | integer or null | `81` | Number of votes. |
| `datasets[].license` | string or null | `"CC0: Public Domain"` | Dataset license. |
| `datasets[].size_mb` | number or null | `0.2827` | Dataset size in decimal megabytes. |
| `datasets[].downloads` | integer or null | `4653` | Number of downloads. |
| `datasets[].file_types` | array |  | File formats found in the dataset. |
| `datasets[].dataset_link` | string | `"https://www.kaggle.com/datasets/robikscube/zillow-home-value-index"` | Link to the dataset on Kaggle. |
| `datasets[].usability_score` | number or null | `10` | Kaggle usability score from 0 to 10. |
| `datasets[].last_updated_date` | string or null | `"2026-09-21"` | Most recent update date (YYYY-MM-DD). |

**Example input**

```json
{
  "sort": "most_votes",
  "query": "housing",
  "file_type": "parquet",
  "max_results": 3
}
```

**Example output**

```json
{
  "datasets": [
    {
      "owner": "Rob Mulla",
      "title": "Zillow Home Value Index (Updated Monthly)",
      "votes": 81,
      "license": "CC0: Public Domain",
      "size_mb": 0.2827,
      "downloads": 4653,
      "file_types": [
        "CSV",
        "Parquet"
      ],
      "dataset_link": "https://www.kaggle.com/datasets/robikscube/zillow-home-value-index",
      "usability_score": 10,
      "last_updated_date": "2026-09-21"
    },
    {
      "owner": "Martin Frederiksen",
      "title": "Danish Residential Housing Prices 1992-2024",
      "votes": 33,
      "license": "Other (specified in description)",
      "size_mb": 38.006,
      "downloads": 2269,
      "file_types": [
        "Parquet",
        "CSV"
      ],
      "dataset_link": "https://www.kaggle.com/datasets/martinfrederiksen/danish-residential-housing-prices-1992-2024",
      "usability_score": 10,
      "last_updated_date": "2024-11-29"
    },
    {
      "owner": "Jason_AirROI",
      "title": "Airbnb Market Data: Asia-Pacific",
      "votes": 32,
      "license": "Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)",
      "size_mb": 23.5115,
      "downloads": 1025,
      "file_types": [
        "CSV",
        "Parquet"
      ],
      "dataset_link": "https://www.kaggle.com/datasets/jasonairroi/airbnb-market-data-asia-pacific",
      "usability_score": 10,
      "last_updated_date": "2026-03-18"
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@kaggle",
  "visibility": "public",
  "operation": "search_datasets",
  "version": 1,
  "input": {
    "sort": "most_votes",
    "query": "housing",
    "file_type": "parquet",
    "max_results": 3
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@kaggle\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_datasets\",\n  \"version\": 1,\n  \"input\": {\n    \"sort\": \"most_votes\",\n    \"query\": \"housing\",\n    \"file_type\": \"parquet\",\n    \"max_results\": 3\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@kaggle",
  "visibility": "public",
  "operation": "search_datasets",
  "version": 1,
  "input": {
    "sort": "most_votes",
    "query": "housing",
    "file_type": "parquet",
    "max_results": 3
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/kaggle`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `search_datasets`: Search datasets. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-kaggle https://api.fous.com/mcp/tools/kaggle --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Find public datasets related to a research topic
- Compare dataset sizes, formats, and usability scores
- Review dataset popularity by votes and downloads
- Check dataset licenses before selecting data
- Find datasets in a specific file format

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Kaggle tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Kaggle account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from kaggle.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### Which datasets match a topic?

Search datasets finds public Kaggle datasets for a required topic.

### What file formats are available?

Search datasets returns each dataset’s file formats and can filter results by format.

### How popular is a dataset?

Search datasets returns vote and download counts for each result.

## Related

- [Hugging Face API](https://fous.com/tools/hugging-face.md): Hugging Face returns public model, dataset, and demo search results, model details, or weekly trending models; unpublished information may be missing, and demo availability can change.
- [GitHub API](https://fous.com/tools/github.md): GitHub returns public repository matches and details, up to 25 trending projects, issues, pull requests, and newest-first published releases; release or commit dates may be unavailable.
- [PyPI API](https://fous.com/tools/pypi.md): PyPI provides package metadata, links, and current/latest plus 10 recent versions; release dates reflect first file uploads, and keyword searches return up to 100 packages.
- [Spotify API](https://fous.com/tools/spotify.md): Spotify returns public artist profiles, album credits and ordered tracks, song details and play counts, up to 500 playlist songs, keyword results, and country-based podcast charts; dates and regional options vary.
- [Google Search API](https://fous.com/tools/google-search.md): Google Search returns public web, image, job, event, related-question, and autocomplete results in Google’s order, with answers and details when available; results may be fewer, omit information, or be empty.
- [Coursera API](https://fous.com/tools/coursera.md): Coursera offers courses, certificates, projects, and degrees; search results follow Coursera’s order, and publicly displayed prices and availability may vary by location.
- [Reddit API](https://fous.com/tools/reddit.md): Reddit returns searchable public posts, community feeds/details, user profiles and recent activity, posts with up to 200 comments; unavailable content limits results; Top defaults weekly.
- [Google Scholar API](https://fous.com/tools/google-scholar.md): Google Scholar provides papers, citing papers, ready-made citations and researcher profiles with metrics and up to 20 top-cited papers; public access may be temporarily limited.
- [All Data tools](https://fous.com/tools/category/data)
