SemwidgJS is a JavaScript based library for displaying Semantic Widgets that enriches websites with UI elements whose data is queried from SPARQL endpoints. SemwidgJS supports creation of simple UI elements such as labels and links, interactive elements for data input and selection that can manipulate other widgets, but also complex elements for displaying charts and maps are available.

While the data is queried from publicly available semantic databases, SemwidgJS otherwise works entirely on the client side. Thus no additional software is required. Widgets are declared directly within the HTML code and automatically processed after loading the website. For this purpose, only the SemwidgJS file must be included into the HTML document. To simplify data queries and thus be able to address a larger audience than comparable tools do, we developed SemwidgQL – a simple query language that is translated into SPARQL.

With SemwidgJS website authors can integrate simple data into their website. Furthermore, the internal event system and the ability to manipulate other widgets enables them to create complex Web applications. Changes which are made to widgets or the Document Object Model of a website, either by another widget or an external script will trigger an event the widgets can react on. In the simplest case the widget is reloaded, using the updated data.


SemwidgQL is a simple Path Query Language for Linked Data, starting with a predefined resource in the Linked Data graph. Linked Data is based on the RDF data model. Information is represented in statements, called triples composed of subject, predicate and object. The object of a triple can be a literal such as a number or string, but also a separate Linked Data resource that is the subject of other triples.

SemwidgQL is translated into SPARQL – the standard query language for Linked Data – and can thus be used to query almost any public Linked Data endpoint. The intention behind SemwidgQL is not to replace or extend SPARQL. It is merely intended to simplify requesting instance data for users who are not familiar with the techniques of the Semantic Web.

SemwidgQL is limited to the traversal of the Linked Data Graph plus simple filter functions. The traversal is indicated by the dot notation, which is reminiscent of the syntax of object-oriented programming. Filters are enclosed in parentheses and refer to the previously defined property. Filters can be shortened by certain keywords.

Due to this straightforward syntax, an editor can easily provide assistance during the query creation process. Available properties of a given resource can be requested and be used for an auto-complete/-suggest feature. The same applies to the possible filter functions. We have developed an basic editor for creating SemwidgQL queries that offers the user such assistance.


  • JavaScript
  • Linked (Open) Data

Further information

Related research topic


Jürgen Ziegler

Full Professor


Timo Stegemann

Former team member


Investigating Learnability, User Performance, and Preferences of the Path Query Language SemwidgQL Compared to SPARQL

SemwidgJS: A Semantic Widget Library for the Rapid Development of User Interfaces for Linked Open Data