# Run Using the API

<figure><img src="https://2402701329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6wzqgDHj9mZbFxabiEbc%2Fuploads%2FrjltqnBCU5P0npWbxV9l%2FScreenshot%202025-03-29%20at%201.48.34%E2%80%AFPM.png?alt=media&#x26;token=56337095-1daa-4b14-a795-1f30ff7a76df" alt=""><figcaption><p>Running a named-paths group against one or more files</p></figcaption></figure>

Runs of a named-paths group take one of six forms. Three run the csvpaths in the group in serial, one after another. The other three run the csvpaths in the group in a breadth-first manner, line-by-line. Each approach has its advantages; though, in practice you most often don't have a reason to choose one over the other.

Regardless or serial or breadth-first or serial, there are three main options:&#x20;

* `collect_paths()` — Collect each matching line (and optionally, separately collect unmatched lines)
* `fast_forward_paths()` — Collect none of the file data, but still collect variables, metadata, errors, and printouts, as well as optionally transferring files and firing alerts
* `next_paths()` — Iterate line by line through the file receiving back the matched lines

The method names above are for serial runs. For breadth-first runs the methods are `collect_by_line()`, `fast_forward_by_line()`, and `next_by_line()`.

```python
from csvpath import CsvPaths
CsvPath().fast_forward_paths( pathsname="orders", filename="acme-orders" )
```
