Skip to main content

📂 Datasets

Datasets let you feed structured data into your scripts — useful for tasks like iterating over a list of URLs, emails, product IDs, or login credentials.

You can upload datasets as CSV or JSON files, and reference them inside your script using the read() command.


📤 Uploading a Dataset​

To upload a dataset:

  1. Go to the Datasets tab in the dashboard.
  2. Upload a .csv file or a .json file (must be an array of objects).
  3. Give it a name (e.g. products, leads, accounts2024).
  4. Once uploaded, datasets are immutable and read-only.

📖 Reading a Dataset in a Script​

Inside your script, you can access your dataset like this:

rows = read("leads")
for row in rows
visit(row.url)
record("url", row.url)
end

Each object in the dataset becomes an element in the rows array — with keys corresponding to the column headers (for CSV) or object fields (for JSON).


📌 Notes and Best Practices​

  • Datasets are read-only: you can't modify them from inside scripts.
  • If you need to update data, upload a new dataset with a different name.
  • You can access datasets in any script under your account.
  • Dataset size and row limits may apply — see Runtime Limits.