# Usage per workflow, highest first

> Source: https://elaichi.ai/docs/api-reference/spend-controls/spend/listautomationusage/

`GET /spend/usage/automation`

Resource: **Spend** · API: **Spend controls**

## Query parameters

- **`period`** _(string)_
- **`meter`** _(string)_

## Response body

- **`result`** _(array<object>)_
- **`next_cursor`** _(string,null)_
- **`prev_cursor`** _(string,null)_

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/spend/usage/automation' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/spend/usage/automation', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/spend/usage/automation"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())
```
