Skip to main content

Public API

Extraction HTTP API

Extraktr provides an API to extract structured insights from conversation text.

Endpoint

Production (recommended for integrations): POST https://extraktr.com/api/extract— same Next.js proxy the web app and CLI use.

Backend service path: POST /extract on your API host (for example https://api.extraktr.com/extract). Request and response bodies are identical.

Request body

Send application/json. Conversation text must be in the raw_content field (required). Optional source_type helps normalization: slack, gmail, discord, teams, or generic.

Example JSON body

{
  "raw_content": "Chris: Can you finish the pricing page by Friday?\nJohn: Yes, I'll have a draft ready Thursday."
}

Optional headers

Authorization: Bearer YOUR_TOKEN

Omit for anonymous calls (stricter per-IP limits). Use a valid session JWT or a CLI / API token from workspace settings for higher limits and account-scoped behavior.

Response

HTTP 200 with application/json. Top-level fields include summary, tasks, decisions, risks, plus prompt_version and schema_version. Shapes match the OpenAPI schema on the backend (/docs and /openapi.json when exposed).

Example (illustrative; fields vary by thread)

{
  "summary": "Chris asked for the pricing page by Friday; John committed to a Thursday draft.",
  "tasks": [
    {
      "text": "Finish the pricing page",
      "owner": "John",
      "deadline": "Friday",
      "ambiguous": false,
      "confidence": 0.9,
      "source": {
        "text": "Chris: Can you finish the pricing page by Friday?",
        "source_index": null,
        "start_offset": null,
        "end_offset": null
      },
      "owner_confidence": null,
      "extraction_reason": null,
      "mention_count": 1
    }
  ],
  "decisions": [],
  "risks": [],
  "prompt_version": "",
  "schema_version": ""
}

curl

Drop the Authorization line for anonymous calls. Replace YOUR_TOKEN with a CLI/API token or bearer JWT the backend accepts.

curl

curl -X POST https://extraktr.com/api/extract \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"raw_content":"Chris: Can you finish the pricing page by Friday?\nJohn: Yes..."}'

CLI equivalence

Same request via CLI: pipe conversation text to extraktr extract --stdin (posts raw_content to the same route). Optional --bearer or EXTRAKTR_BEARER maps to Authorization: Bearer.

Shell

echo "Chris: Ship Friday?\nJohn: Yes." | extraktr extract --stdin

Integration events (preview)

On each successful extraction, the backend records an internal extraction.completed event (version 1) for future webhooks, Zapier-style connectors, and automations. This is metadata-only: no raw conversation text, no tokens, and no full summary string—only counts, presence flags, correlation ids, and coarse client attribution.

The event is always written to server logs. Signed-in users can optionally add one HTTPS webhook URL in Settings → Integration webhook: after each successful extraction for that account, Extraktr best-effort POSTs the same JSON to that URL (short timeout). Delivery runs after the extract response is sent; failures are logged and do not change the extract result. Verify payloads with X-Extraktr-Signature: v1=<hmac-sha256-hex> over the raw body.

Canonical payload shape (illustrative)

{
  "event_type": "extraction.completed",
  "event_version": "1",
  "occurred_at": "2026-03-29T12:00:00Z",
  "request_id": "…",
  "source_surface": "cli",
  "authenticated": true,
  "user_id": "… or null",
  "cli_version": "… or null",
  "source_tag": "… or null",
  "result": {
    "summary_present": true,
    "task_count": 1,
    "decision_count": 0,
    "risk_count": 0
  }
}

source_surface is one of website, cli, extension, api, or unknown. Optional request metadata.client_surface and User-Agent (e.g. Extraktr CLI) inform classification.

More detail: Full API reference (docs), Workspace API guide, CLI docs.