• Test
  • Introduction
  • Essential Concepts
  • Basic Features
  • Advanced Features
  • Add-on Services
  • Appendix
  • Deprecations
  • API (V2)
  • Download
  • Translations
  • LilxAPI

    LilxAPI is a simpler, flat version of xAPI. Each statement is required to have only three properties: actor, verb, and object. Each property is limited to a single value. Statements may be formed either as a JSON object with name-value pairs or as an array.

    LilxAPI (or Lil' xAPI) is a simpler, flat version of an xAPI statement that allows it to be easily stored in a finite data structure, such as a spreadsheet or single table of a SQL database. In this simplified approach, each statement is required to have only three properties: actor, verb, and object. Each property is limited to a single value. Statements may be represented either as a JSON object with name-value pairs or as an array (using the array keys provided in Table 1).

    Table 1

    Overview of the LilxAPI structure

    namedescriptionvalue formatdefaultexamplearray key
    actorThe identity of the actor.stringrequired"janedoe@fake.com, Jane Doe"
    "Jane Doe" or "janedoe1234" or "1234"
    verbThe action performed by the actor.human-readable termrequired"completed", "clicked", "interacted", "viewed", "answered", etc.1
    objectThe target of the statement or what the actor interacted with.urlrequired"https://edtechbooks.org/education_research/research"2
    resultThe outcome of the action.float
    contextContextual information about the action.stringnull"web"
    language_idThe language of the schema.ISO 639-1 Formaten"en" or "fr" or "sp"5
    timestampThe time of the interaction.ISO 8601 formatcurrent time"2023-11-10T12:34:56Z"6
    xapiThe fully rendered xAPI statement.jsonnull-7

    Example Statements

    An Actor Viewed a Page

    Object format

      "actor": "janedoe@fake.com",
      "verb": "viewed",
      "object": "https://edtechbooks.org/education_research/research"

    Array format

    ["janedoe@fake.com", "viewed", "https://edtechbooks.org/education_research/research"]

    An Actor Correctly Answered a Question

    Object Format

      "actor": "janedoe@fake.com",
      "verb": "viewed",
      "object": "https://edtechbooks.org/education_research/research#question1",
      "result": true


    Array Format

    ["janedoe@fake.com", "answered", "https://edtechbooks.org/education_research/research#question1", true]

    EdTech Books as LRS Example

    Storing LilxAPI Statements

    Retrieving LilxAPI Statements

    You can retrieve all LilxAPI statements associated with your API key at this endpoint:


    You can find your ETB API key by logging in and going to Account > Settings. You may then access the ETB LRS to access and download stored statements by going to Account > Developer.

    screenshot of lilxapi statements stored in ETB

    Google Sheets Automation

    You can create dashboards or graphs in Google Sheets to display data and import the data directly from a website using the built-in ImportData function. Sheets does not currently have an import feature for JSON, but you can append &format=csv to a LilxAPI call to receive the results as a csv. Here is an example endpoint:


    Excel Automation

    You can create dashboards and graphs in Excel to display data and use an automation script to retrieve or update data directly from the LRS. Here is an example automation script using the ETB LRS:

    const apiKey = "YOURAPIKEYHERE";
    interface ExcelRow {
    statement_id: number;
    author_id: number;
    actor: string;
    verb: string;
    object: string;
    result: string;
    context: string;
    language_id: string;
    timestamp: string;
    xapi: string
    async function main(workbook: ExcelScript.Workbook) {
    const data = await fetchData();
    const newWorksheet = workbook.getActiveWorksheet();
    const headingRange = newWorksheet.getRangeByIndexes(
    const dataRange = newWorksheet.getRangeByIndexes(
    dataRange.setValues(json.map(row => Object.values(row)));
    async function fetchData(): Promise<string[][]> {
    const apiUrl = "https://edtechbooks.org/api.v2.php?action=lilxapi_get&api_key=" + apiKey;
    const response = await fetch(apiUrl);
    if (!response.ok) {
    throw new Error(`Failed to fetch data. Status: ${response.status}`);
    const jsonData: ExcelRow[] = await response.json();
    return jsonData;

    This content is provided to you freely by Equity Press.

    Access it online or download it at https://equitypress.org/userguide/lilxapi.