xAPI.js
Strongly typed TypeScript client for the xAPI 1.0 Statement and State APIs
The facts
- Licence
- MIT — OSI approved
- Pricing
- Open source
- Deployment
- Embedded in your own application
- Platforms
- Library · Web
- Documentation
- xapijs.dev/xapi-wrapper-library — opens in a new tab
- Source code
- github.com/xapijs/xapi — opens in a new tab
Standards support
Every line says where the claim came from. We do not test conformance ourselves and we issue no badge of our own.
| Standard | Supported | Provenance | Checked | Note |
|---|---|---|---|---|
| SCORM 1.2 | Not stated | — | — | — |
| SCORM 2004 | Not stated | — | — | — |
| xAPI | Yes | editor-checked · 24 Aug 2026— source, opens in a new tab | src/constants/Versions.ts declares the supported values as "1.0.0" | "1.0.1" | "1.0.2" | "1.0.3", and the client sets X-Experience-API-Version accordingly. xAPI 2.0 is not among them. Read in source, August 2026. | |
| cmi5 | No | editor-checked · 24 Aug 2026 | Not in this package. The maintainers publish cmi5 support separately as @xapi/cmi5 in the github.com/xapijs/cmi5 repository, which is not covered by this listing. | |
| AICC | Not stated | — | — | — |
| LTI | Not stated | — | — | — |
- Claimed
- — the vendor states it. We have not confirmed it.
- Checked
- — an editor confirmed it on the date shown.
- Verified
- — an official registry lists it, and we link to the entry.
Editor's notes
xAPI.js is the library to reach for when you are writing xAPI code in TypeScript and want the compiler to catch malformed statements before an LRS does. It covers the Statement, State, Agent Profile and Activity Profile resources, ships helpers for the awkward parts — ISO 8601 duration calculation, parsing TinCan and xAPI launch parameters out of the query string, basic-auth encoding — and lets you swap the HTTP layer between fetch and axios.
The typing is the point of difference. Most xAPI wrappers hand you an object and hope; here the statement shape, the verb constants and the resource paths are all declared, so the common failure mode of a statement rejected for a missing or mis-nested field becomes a build error.
It stops at xAPI 1.0.x. The version union in the source runs 1.0.0 to 1.0.3 and nothing wider, and cmi5 is a separate package under the same organisation rather than part of this one. Neither is a defect — the scope is deliberate — but it does mean this is a Statement API client, not a cmi5 runtime.
Fifty-one stars is modest for how widely it is quietly used; releases are irregular, with 3.0.0 in September 2024 and 3.0.3 in April 2026. That cadence suits a library whose target specification has not moved. Safe to depend on.
Listed on scorm-tools.com
Maintainers and vendors are welcome to show the listing badge in a README or on a product page. It is free, it does not require a claim, and there is nothing to buy.
Get the embed code