Feb 3, 2026
Dynamic Actor memory
New
Actor
Dynamic Actor memory is a new feature that lets Actor developers define an expression that automatically adjusts the memory allocation for a run based on its input and run options.
Instead of using a fixed memory value or requiring users to tune memory manually, this expression is evaluated for every run. This improves performance for large inputs, reduces costs for small ones, and requires less manual configuration from users.
How it works
Before a run is started, its memory is determined in this order
- Run level override: If the user provides explicit memory when starting a run (via UI or API), it always takes precedence
- Dynamic memory expression: If no run-level override is provided, the platform evaluates the dynamic memory expression defined in actor.json. The expression can use values from the input and run options to calculate memory.
- Actor default memory: Used when no valid expression is defined or when its evaluation fails
- Platform and user limits: The result is rounded to the nearest power of two and set to respect the minimum and maximum allowed memory set by the Actor developer, as well as platform and user limits
Expressions support arithmetic operations, math functions, conditionals (based on MathJS), and safe property access with get().
As an example, let’s say an Actor accepts a list of URLs to scrape, and the developer would want to allocate 64 MB of memory for each URL, but never more than 4 GB. The expression could look like this:
min(get(input, 'startUrls.length', 1) * 64, 4096)
For more information on how to configure expressions for your Actors and how dynamic memory works, see the docs.





