---
title: "For Each"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/nodetool/control/foreach
markdown: https://docs.nodetool.ai/nodes/nodetool/control/foreach.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/nodetool/control/foreach.md
---

# For Each

**Type:** `nodetool.control.ForEach`

**Namespace:** `nodetool.control`

## Description

Iterate over a list and emit each item sequentially.
    iterator, loop, list, sequence, repeat, enumerate, stream, collection

    Use cases:
    - Process each item of a collection in order
    - Drive downstream nodes with individual elements

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| input_list | `list[any]` | The list of items to iterate over. | `[]` |
| limit | `int` |  | `-1` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `any` |  |
| index | `int` |  |

## Related Nodes

Browse other nodes in the [nodetool.control](./) namespace.
