Query with Comunica

On this page

    The following guides explain how to execute queries in different environments, such as live in the browser, in JavaScript applications, or the CLI.

    Getting started with querying

    Basic guides on how to easily get started with querying.

    Querying from the command line

    Execute SPARQL queries directly from the command line.

    Querying local files from the command line

    Execute SPARQL queries over local RDF files directly from the command line.

    Querying in a JavaScript app

    Execute SPARQL queries from within your application using the JavaScript API.

    Querying in a JavaScript browser app

    Execute SPARQL queries from within your client-side browser application using the JavaScript API.

    Querying from a Docker container

    Execute SPARQL queries within a Docker container.

    Setting up a SPARQL endpoint

    Allow querying over HTTP via the SPARQL protocol

    Setting up a Web client

    Set up a user-friendly static Web page where SPARQL queries can be executed client-side

    Query using the latest development version

    If you want to make use of the latest changes that are not released yet

    Usage showcase

    Examples of where Comunica is used.

    Querying FAQ

    Frequently asked questions about using Comunica.

    Advanced querying

    Advanced guides on how to get the most out of Comunica.

    HTTP Basic Authentication

    Send authenticated HTTP requests by including username and password.


    When remote sources are requested, caching allows them to be reused in the future.

    Passing a context

    A context can be passed to a query engine to tweak its runtime settings.

    Federated Querying

    Query over the union of data within any number of sources


    Using the power of JSON-LD contexts, GraphQL queries can be executed by Comunica


    HDT offers highly compressed immutable RDF storage.


    Loggers can be set to different logging levels to inspect what Comunica is doing behind the scenes.


    Using the Memento protocol, time travel queries can be executed.

    HTTP Proxy

    All HTTP requests can optionally go through a proxy.


    To achieve maximum interoperability between different JavaScript libraries, Comunica builds on top of the RDF/JS specifications.

    Querying over RDF/JS sources

    If the built-in source types are not sufficient, you can pass a custom JavaScript object implementing a specific interface.

    Result formats

    Query results can be serialized in different formats.


    Solid – the Web-based decentralization ecosystem – can be queried with Comunica.

    Source types

    Comunica detects and handles different types of sources.

    SPARQL query types

    Different SPARQL query types are possible, such as SELECT, CONSTRUCT, ASK, ...

    Supported specifications

    Comunica supports several RDF-related specifications