made by VocPrez  2.5


This page allows you to lodge SPARQL queries against the triplestore (graph database) that stores all of this systems' vocabularies'.

Use the interactive Query UI below to lodge queries interactively or send queries directly to the system using the instructions below that.

Interactive UI

Enter SPARQL queries in the text box below to lodge them interactively:

Example Queries

Concept Count

Here is an example query you can copy 'n paste into the Query UI text area above to test with. It counts the number of vocabulary Concepts in the all vocabularies in this system and will return an integer:

PREFIX skos: <>

SELECT (COUNT(?c) AS ?count)
    ?c a skos:Concept .


Here is another example. It returns the URI and prefLabel(s) of 5 random Concepts on this system:

PREFIX skos: <>

SELECT ?c ?pl
    ?c a skos:Concept ;
       skos:prefLabel ?pl .

Concept Schemes

This query returns a sorted list of NVS' Collections' URIs and their titles (prefLabels):

PREFIX skos: <>

SELECT ?c ?pl
    ?c a skos:Collection ;
       skos:prefLabel ?pl .

Direct Queries

The SPARQL endpoint for this system is:

If you would like to lodge queries directly against this SPARQL endpoint without using the Query UI above, first create the query, URL-encode it, and lodge it like this:{YOUR_QUERY_URL_ENCODED}

You can use the query encoder below to URL-encode your query.

Machine-readable responses

If you lodge your query as above with a web browser, the system will place it in the interactive UI text area (above) and you will see the result below that.

To obtain a machine-readable response to your query, you must supply an HTTP Accept header for the type of response you would like, in accordance with the SPARQL Protocol standard.

For example, to get a SPARQL JSON format response for {YOUR_QUERY_URL_ENCODED}, use the curl program like this:{YOUR_QUERY_URL_ENCODED}
-H 'Accept: application/sparql-results+json'

SPARQL response Accept Headers

The following Media Types are to be used for machine-readable responses:

  • SPARQL response formats:
    • application/sparql-results+json
    • text/csv
    • text/tab-separated-values
  • RDF response formats:
    • text/turtle
    • application/rdf+xml
    • application/ld+json
    • text/n3
    • application/n-triples

If you omit one of the above headers, your query will be placed into this page and the result displayed interactively.

If the header you've included doesn't match the format of the SPARQL response type, you will receive that response type's default format, e.g. text/turtle for CONSTRUCT queries, application/sparql-results+json for SELECT queries.

GET & POST queries

You can lodge both GET and POST queries against this system, as per the SPARQL Protocol standard.

Query Encoder

Enter your SPARQL query into this text box and click "URL Encode" to URL encode it. That will generate a single encoded string with spaces replaced by "%20" and other character replacements which you can then use in place of {YOUR_QUERY_URL_ENCODED} above.

You might like to test out your query first using the Query UI above too.