PDF text extraction,
as a service

Upload a PDF via REST API or dashboard. Get back structured text, page count, and metadata โ€” instantly.

Open Dashboard Browse API

Features

โšก

Fast extraction

pdf-parse extracts text synchronously in memory โ€” no temp files, no disk I/O for the PDF.

๐Ÿ”‘

API key auth

Multi-tenant isolation. Each key maps to a tenant โ€” jobs are never shared across tenants.

๐Ÿ“‚

Job archiving

Jobs stay queryable after extraction. Archive them when done; unarchive or delete any time.

๐Ÿ–ฅ๏ธ

Dashboard

Upload PDFs, view extracted text, archive and delete jobs โ€” all from a browser UI.

Authentication

All /api/* endpoints and the dashboard require authentication.

API key (recommended for programmatic use)

Pass your key in the x-api-key header or as the ?apiKey= query param.

curl -H "x-api-key: pk_your_key_here" http://localhost:3970/api/jobs

SSO cookie (cl_session)

Set by the /login page. Used by the dashboard. Expires after 7 days.

Admin key

Pass x-admin-key: <ADMIN_KEY> to manage API keys via /admin/keys. Set via ADMIN_KEY env var (default: admin-dev-key).

API Reference

POST /api/jobs Upload a PDF and extract text

Multipart form upload. Returns a job object. Text is extracted synchronously.

pdfFile field โ€” PDF only, max 20MB
curl -X POST http://localhost:3970/api/jobs \
  -H "x-api-key: pk_your_key" \
  -F "[email protected]"

# Response
{
  "id": "abc123",
  "filename": "document.pdf",
  "status": "done",
  "pages": 3,
  "textLength": 4821,
  "size": 120456,
  "archived": false,
  "createdAt": 1712000000000
}
GET /api/jobs List active (non-archived) jobs

Returns an array of job summaries (no text). Sorted newest first.

curl http://localhost:3970/api/jobs \
  -H "x-api-key: pk_your_key"
GET /api/jobs/archived List archived jobs
curl http://localhost:3970/api/jobs/archived \
  -H "x-api-key: pk_your_key"
GET /api/jobs/:id Get full job including extracted text
curl http://localhost:3970/api/jobs/abc123 \
  -H "x-api-key: pk_your_key"

# Response includes full "text" field
PATCH /api/jobs/:id/archive Archive or unarchive a job
archivedboolean โ€” true to archive, false to unarchive
curl -X PATCH http://localhost:3970/api/jobs/abc123/archive \
  -H "x-api-key: pk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"archived": true}'
DELETE /api/jobs/:id Permanently delete a job
curl -X DELETE http://localhost:3970/api/jobs/abc123 \
  -H "x-api-key: pk_your_key"
POST /admin/keys Create an API key (admin)
tenantstring (required) โ€” tenant identifier
labelstring (optional) โ€” human-readable label
curl -X POST http://localhost:3970/admin/keys \
  -H "x-admin-key: admin-dev-key" \
  -H "Content-Type: application/json" \
  -d '{"tenant": "acme", "label": "Acme Corp"}'

# Response: { "key": "pk_...", "tenant": "acme", "label": "Acme Corp" }
GET /admin/keys List all API keys (admin)
curl http://localhost:3970/admin/keys \
  -H "x-admin-key: admin-dev-key"
DELETE /admin/keys/:key Revoke an API key (admin)
curl -X DELETE http://localhost:3970/admin/keys/pk_abc123 \
  -H "x-admin-key: admin-dev-key"