# List Projects and Versions

## List Projects

Get the projects in your workspace:

```python
import roboflow

rf = roboflow.Roboflow(api_key="YOUR_API_KEY")
workspace = rf.workspace()

for project in workspace.list_projects():
    print(project["id"], project["name"], project["type"])
```

Each entry includes the project's id (URL slug), display name, project type, image count, and a few other metadata fields.

To work against a public Universe workspace, pass its slug:

```python
universe_ws = rf.workspace("roboflow-100")
```

## Get a Project

```python
project = workspace.project("my-detector")
```

Or use the top-level shortcut:

```python
project = rf.project("my-detector")
```

## List Versions

```python
for version in project.versions():
    print(version.version, version.name)
```

`project.versions()` returns `Version` objects you can call methods on directly (`download`, `train`, `delete`, etc.). For a lightweight dict response, use `project.list_versions()` or `project.get_version_information()`.

## Get a Version

```python
version = project.version(3)
```

Numeric - versions are 1-indexed.

## CLI equivalent

```bash
roboflow project list
roboflow version list -p my-detector
```

See [List Workspaces and Projects (CLI)](/developer/command-line-interface/list-workspaces-and-projects.md) and [Manage Versions (CLI)](/developer/command-line-interface/manage-versions.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/developer/python-sdk/list-projects-and-versions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
