The research API is not live yet. You can sign in and create an API key; searches and payment do not work yet.

Quickstart

From an API key to a cited record: one request to start a search, one to read the results.

Planned for the research API (milestone M5). Until it ships, the search and record endpoints return 404 not_found. Keys and GET /v1/key work now.

1. Get a key

Sign in with GitHub or Google, then create a key on the keys page. The key is shown once. Store it in an environment variable called LINEAGE_API_KEY.

export LINEAGE_API_KEY=lin_sk_test_...

Check the key before you build on it. GET /v1/key returns the key id, its prefix, its limits and your balance in credits. This call works today.

curl https://api.lineage.rexstjohn.com/v1/key \
  -H "Authorization: Bearer $LINEAGE_API_KEY"

Send the person you are looking for as plain text. Set budget_credits so the search stops before it spends more than you allow. The response is 202 with a search id.

curl https://api.lineage.rexstjohn.com/v1/searches \
  -H "Authorization: Bearer $LINEAGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Johann Weber, born about 1846 in Hesse, emigrated to Ohio",
    "depth": "quick",
    "budget_credits": 10
  }'
{ "id": "srch_...", "status": "queued" }

3. Read the results

Poll the search, or add ?stream=true to receive Server-Sent Events as each step finishes. A quick search reads indexed sources only. A deep search can take minutes, so long-running agents should pass webhook_url instead of holding a connection open.

curl https://api.lineage.rexstjohn.com/v1/searches/srch_... \
  -H "Authorization: Bearer $LINEAGE_API_KEY"

Every record carries a citation: the source, a locator such as a roll, page, line or image number, a link, and the time it was retrieved. A record without a citation is dropped, never returned. Records that are not online come back in not_online with the office that likely holds them.

Good to know