Skip to main content

Where your data goes: Storage types

Your Actor collects data, takes screenshots, processes information - but where does it all go? Good news: Apify handles this automatically. When your Actor starts producing data, the right storage gets created for you.

Tomas Nosek avatar
Written by Tomas Nosek
Updated today

Remember those output schemas from the previous article? Here's what they're actually describing.

Dataset - for structured data

Datasets store sequential records - think rows in a spreadsheet. Each time you push data, it gets added as a new record. You can export your results in JSON, CSV, Excel, and other formats.

The key thing about datasets: they're append-only. You can add data but can't edit or delete existing records. This makes them perfect for scraping results, where you're collecting data points one by one. But datasets aren't just for scraping - if you're building an automation tool, each record could track the status of an individual task or action.

Every Actor run automatically gets a default dataset, so you don't have to think about it. This is what your dataset schema (from the last article) describes.

Key-value store - for everything else

Key-value stores are flexible storage for any file type. Unlike datasets, they're mutable - you can add, update, and delete records whenever you need.

Use key-value stores for screenshots, PDFs, JSON configurations, or saving your Actor's state. Each record has a unique key (like a filename) and can be any content type you need.

Every Actor run gets a default key-value store, and your Actor's input is automatically stored there under the INPUT key. This is what your key-value store schema describes.

Request queues (when you need them)

Request queues are for managing URLs during crawling. They keep track of which URLs to visit next and automatically skip duplicates. If you're using a crawling template, it handles this for you behind the scenes.

For most beginners, you won't need to think about request queues yet.

It just works

The main thing to remember: storage is automatic. When you push data to a dataset or save something to a key-value store, Apify creates the storage if it doesn't exist. You've built your Actor's structure, and now you know where the results go.

Did this answer your question?