> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/platform/workspaces/list-workspaces-and-projects.md).

# List Workspaces and Projects

List workspaces, projects, versions, and trained models using the REST API, Python SDK, and CLI.

## About

The workspace endpoint returns your Workspace and every Project in it, with each Project's type, image and annotation counts, versions, and splits. Use it to find Project IDs before you upload data or export a version, then look up a Project's versions and trained models. The same data is available through the HTTP API, the Python SDK, and the CLI.

## HTTP API

### List Projects

Returns the Projects in the Workspace your API key belongs to.

{% openapi src="/files/uKBN3mP5iMIeOfjUC6Wo" path="/{workspace}" method="get" %}
[workspaces.yaml](https://4160767428-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YMZNIiZMBdlCHUDeZMP%2Fuploads%2Fgit-blob-cca0758f0149fdf0990e84e895042d80106b9955%2Fworkspaces.yaml?alt=media)
{% endopenapi %}

### Get a Project and List Versions

Returns a Project and its versions, newest first. Each version includes the model trained on it, if there is one.

{% openapi src="/files/uKBN3mP5iMIeOfjUC6Wo" path="/{workspace}/{project}" method="get" %}
[workspaces.yaml](https://4160767428-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YMZNIiZMBdlCHUDeZMP%2Fuploads%2Fgit-blob-cca0758f0149fdf0990e84e895042d80106b9955%2Fworkspaces.yaml?alt=media)
{% endopenapi %}

### List Project Models

Returns every trained model in a Project, including models from a [Neural Architecture Search](https://docs.roboflow.com/models/train/neural-architecture-search) run. Pass `group` to list the models from one run.

With [Sign In With Roboflow](https://docs.roboflow.com/reference/authentication/authentication/sign-in-with-roboflow-getting-started), send the access token in the `Authorization: Bearer` header with the `model:infer` scope instead of `api_key`.

{% openapi src="/files/uKBN3mP5iMIeOfjUC6Wo" path="/{workspace}/{project}/models" method="get" %}
[workspaces.yaml](https://4160767428-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YMZNIiZMBdlCHUDeZMP%2Fuploads%2Fgit-blob-cca0758f0149fdf0990e84e895042d80106b9955%2Fworkspaces.yaml?alt=media)
{% endopenapi %}

## Python SDK

Get a `Workspace` handle for the workspace your API key authenticates against:

```python
import roboflow

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

Each Roboflow API key is scoped to a single workspace. To work against a different workspace, use a different API key (or, for public Universe workspaces, pass the workspace slug):

```python
# Public Universe workspace - only your API key is needed.
public_ws = rf.workspace("roboflow-100")
```

### Workspace properties

The returned `Workspace` exposes:

* `workspace.url` - the workspace's URL slug (e.g. `my-workspace`).
* `workspace.name` - the workspace's display name.
* `workspace.list_projects()` - projects in the workspace, as a list of dicts.
* `workspace.projects()` - same data as `list_projects()` but returned as a `Project` object list (older alias).
* `workspace.list_folders()` - see [Manage Folders](https://docs.roboflow.com/datasets/manage/project-folders#python-sdk).
* `workspace.list_workflows()` - see [Manage Workflows](https://docs.roboflow.com/workflows/manage/manage-workflows#python-sdk).
* `workspace.get_plan()` and `workspace.get_usage()` - see [Workspace Plan and Usage](https://docs.roboflow.com/platform/billing-and-plans/view-credit-usage.md#python-sdk).

### 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

### List Workspaces

You can retrieve a list of all Workspaces of which you are a member with the CLI.

To list Workspaces with the CLI, use the following command:

<pre class="language-bash"><code class="lang-bash"><strong>roboflow workspace list
</strong></code></pre>

This will return a list of Workspaces with their corresponding application links and Workspace IDs:

```
NAME             ID               DEFAULT
My Workspace     my-workspace     *
Other Workspace  other-ws
```

To get the output as JSON (for use in scripts or AI agents):

```bash
roboflow workspace list --json
```

```json
[
  {"name": "My Workspace", "url": "my-workspace", "link": "https://app.roboflow.com/my-workspace", "default": true},
  {"name": "Other Workspace", "url": "other-ws", "link": "https://app.roboflow.com/other-ws", "default": false}
]
```

### List Projects in a Workspace

To list projects in a workspace, use the following command:

```bash
roboflow project list
```

If you have a default workspace configured, the `-w` flag is optional. Otherwise, specify it:

```bash
roboflow project list -w WORKSPACE_ID
```

This will return a table of Projects:

```
NAME              ID                              TYPE                VERSIONS  IMAGES
my-dataset        my-workspace/my-dataset         object-detection    3         500
classifier        my-workspace/classifier         classification      1         200
```

To get the output as JSON:

```bash
roboflow project list --json
```

### Get a Project

To get detailed information about a project, use the following command:

```bash
roboflow project get PROJECT_ID
```

You can use the resource shorthand - no need to specify the workspace separately:

```bash
roboflow project get my-dataset              # uses default workspace
roboflow project get my-workspace/my-dataset  # explicit workspace
```

This will return information about the project including its versions:

```
Project: my-dataset
  ID: my-workspace/my-dataset
  Type: object-detection
  Images: 500
  Versions: 3
  Classes: car (200), truck (150), bus (150)
  Link: https://app.roboflow.com/my-workspace/my-dataset
```

To get the full JSON response:

```bash
roboflow project get my-dataset --json
```

## MCP Server

Connect your AI agent to the [MCP Server](https://docs.roboflow.com/agents/mcp-server.md) and it can list what is in your workspace with these tools:

<table data-search="false"><thead><tr><th width="290">Tool</th><th>Description</th></tr></thead><tbody><tr><td><code>projects_list</code></td><td>List projects in the workspace.</td></tr><tr><td><code>projects_get</code></td><td>Get project detail including versions, classes, splits, and trained models.</td></tr></tbody></table>
