Skip to main content
Version: 3.0

Add data to dataset

This example saves data to the default dataset. If the dataset doesn't exist, it will be created. You can save data to custom datasets by using

import { Dataset, CheerioCrawler } from 'crawlee';

const crawler = new CheerioCrawler({
// Function called for each URL
async requestHandler({ request, body }) {
// Save data to default dataset
await Dataset.pushData({
url: request.url,
html: body,

await crawler.addRequests([

// Run the crawler

Each item in this dataset will be saved to its own file in the following directory: