Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
---
id: add-data-to-dataset
title: Add data to dataset
---
import RunnableCodeBlock from '@site/src/components/RunnableCodeBlock';
import ApiLink from '@site/src/components/ApiLink';
import AddDataToDatasetSource from '!!raw-loader!roa-loader!./add-data-to-dataset.ts';
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 <ApiLink to="core/class/Dataset#open">`Dataset.open()`</ApiLink>
<RunnableCodeBlock className="language-js" type="cheerio">
{AddDataToDatasetSource}
</RunnableCodeBlock>
Each item in this dataset will be saved to its own file in the following directory:
```bash
{PROJECT_FOLDER}/storage/datasets/default/
```