Oak Curriculum API

API endpoints

Search

Search for lessons that are related to your search term

5.1 Lesson search using lesson video transcripts

GET /search/transcripts

Search for a term and find the 5 most similar lessons whose video transcripts contain similar text.

Inputs (query)

Name
Type
Description
Example

q

string

A snippet of text to search for in the lesson video transcripts

Who were the romans?

Output (response)

Name
Type
Description

lessonTitle

string

The lesson title

lessonSlug

string

The lesson slug identifier

transcriptSnippet

string

The snippet of the transcript that matched the search term

Sample response

[
  {
    "lessonTitle": "The Roman invasion of Britain ",
    "lessonSlug": "the-roman-invasion-of-britain",
    "transcriptSnippet": "The Romans were ready,"
  },
  {
    "lessonTitle": "The changes to life brought about by Roman settlement",
    "lessonSlug": "the-changes-to-life-brought-about-by-roman-settlement",
    "transcriptSnippet": "when the Romans came."
  },
  {
    "lessonTitle": "Boudica's rebellion against Roman rule",
    "lessonSlug": "boudicas-rebellion-against-roman-rule",
    "transcriptSnippet": "kings who resisted the Romans were,"
  },
  {
    "lessonTitle": "How far religion changed under Roman rule",
    "lessonSlug": "how-far-religion-changed-under-roman-rule",
    "transcriptSnippet": "for the Romans."
  }
]

5.2 Lesson search using lesson title

GET /search/lessons

Search for a term and find the 20 most similar lessons with titles that contain similar text.

Inputs (query)

Name
Type
Description
Example

q

string

Search query text snippet

gothic

keyStage [optional]

string

Key stage slug to filter by, e.g. 'ks2' - note that casing is important here, and should be lowercase

ks2

subject [optional]

string

Subject slug to filter by, e.g. 'english' - note that casing is important here, and should be lowercase

english

unit [optional]

string

Optional unit slug to additionally filter by

Gothic poetry

Output (response)

Name
Type
Description

lessonSlug

string

The lesson slug identifier

lessonTitle

string

The lesson title

similarity

number

The snippet of the transcript that matched the search term

units

array[object]

The units that the lesson is part of. See sample response below

Sample response

[
  {
    "lessonSlug": "performing-your-chosen-gothic-poem",
    "lessonTitle": "Performing your chosen Gothic poem",
    "similarity": 0.20588236,
    "units": [
      {
        "unitSlug": "gothic-poetry",
        "unitTitle": "Gothic poetry",
        "examBoardTitle": null,
        "keyStageSlug": "ks3",
        "subjectSlug": "english"
      }
    ]
  },
  {
    "lessonSlug": "the-twisted-tree-the-novel-as-a-gothic-text",
    "lessonTitle": "'The Twisted Tree': the novel as a Gothic text",
    "similarity": 0.19444445,
    "units": [
      {
        "unitSlug": "the-twisted-tree-fiction-reading",
        "unitTitle": "'The Twisted Tree': fiction reading",
        "examBoardTitle": null,
        "keyStageSlug": "ks3",
        "subjectSlug": "english"
      }
    ]
  }
]