Inrupt Vocabulary Libraries#

Inrupt provides the following vocabulary libraries that provide convenience objects (as JavaScript classes) that contain static constants for common identifiers used across Solid (and RDF in general). Rather than hardcoding the identifiers, developers can use these classes instead.




Inrupt vocab-common-rdf is a library that provides convenience objects for many RDF-related identifiers, such as the Person and familyName identifiers from the vocabulary from Google, Microsoft and Yahoo!


Inrupt vocab-solid is a library that provides convenience objects for many Solid-related identifiers.


Inrupt vocab-inrupt-core is a library that provides convenience objects for Inrupt-related identifiers.

Inrupt vocab-common-rdf is a client library that bundles constants that refer to terms in some pre-existing vocabularies. Applications can use these constants to read and write data instead of specifying the URL. For example:

Full Vocabulary URI

vocab-common-rdf Constant





Convenience Object Naming Scheme

The convenience object names, in general, match the term names in the original RDF unless the use of the term name results in an illegal variable name for the programming language. For example:

  • 1:1 Correspondence

    For the VCARD vocabulary term bday (IRI, the corresponding convenience object in the vocab-common-rdf library is VCARD.bday.

  • Transform Illegal Property Name

    In JavaScript, variable names cannot contain hyphens -. As such, the Inrupt vocabulary libraries replaces the hyphens with underscores _. For example, the VCARD vocabulary term given_name (IRI corresponds to VCARD.given_name.

If you receive an undefined error when using the convenience object from one of the libraries:

  1. Check the term name.

  2. Inrupt’s vocabularies contains many, but not all, the common identifiers. If your term is not included in the library, Inrupt’s libraries provide a namespace helper function NS() to help with the IRIs.

    That is, if VCARD vocabulary term someTermMissingFromLibrary with IRI, you can use VCARD.NS("someTermMissingFromLibrary") instead of specifying the full IRI.


You can use npm to install the libraries; e.g., to install the vocab-common-rdf library:

npm install @inrupt/vocab-common-rdf

See also:

Additional References#