API Documentation

Create shareable tables programmatically. PRO

On this page

Authentication

All Pro features require an API key. Pass it in the JSON request body as apiKey.

Keys are issued automatically after a $5 one-time purchase on Ko-fi and emailed to you. Format:

ts_live_xxxxxxxxxxxxxxxxxxxxxxxx
Lost your key? Use the key recovery form with your Ko-fi transaction ID and email — it's the fastest path. Or email markrhenz@table-share.org with your transaction ID for manual help.

Create a Table

POST /api/create

Creates a new shared table from raw row data. Works without an API key (free tier limits apply). Pro key unlocks higher limits and premium features.

Request body

FieldTypeRequiredDescription
dataarray<array>YesArray of rows, each row is an array of cell values
apiKeystringNoPro API key. Omit for free tier.
titlestringNoOptional title shown on table page (max 100 chars)
passwordstringNoPassword to protect the table PRO
expirynumberNoSeconds until expiry. Free: max 604800 (7d). Pro: 3600 to 7776000 (1h–90d)
noBrandingbooleanNoHide "Created with Table Share" footer PRO
noHeadersbooleanNoTreat first row as data, not headers

Response (201 Created)

{
  "id": "a1b2c3d4",
  "url": "https://table-share.org/t/a1b2c3d4",
  "passwordProtected": false
}

Example

curl -X POST https://table-share.org/api/create \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "ts_live_xxxxxxxxxxxxxxxxxxxxxxxx",
    "title": "Q2 Sales Report",
    "expiry": 2592000,
    "data": [
      ["Region", "Revenue", "Growth"],
      ["NA",     "$1.2M",   "+12%"],
      ["EU",     "$890K",   "+8%"],
      ["APAC",   "$540K",   "+22%"]
    ]
  }'

Fetch from URL PRO

POST /api/fetch-url

Server-side fetches a CSV/TSV from a public URL and turns it into a table. Pro key required.

Request body

FieldTypeRequiredDescription
urlstringYesHTTPS URL returning CSV/TSV text
apiKeystringYesPro API key
titlestringNoOptional title (max 100 chars)
passwordstringNoPassword protection
expirynumberNoSeconds until expiry (3600–7776000)
noBrandingbooleanNoHide footer branding
noHeadersbooleanNoTreat first row as data

Example

curl -X POST https://table-share.org/api/fetch-url \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "ts_live_xxxxxxxxxxxxxxxxxxxxxxxx",
    "url": "https://example.com/data.csv",
    "title": "Live CSV snapshot"
  }'

Get Stats

GET /api/stats

Public endpoint. Returns the lifetime count of tables created.

curl https://table-share.org/api/stats
// → { "total": 53 }

Error codes

StatusMeaningCommon cause
400Bad requestInvalid data shape, oversized payload, malicious content, exceeded tier limits
401UnauthorizedInvalid or expired API key on a Pro-only endpoint
403ForbiddenFree tier attempting a Pro feature (password, long expiry, branding removal)
429Rate limitedMore than 5 creates per minute from a single IP. Pro: higher limit.
500Server errorTransient. Retry with exponential backoff.

Error response shape

{ "error": "Human-readable message" }

Limits

Rate limits (per IP)

Tier limits

LimitFreePro ($5 one-time)
Max rows5005,000
Max columns50100
Max payload5 MB15 MB
Expiry7 days (fixed)1 hour – 90 days
Password protection—✓
Remove branding—✓
URL fetch—✓

CLI & MCP Server

Connect AI assistants directly to the hosted remote MCP server (no install needed), or pipe CSV, TSV, Markdown tables, and JSON from your terminal with table-share-cli.

Hosted Remote MCP Server (Zero Install)

MCP https://table-share.org/mcp

Streamable HTTP JSON-RPC 2.0 endpoint exposing the share_table tool. Free out of the box (up to 500 rows, 7-day expiry). Pass an optional Authorization: Bearer ts_live_... header for $5 Pro limits.

Terminal CLI

# Share any CSV, TSV, Markdown, or JSON file
npx table-share-cli report.csv --title "Q4 Sales"

# Pipe from SQL or stdin
cat results.csv | npx table-share-cli --title "Query Output"

Local MCP Server config (stdio via npx)

{
  "mcpServers": {
    "table-share": {
      "command": "npx",
      "args": ["-y", "table-share-cli", "--mcp"],
      "env": {
        "TABLE_SHARE_API_KEY": ""
      }
    }
  }
}

Works free out of the box (up to 500 rows, 7-day expiry). Set TABLE_SHARE_API_KEY with a $5 Pro key for 5,000 rows, 15 MB, 90-day expiry, password protection, and no branding.

Full examples

Python (requests)

import requests

API_KEY = "ts_live_xxxxxxxxxxxxxxxxxxxxxxxx"

resp = requests.post(
    "https://table-share.org/api/create",
    json={
        "apiKey": API_KEY,
        "title": "Q2 Sales",
        "expiry": 2592000,  # 30 days
        "data": [
            ["Region", "Revenue"],
            ["NA", "$1.2M"],
            ["EU", "$890K"],
        ]
    },
    timeout=10
)
resp.raise_for_status()
print(resp.json()["url"])

Node.js (fetch)

const API_KEY = "ts_live_xxxxxxxxxxxxxxxxxxxxxxxx";

const r = await fetch("https://table-share.org/api/create", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    apiKey: API_KEY,
    title: "Q2 Sales",
    expiry: 2592000,
    data: [
      ["Region", "Revenue"],
      ["NA", "$1.2M"],
      ["EU", "$890K"],
    ]
  })
});

if (!r.ok) throw new Error('HTTP ' + r.status);
const { url } = await r.json();
console.log(url);

Bash one-liner (CSV file → link)

cat data.csv | python -c "
import sys, json, csv, requests
rows = list(csv.reader(sys.stdin))
r = requests.post('https://table-share.org/api/create',
  json={'apiKey': 'ts_live_xxxxxxxxxxxxxxxxxxxxxxxx', 'data': rows})
print(r.json()['url'])
"
Need help? Email markrhenz@table-share.org or check the blog for guides.