# 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/workflows/kaggle
- Handle: `@kaggle`
- Category: [Data](https://fous.com/workflows/category/data)
- Source website: https://kaggle.com/datasets
- Last verified: Sep 29, 2026
- Fous is not affiliated with Kaggle.

## Methods

### Search datasets

Operation `search_datasets`, version 1. 1 credit per call.

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

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_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.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

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=120) 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.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_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);
```

Or describe the data in plain language: send `{"api":"@kaggle","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## 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

### Is Fous affiliated with Kaggle?

No. Fous is not affiliated with Kaggle. This workflow reads the public kaggle.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. 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; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check 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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/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 workflows](https://fous.com/workflows/category/data)
