Knowledge Graphs

Skip to end of metadata
Go to start of metadata
Table of Contents


The Knowledge Graph server is based on FactForge by Ontotext. FactForge integrates a subset of the Linked Open Data cloud (LOD) and provides inference and SPARQL querying on top of it. The underlying RDF engine of FactForge is GraphDB by Ontotext.


The following Linked Datasets are available for querying via the Knowledge Graph Server (FactForge):

See for more info

Ontologies and Vocabularies

The following ontologies and vocabularies are used:

Data Size

At present, the integrated datasets provide more than 5 billion RDF triples.

Service Endpoint

Knowledge Graph SPARQL endpoint GET, POST

HTTP Headers

Header name Required Description Valid values Default value
  • no (for GET)
  • yes (for POST)
Must be equal to "application/x-www-form-urlencoded" for POST
application/x-www-form-urlencoded n/a
Accept yes
Relevant values depend on the SPARQL query type
  • for graph queries (RDF): application/rdf+xml, text/plain, text/turtle, text/rdf+n3, text/x-nquads, application/rdf+json, application/trix, application/x-trig, application/x-binary-rdf;
  • for tuple queries (variable bindings): application/sparql-results+xml, application/sparql-results+json;
  • for boolean queries: application/sparql-results+xml, application/sparql-results+json, text/boolean
Accept-Encoding no
Set if the client supports transparent compression.
  • gzip
if omitted, response is not compressed

Request Parameters

Both GET and POST methods are supported. The GET method is preferred as it adheres to the REST architectural style. The POST method should be used in cases where the length of the (URL-encoded) query exceeds practicable limits of proxies, servers, etc. In case a POST request is used, the query parameters should be sent to the server as www-form-urlencoded data.

Parameter name
The query to evaluate
infer no
Specifies whether inferred statements should be included in the query evaluation. Inferred statements are included by default


GET /v1/FactForge/sparql?query=select%20*%20where%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20limit%202 HTTP/1.1
Accept: application/sparql-results+xml


POST /v1/FactForge/sparql HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Accept: application/sparql-results+xml


Response format

The response format depends on the query type and the selected Accept format parameter.
The following is an example response of a SPARQL Select query, serialized as application/sparql-results+xml:


Let's execute the following simple SPARQL query, listing the names of all European countries (from DBpedia):

# Countries in Europe
PREFIX dbp-ont: <>
PREFIX geo-ont: <>
PREFIX rdf: <>
PREFIX skos: <>
PREFIX dbpedia: <>

    ?country rdf:type dbp-ont:Country ;
             skos:prefLabel ?name ;
             geo-ont:parentFeature dbpedia:Europe .
} ORDER BY ?name

We can use a simple online tool like curl to execute the request to the RESTful service for the Knowledge Graph server:

Lets go step-by-step through the sample code above:

  1. we specify the API Key and secret - as already explained all S4 requests need a valid API key and secret pair
  2. we specify the S4 RESTful service to be used - in this case the SPARQL endpoint of the Knowledge Graph server. As part of the service endpoint URL we also provide the API key pair
  3. we have chosen to execute a simple SPARQL query listing the names of all European countries
  4. we make a RESTful request to the S4 service via the command line tool curl, providing the query (from step 3), the S4 service endpoint (from step 2) and we specify in the HTTP header that 1) this HTTP request type is "application/x-www-form-urlencoded" and 2) that the response format should be JSON ("application/sparql-results+json")

The result of the service invocation is a JSON file which looks like:

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.