Kaggle Dataset API Documentation

GET   /api/v1/search?engine=kaggle_dataset

The Kaggle Dataset API returns one public Kaggle dataset by its ref or kaggle.com URL: its title, subtitle, Markdown description, owner, creator, licence, votes, downloads, views, notebook and discussion counts, usability rating out of 10, total size of its files, last update, current version, tags and up to 10 of its most recent versions.

When Kaggle lists files, the API returns their sizes and up to 200 files per page, with pagination.next_page_token while more remain. Set version to list the files of an older version Kaggle still keeps. Datasets without a file list, such as BigQuery datasets, can return metadata without a files block. A dataset that doesn't exist or isn't public returns an error message.

API Parameters

Search Query

  • Name
    dataset_id
    Required
    Required
    Description

    Parameter defines the Kaggle dataset to look up, by its ref (owner/slug), such as imdevskp/corona-virus-report, or by its kaggle.com/datasets URL. Any path after the slug, such as /data, and any query are ignored. The Kaggle Dataset Search API returns this ref as dataset_results[].dataset_id.

Files

  • Name
    version
    Required
    Optional
    Description

    Parameter defines the version whose files to list, such as 100. By default, the files of the current version are listed. The dataset block always describes the current version, and a version the dataset doesn't have returns an error naming the current one.

Pagination

  • Name
    next_page_token
    Required
    Optional
    Description

    Parameter defines the next page of files, 200 per page. Use the pagination.next_page_token of a previous response, with the same dataset_id and version.

Engine

  • Name
    engine
    Required
    Required
    Description

    Parameter defines an engine that will be used to retrieve real-time data. It must be set to kaggle_dataset.

API key

  • Name
    api_key
    Required
    Required
    Description

    The api_key authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

Zero Data Retention

  • Name
    zero_retention
    Enterprise Only
    Enterprise Only
    Required
    Optional
    Description

    Set this parameter to true to disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.

API Examples

Full Response

Full Response
GET
https://www.searchapi.io/api/v1/search?dataset_id=imdevskp%2Fcorona-virus-report&engine=kaggle_dataset
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "kaggle_dataset",
  "dataset_id": "imdevskp/corona-virus-report"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_VWrewD1O8geEZuEgRQ6lvxXN",
    "status": "Success",
    "created_at": "2026-11-26T21:28:25Z",
    "request_time_taken": 12.03,
    "parsing_time_taken": 0.04,
    "total_time_taken": 12.07,
    "request_url": "https://www.kaggle.com/datasets/imdevskp/corona-virus-report",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_VWrewD1O8geEZuEgRQ6lvxXN.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_VWrewD1O8geEZuEgRQ6lvxXN"
  },
  "search_parameters": {
    "engine": "kaggle_dataset",
    "dataset_id": "imdevskp/corona-virus-report"
  },
  "dataset": {
    "dataset_id": "imdevskp/corona-virus-report",
    "id": 494766,
    "title": "COVID-19 Dataset",
    "subtitle": "Number of Confirmed, Death and Recovered cases every day across the globe",
    "description": "[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/uses-git.svg)](https://forthebadge.com)\n\n### Context\n\n- A new coronavirus designated...",
    "link": "https://www.kaggle.com/datasets/imdevskp/corona-virus-report",
    "owner": {
      "username": "imdevskp",
      "name": "Devakumar K. P."
    },
    "creator": {
      "name": "Devakumar K. P."
    },
    "license": "Other (specified in description)",
    "votes": 2898,
    "downloads": 440026,
    "views": 1608048,
    "notebooks": 772,
    "discussions": 43,
    "usability_rating": 10.0,
    "files_size_bytes": 75047104,
    "last_updated": "2020-08-07T03:47:47.907Z",
    "version": 166,
    "tags": [
      "law",
      "public health",
      "covid19",
      "diseases"
    ],
    "versions": [
      {
        "version": 166,
        "created_at": "2020-08-07T03:47:47.907Z",
        "notes": "update",
        "status": "Ready"
      },
      "..."
    ],
    "thumbnail": "https://storage.googleapis.com/kaggle-datasets-images/494766/948370/d577c5007cd4f761be6485..."
  },
  "files": [
    {
      "path": "country_wise_latest.csv",
      "size_bytes": 14784,
      "created_at": "2020-08-07T03:47:49.972Z"
    },
    "..."
  ]
}

Files of an Older Version

GET
https://www.searchapi.io/api/v1/search?dataset_id=imdevskp%2Fcorona-virus-report&engine=kaggle_dataset&version=100
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "kaggle_dataset",
  "dataset_id": "imdevskp/corona-virus-report",
  "version": "100"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_7LqdKeRrXoaEwuro0Pl1Ymzw",
    "status": "Success",
    "created_at": "2026-11-26T21:28:38Z",
    "request_time_taken": 24.12,
    "parsing_time_taken": 0.0,
    "total_time_taken": 24.12,
    "request_url": "https://www.kaggle.com/datasets/imdevskp/corona-virus-report/versions/100",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_7LqdKeRrXoaEwuro0Pl1Ymzw.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_7LqdKeRrXoaEwuro0Pl1Ymzw"
  },
  "search_parameters": {
    "engine": "kaggle_dataset",
    "dataset_id": "imdevskp/corona-virus-report",
    "version": 100
  },
  "dataset": {
    "dataset_id": "imdevskp/corona-virus-report",
    "id": 494766,
    "title": "COVID-19 Dataset",
    "subtitle": "Number of Confirmed, Death and Recovered cases every day across the globe",
    "description": "[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/uses-git.svg)](https://forthebadge.com)\n\n### Context\n\n- A new coronavirus designated...",
    "link": "https://www.kaggle.com/datasets/imdevskp/corona-virus-report",
    "owner": {
      "username": "imdevskp",
      "name": "Devakumar K. P."
    },
    "creator": {
      "name": "Devakumar K. P."
    },
    "license": "Other (specified in description)",
    "votes": 2898,
    "downloads": 440026,
    "views": 1608048,
    "notebooks": 772,
    "discussions": 43,
    "usability_rating": 10.0,
    "files_size_bytes": 75047104,
    "last_updated": "2020-08-07T03:47:47.907Z",
    "version": 166,
    "tags": [
      "law",
      "public health",
      "covid19",
      "diseases"
    ],
    "versions": [
      {
        "version": 166,
        "created_at": "2020-08-07T03:47:47.907Z",
        "notes": "update",
        "status": "Ready"
      },
      "..."
    ],
    "thumbnail": "https://storage.googleapis.com/kaggle-datasets-images/494766/948370/d577c5007cd4f761be6485..."
  },
  "files": [
    {
      "path": "covid_19_clean_complete.csv",
      "size_bytes": 1316669,
      "created_at": "2020-05-10T06:55:15.550Z"
    },
    "..."
  ]
}

Dataset by kaggle.com URL

GET
https://www.searchapi.io/api/v1/search?dataset_id=https%3A%2F%2Fwww.kaggle.com%2Fdatasets%2Fuciml%2Firis%2Fdata&engine=kaggle_dataset
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "kaggle_dataset",
  "dataset_id": "https://www.kaggle.com/datasets/uciml/iris/data"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_Ba6KXlErN3Ej2fnpYvP850bw",
    "status": "Success",
    "created_at": "2026-11-26T21:29:02Z",
    "request_time_taken": 2.74,
    "parsing_time_taken": 0.0,
    "total_time_taken": 2.74,
    "request_url": "https://www.kaggle.com/datasets/uciml/iris",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_Ba6KXlErN3Ej2fnpYvP850bw.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_Ba6KXlErN3Ej2fnpYvP850bw"
  },
  "search_parameters": {
    "engine": "kaggle_dataset",
    "dataset_id": "uciml/iris"
  },
  "dataset": {
    "dataset_id": "uciml/iris",
    "id": 19,
    "title": "Iris Species",
    "subtitle": "Classify iris plants into three species in this classic dataset",
    "description": "The Iris dataset was used in R.A. Fisher's classic 1936 paper, [The Use of Multiple Measurements in Taxonomic Problems](http://rcs.chemometrics.ru/Tutorials/classification/Fisher.pdf), and can also be found on the [UCI Machine Learning Repo...",
    "link": "https://www.kaggle.com/datasets/uciml/iris",
    "owner": {
      "username": "uciml",
      "name": "UCI Machine Learning"
    },
    "creator": {
      "name": "Kaggle Team Bot"
    },
    "license": "CC0: Public Domain",
    "votes": 5023,
    "downloads": 969310,
    "views": 3308798,
    "notebooks": 8268,
    "discussions": 36,
    "usability_rating": 7.9,
    "files_size_bytes": 15347,
    "last_updated": "2016-09-27T07:38:05.440Z",
    "version": 2,
    "tags": [
      "biology"
    ],
    "versions": [
      {
        "version": 2,
        "created_at": "2016-09-27T07:38:05.440Z",
        "notes": "Republishing files so they're formally in our system",
        "status": "Ready"
      },
      "..."
    ],
    "thumbnail": "https://storage.googleapis.com/kaggle-datasets-images/19/19/default-backgrounds/dataset-th..."
  },
  "files": [
    {
      "path": "Iris.csv",
      "size_bytes": 5107,
      "created_at": "2019-09-19T03:05:19.853Z"
    },
    "..."
  ]
}

Dataset with More Than One Page of Files

GET
https://www.searchapi.io/api/v1/search?dataset_id=paultimothymooney%2Fchest-xray-pneumonia&engine=kaggle_dataset
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "kaggle_dataset",
  "dataset_id": "paultimothymooney/chest-xray-pneumonia"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_4x7L8KlJ0oGB6TRg6Y1GkOEN",
    "status": "Success",
    "created_at": "2026-11-26T21:29:05Z",
    "request_time_taken": 2.99,
    "parsing_time_taken": 0.0,
    "total_time_taken": 2.99,
    "request_url": "https://www.kaggle.com/datasets/paultimothymooney/chest-xray-pneumonia",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_4x7L8KlJ0oGB6TRg6Y1GkOEN.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_4x7L8KlJ0oGB6TRg6Y1GkOEN"
  },
  "search_parameters": {
    "engine": "kaggle_dataset",
    "dataset_id": "paultimothymooney/chest-xray-pneumonia"
  },
  "dataset": {
    "dataset_id": "paultimothymooney/chest-xray-pneumonia",
    "id": 17810,
    "title": "Chest X-Ray Images (Pneumonia)",
    "subtitle": "5,863 images, 2 categories",
    "description": "### Context\n\nhttp://www.cell.com/cell/fulltext/S0092-8674(18)30154-5\n\n![](https://i.imgur.com/jZqpV51.png)\n\nFigure S6. Illustrative Examples of Chest X-Rays in Patients with Pneumonia, Related to Figure 6\nThe normal chest X-ray (left panel)...",
    "link": "https://www.kaggle.com/datasets/paultimothymooney/chest-xray-pneumonia",
    "owner": {
      "username": "paultimothymooney",
      "name": "Paul Mooney"
    },
    "creator": {
      "name": "Paul Mooney"
    },
    "license": "Other (specified in description)",
    "votes": 7795,
    "downloads": 732850,
    "views": 3271443,
    "notebooks": 4088,
    "discussions": 73,
    "usability_rating": 7.5,
    "files_size_bytes": 1236482806,
    "last_updated": "2018-03-24T19:41:59.603Z",
    "version": 2,
    "tags": [
      "image",
      "health",
      "biology",
      "online communities",
      "medicine"
    ],
    "versions": [
      {
        "version": 2,
        "created_at": "2018-03-24T19:41:59.603Z",
        "notes": "train/test/val",
        "status": "Ready"
      },
      "..."
    ],
    "thumbnail": "https://storage.googleapis.com/kaggle-datasets-images/17810/23340/c8372ebbe20b0f671c2f3c50..."
  },
  "files": [
    {
      "path": "chest_xray/__MACOSX/._chest_xray",
      "size_bytes": 212,
      "created_at": "2018-03-24T19:47:53.863Z"
    },
    "..."
  ],
  "pagination": {
    "next_page_token": "WyJwYXVsdGltb3RoeW1vb25leS9jaGVzdC14cmF5LXBuZXVtb25pYSIsMCwiZTM3YjhiN2UwZDY4IiwiQ2ZESjhEWF..."
  }
}