Working with Lists in BAS
The List module in Browser Automation Studio - store, iterate, sort and transform collections of data in memory, and how lists differ from resources.
All articles in the guide Browser Automation Studio · 48
Whenever a bot handles “a bunch of things” - a set of links, parsed rows, a batch of values - it holds them in a list. The List module is the standard in-memory collection in BAS, with all the operations you’d expect from arrays in any language.
What a list is
A list is an ordered set of elements in one container. It lets you work with a collection of data, iterate over it, save it to a file and reload it, and repeatedly pass over its elements. Within a single thread, it’s where your working data lives.
The operations
Building and reading.
- Create list - start a new collection.
- Add element / Insert element - append, or place at a specific position.
- Get element / First element / Last element / Random element - read by position or pick one at random.
- Set element - overwrite the item at an index.
Removing.
- Delete by index / Delete by value - drop an item by position or by matching content.
- Clear list - empty it.
Querying.
- Count elements - how many items it holds.
- Search element / Get index - find an item and its position.
Transforming.
- Sort - order the elements.
- Reverse list - flip the order.
- Copy list - duplicate it.
- Combine lists - merge two lists into one.
- Compare lists - check whether two lists match.
- Join to string - flatten the list into a single string, e.g. comma-separated.
Lists vs resources
A list is the right tool for data inside one thread. The moment many threads need to pull from the same shared pool - a list of accounts split across 100 workers - switch to the Resources module, which handles distribution and the concurrency conflicts a plain list can’t. Rule of thumb: lists for local working data, resources for shared run input.
FAQ
What is a list in BAS?
A list is an ordered collection of elements held in one container. You add, read, sort, search and transform its items, and you can save it to a file or load one from a file. It is the standard way to hold a set of data while a bot works.
When should I use a list versus a resource in BAS?
Use a list for data within a single thread. Use a resource when many threads must pull from the same pool safely, because the Resources system handles distribution and concurrency that a plain list does not.
- Browser Automation Studio: The Complete Practical GuideGuide
- Building Your First Bot in Browser Automation StudioA step-by-step walkthrough of creating your first working BAS bot - from a blank project to a flow that navigates, extracts data, and runs in multiple threads.
- Setting Up Proxies in Browser Automation StudioHow to configure proxies in BAS the right way - proxy types, per-thread assignment, rotation, and the checks that keep multi-account bots from getting flagged.
- Finding Elements in BAS: Selectors That Don't BreakHow element search works in Browser Automation Studio - CSS vs XPath selectors, why recorded ones break, and how to write selectors that survive page changes.
Done for you
Rather not build it yourself? I will build a BAS bot for your task
Multithreading, proxies, antidetect profiles and scheduled runs. The whole project and every access stay with you.
from $300 · 3 to 7 days
"Pavel is a great specialist, he delivered the parser in a few hours. I will keep ordering from him. Huge thanks for the professionalism and the speed."