crawlbaseDocs
Log in

API usage

Add &scraper=kaggle-dataset-serp 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?search=heart+disease' \
  --data-urlencode 'scraper=kaggle-dataset-serp' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.kaggle.com/datasets?search=heart+disease',
    {'scraper': 'kaggle-dataset-serp'}
)

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?search=heart+disease',
  { scraper: 'kaggle-dataset-serp' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.kaggle.com/datasets?search=heart+disease', scraper: 'kaggle-dataset-serp')
data = JSON.parse(res.body)

Example input URL

Any Kaggle dataset search or listing page works in the url parameter - the page at /datasets, with or without a query string. For example:

https://www.kaggle.com/datasets?search=heart+disease
https://www.kaggle.com/datasets?search=nlp&fileType=csv
https://www.kaggle.com/datasets
https://www.kaggle.com/datasets?search=weather&page=2

Response shape

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

url
string
URL of the search page that was scraped.
query
string | null
Search term Kaggle actually ran, read from the rendered search box and falling back to the request URL.
totalCount
integer | null
Total number of datasets matching the search across all pages, or null when the page does not state a total.
page
integer | null
Current page number, or null when it cannot be determined.
hasNextPage
boolean
Whether a further page of results is available.
resultCount
integer
Number of rows returned on this page.
results
array
Dataset rows in the order they appear on the page.
results[].position
integer
One-based rank of the row within this page.
results[].title
string | null
Dataset display title.
results[].url
string | null
Absolute URL of the dataset page.
results[].slug
string | null
Dataset identifier as owner/dataset, read from the URL path.
results[].owner
object
Account that publishes the dataset.
results[].owner.name
string | null
Owner display name.
results[].owner.url
string | null
Absolute URL of the owner profile.
results[].thumbnail
string | null
Dataset card image URL. Kaggle serves it as a CSS background rather than an image tag, so it is read from the inline style.
results[].lastUpdated
string | null
Absolute timestamp of the last dataset update. The card shows only a relative age, so the value is taken from the tooltip behind it and keeps Kaggle formatting rather than ISO 8601.
results[].usabilityRating
number | null
Kaggle usability score for the dataset, from 0 to 10.
results[].fileCount
integer | null
Number of files in the dataset.
results[].fileFormat
string | null
File format label shown on the card (for example CSV).
results[].size
string | null
Total dataset size as displayed, units included (for example 6 kB). Kaggle does not expose the exact byte count in the list view.
results[].downloads
integer | null
Download count. Kaggle abbreviates figures over a thousand on cards (for example 362K); the value is expanded back to an exact integer, and is null when the card omits the figure.
results[].notebookCount
integer | null
Number of public notebooks built on the dataset, expanded from the same abbreviated form as downloads.
results[].votes
integer | null
Upvote count for the dataset.
results[].medal
string | null
Kaggle medal on the dataset (for example bronze), or null when the row carries none.

Sample response

{
  "url": "https://www.kaggle.com/datasets?search=heart+disease",
  "query": "heart disease",
  "totalCount": 1628,
  "page": 1,
  "hasNextPage": true,
  "resultCount": 20,
  "results": [
    {
      "position": 1,
      "title": "Heart Disease Dataset",
      "url": "https://www.kaggle.com/datasets/johnsmith88/heart-disease-dataset",
      "slug": "johnsmith88/heart-disease-dataset",
      "owner": {
        "name": "David Lapp",
        "url": "https://www.kaggle.com/johnsmith88"
      },
      "thumbnail": "https://storage.googleapis.com/kaggle-datasets-images/216167/469115/23af5a37ef4e938b2c9a1b97662c3efc/dataset-thumbnail.jpg?t=2019-06-04-03-29-56",
      "lastUpdated": "Thu Jun 06 2019 17:33:55 GMT+0200 (Central European Summer Time)",
      "usabilityRating": 8.8,
      "fileCount": 1,
      "fileFormat": "CSV",
      "size": "6 kB",
      "downloads": 362000,
      "notebookCount": 984,
      "votes": 1859,
      "medal": "gold"
    },
    {
      "position": 2,
      "title": "Heart Disease",
      "url": "https://www.kaggle.com/datasets/oktayrdeki/heart-disease",
      "slug": "oktayrdeki/heart-disease",
      "owner": {
        "name": "Oktay Ördekçi",
        "url": "https://www.kaggle.com/oktayrdeki"
      },
      "thumbnail": "https://storage.googleapis.com/kaggle-datasets-images/6393782/10326308/95bfd024a1dc7d059e7b6f3632ed37c9/dataset-thumbnail.png?t=2024-12-29-13-32-57",
      "lastUpdated": "Sun Dec 29 2024 14:26:49 GMT+0100 (Central European Standard Time)",
      "usabilityRating": 10,
      "fileCount": 1,
      "fileFormat": "CSV",
      "size": "582 kB",
      "downloads": 22700,
      "notebookCount": 48,
      "votes": 179,
      "medal": "bronze"
    }
  ]
}