# Table API
> Turn data into a ready-to-paste table. Give it JSON — either an array of objects (columns are taken from the keys) or an array of arrays (the first row is the header) — or raw CSV, and get back a clean GitHub-flavoured Markdown table or a monospace ASCII (box-drawn) table with auto-sized columns. Markdown output supports left/center/right column alignment and escapes pipes; the CSV parser is RFC-4180 aware (quoted fields, embedded commas and newlines). Perfect for README and documentation generation, CLI and log output, changelogs, chat bots and pull-request comments. Pure local computation — no key, no third-party service, instant; send large datasets via POST. Live, nothing stored. 3 endpoints. Distinct from CSV parsing/analysis and from Markdown rendering.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/table-api/..."
```

## Pricing
- **Free** (Free) — 740 calls/Mo, 2 req/s
- **Starter** ($1/Mo) — 5,900 calls/Mo, 8 req/s
- **Pro** ($19/Mo) — 124,000 calls/Mo, 20 req/s
- **Mega** ($55/Mo) — 640,000 calls/Mo, 50 req/s

## Endpoints

### Table

#### `GET /v1/ascii` — Render an ASCII table

**Parameters:**
- `json` (query, required, string) — Array of objects or arrays (or use csv) Example: `[{"name":"Alice","age":30},{"name":"Bob","age":25}]`
- `csv` (query, optional, string) — CSV text (alternative to json)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/table-api/v1/ascii?json=%5B%7B%22name%22%3A%22Alice%22%2C%22age%22%3A30%7D%2C%7B%22name%22%3A%22Bob%22%2C%22age%22%3A25%7D%5D"
```

**Response:**
```json
{
    "data": {
        "rows": 2,
        "ascii": "+-------+-----+\n| name  | age |\n+-------+-----+\n| Alice | 30  |\n| Bob   | 25  |\n+-------+-----+",
        "columns": 2
    },
    "meta": {
        "timestamp": "2026-06-03T01:09:49.628Z",
        "request_id": "aedf3f81-8253-4535-8605-4990d3baea9c"
    },
    "status": "ok",
    "message": "Render an ASCII table",
    "success": true
}
```

#### `GET /v1/markdown` — Render a Markdown table

**Parameters:**
- `json` (query, required, string) — Array of objects or arrays (or use csv) Example: `[{"name":"Alice","age":30},{"name":"Bob","age":25}]`
- `csv` (query, optional, string) — CSV text (alternative to json)
- `align` (query, optional, string) — left|center|right Example: `left`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/table-api/v1/markdown?json=%5B%7B%22name%22%3A%22Alice%22%2C%22age%22%3A30%7D%2C%7B%22name%22%3A%22Bob%22%2C%22age%22%3A25%7D%5D&align=left"
```

**Response:**
```json
{
    "data": {
        "rows": 2,
        "columns": 2,
        "markdown": "| name | age |\n| :--- | :--- |\n| Alice | 30 |\n| Bob | 25 |"
    },
    "meta": {
        "timestamp": "2026-06-03T01:09:49.729Z",
        "request_id": "cdefa0fc-9ba9-4451-b881-f154aaf8e325"
    },
    "status": "ok",
    "message": "Render a Markdown table",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/table-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "name": "Table API",
        "notes": "For an array of objects, columns are the union of keys in first-seen order. For an array of arrays, the first row is the header unless you pass `headers`. Send large input via POST.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/markdown",
                "params": {
                    "csv": "CSV text",
                    "json": "array of objects/arrays, OR",
                    "align": "left|center|right (markdown)"
                },
                "returns": "a GitHub-flavoured Markdown table"
            },
            {
                "path": "/v1/ascii",
                "params": {
                    "csv": "CSV text",
                    "json": "array of objects/arrays, OR"
                },
                "returns": "a +---+ box-drawn ASCII table"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "Render tabular data as a Markdown table or a monospace ASCII table. Accepts JSON (an array of objects or an array of arrays) or CSV. Pure local, no key."
    },
    "meta": {
        "timestamp": "2026-06-03T01:09:49.822Z",
        "request_id": "92b482d5-a9ae-449f-a80d-612e259de7ec"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/table-api
OpenAPI spec: https://www.oanor.com/api/table-api/openapi.json
