# Export a live public table

> Source: https://elaichi.ai/docs/api-reference/dashboards/public/exportpublicdashboardtable/

`POST /public/dashboard/{token}/widget/{key}/export`

Resource: **Public** · API: **Dashboards**

## Path parameters

- **`token`** _(string, required)_
  The unguessable link token
- **`key`** _(string, required)_
  The table widget key

## Query parameters

- **`tz`** _(string)_
  IANA zone for dates; an invalid one reads as UTC.

## Request body

- **`format`** _(string)_
  Allowed: `csv`, `ndjson`
- **`vc`** _(object)_
- **`filters`** _(object)_

## Code examples

### curl

```bash
curl -X POST 'https://api.elaichi.ai/public/dashboard/<token>/widget/<key>/export' \
  -H 'Content-Type: application/json' \
  -d '{"format":"csv","vc":{},"filters":{}}'
```

### JavaScript

```javascript
const body = {
  "format": "csv",
  "vc": {},
  "filters": {}
};

const response = await fetch('https://api.elaichi.ai/public/dashboard/<token>/widget/<key>/export', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

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

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/public/dashboard/<token>/widget/<key>/export"
headers = {
    "Content-Type": "application/json",
}
payload = {
    "format": "csv",
    "vc": {},
    "filters": {}
}

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