crawlbaseDocs
Log in

API usage

Add &scraper=kaggle-dataset to a Crawling API request. URL-encode the target URL in the url parameter.

curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
  --data-urlencode 'url=https://www.kaggle.com/datasets/uciml/iris' \
  --data-urlencode 'scraper=kaggle-dataset' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.kaggle.com/datasets/uciml/iris',
    {'scraper': 'kaggle-dataset'}
)

import json
data = json.loads(res['body'])
const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });

const res = await api.get(
  'https://www.kaggle.com/datasets/uciml/iris',
  { scraper: 'kaggle-dataset' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.kaggle.com/datasets/uciml/iris', scraper: 'kaggle-dataset')
data = JSON.parse(res.body)

Example input URL

Any Kaggle dataset page works in the url parameter - the page at /datasets/<owner>/<dataset>. For example:

https://www.kaggle.com/datasets/uciml/iris
https://www.kaggle.com/datasets/johnsmith88/heart-disease-dataset
https://www.kaggle.com/datasets/zynicide/wine-reviews

Response shape

JSON response body. Field types may be null when the source page omits the value.

url
string
URL of the dataset page that was scraped.
id
string | null
Numeric Kaggle dataset identifier, returned as a string.
title
string | null
Dataset display title.
subtitle
string | null
One-line summary shown under the title.
description
string | null
Full dataset description in Markdown, as the owner wrote it - links, images, and lists are preserved rather than flattened.
version
integer | null
Current dataset version number.
keywords
array
Topic tags applied to the dataset, as an array of strings.
owner
object
Account that publishes the dataset.
owner.name
string | null
Owner display name.
owner.url
string | null
Absolute URL of the owner profile or organization page.
owner.image
string | null
Owner avatar URL.
license
object
License the dataset is published under.
license.name
string | null
License display name (for example CC0: Public Domain).
license.url
string | null
Canonical URL of the license text.
files
array
Downloadable archives attached to the dataset.
files[].format
string | null
Archive format (for example zip).
files[].sizeBytes
integer | null
Archive size in bytes.
files[].downloadUrl
string | null
Absolute download URL, pinned to the current dataset version.
files[].requiresSubscription
boolean
Whether Kaggle requires a signed-in account to start the download.
downloads
integer | null
Total download count for the dataset.
views
integer | null
Total page view count.
votes
integer | null
Upvote count.
commentCount
integer | null
Number of comments in the dataset discussion.
lastUpdated
string | null
ISO 8601 timestamp of the most recent dataset update.
discussionUrl
string | null
Absolute URL of the dataset discussion tab.
thumbnail
string | null
Dataset card image URL.
isAccessibleForFree
boolean
Whether Kaggle marks the dataset as freely accessible.

Sample response

{
  "url": "https://www.kaggle.com/datasets/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 Repository][1].\n\nIt includes three iris species with 50 samples each as well as some properties about each flower.",
  "version": 2,
  "keywords": [
    "subject",
    "earth and nature",
    "biology"
  ],
  "owner": {
    "name": "UCI Machine Learning",
    "url": "https://www.kaggle.com/organizations/uciml",
    "image": "https://storage.googleapis.com/kaggle-organizations/7/thumbnail.png"
  },
  "license": {
    "name": "CC0: Public Domain",
    "url": "https://creativecommons.org/publicdomain/zero/1.0/"
  },
  "files": [
    {
      "format": "zip",
      "sizeBytes": 3687,
      "downloadUrl": "https://www.kaggle.com/datasets/uciml/iris/download?datasetVersionNumber=2",
      "requiresSubscription": true
    }
  ],
  "downloads": 907784,
  "views": 3131083,
  "votes": 4861,
  "commentCount": 33,
  "lastUpdated": "2016-09-27T07:38:05.44Z",
  "discussionUrl": "https://www.kaggle.com/uciml/iris/discussion",
  "thumbnail": "https://storage.googleapis.com/kaggle-datasets-images/19/19/default-backgrounds/dataset-card.jpg",
  "isAccessibleForFree": true
}