# get\_batches

`imerit_ango.sdk.SDK.`

## get\_batches(project\_id)

Get all batches from your project.

### Parameters

* **project\_id:** string
  * The unique identifier for the project. You can find the project ID in [the user interface](/sdk/sdk-documentation.md#project-ids) or retrieve it using the [`list_projects`](/sdk/sdk-documentation/project-level-sdk-functions/list_projects.md) function.

Returns:

* **output:** List\[dict]
  * A list of dictionaries, each containing the batch’s name and unique identifier.

### Example:

{% tabs %}
{% tab title="python" %}

```python
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')

ango_sdk = SDK(api_key)

batches = ango_sdk.get_batches(project_id=project_id)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -s -X GET "https://imeritapi.ango.ai/v2/project/$PROJECT_ID" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  | jq '.data.project.batches'
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Output</summary>

```json
[
  {
    "name": "Batch Name 1",
    "_id": "Batch ID 1"
  },
  {
    "name": "Batch Name 2",
    "_id": "Batch ID 2"
  },
  {
    "name": "Batch Name 3",
    "_id": "Batch ID 3"
  }
]
```

</details>

{% hint style="info" %}
**See also**

[create\_batch](/sdk/sdk-documentation/project-level-sdk-functions/create_batch.md), [assign\_batches](/sdk/sdk-documentation/project-level-sdk-functions/assign_batches.md)
{% endhint %}


---

# 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.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/get_batches.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.
