Founding churches get 50% off for 12 monthsFounding churches: 50% offApply as a founding churchApply

Search

Search finds the teachings where a word or phrase was said, ranked by relevance.

Before you start

  • A key with teachings:read.

Search teachings#

GET/search?q=teachings:read

q is 2 to 300 characters. Search covers transcripts and approved notes, and returns teachings rather than passages: each hit has the teaching id, its title, and a url path on this API.

curl "$LECTERN_BASE_URL/v1/api/o/$LECTERN_SLUG/search?q=forgiveness" \
  -H "Authorization: Bearer $LECTERN_API_KEY"
{
  "status": true,
  "message": "ok",
  "data": [
    {
      "id": "tch_01m4h7zbsve4ybxjarahd3fpkh",
      "title": "Forgiveness that frees",
      "url": "/v1/api/o/grace-community-church/teachings/tch_01m4h7zbsve4ybxjarahd3fpkh"
    }
  ],
  "meta": {
    "request_id": "req_01m4h8nry7eq2bfwf822ry0vwm",
    "total": 1
  }
}
  • Limit a search to one branch (campus) with branch_id.
  • A key only searches what it can read. Keys without teachings:ingest or notes:generate find teachings with an approved note.
  • A search shorter than 2 or longer than 300 characters answers 422 (invalid_query or a validation error).

What to do with a hit#

  • Show the title and link to your own page for the teaching.
  • Read GET /teachings/{id} for details, .../notes for the approved note, or .../transcript to show where the phrase was said.
  • To answer a question rather than list teachings, use Ask.
Search is not Ask

Search lists teachings that mention your words. Ask reads the teaching and writes an answer with citations. Use search for a library page and Ask for a question box.

Next steps