Home › Resources & tools › SPARQL Playground (RDF Playground)

SPARQL Playground (RDF Playground)

This interactive tool allows you to experiment with running SPARQL queries against RDF datasets. You can use SPARQL federation to effectively join in the data from external SPARQL endpoints.

The RDF dataset to query.
The SPARQL query to execute.
Press the Run query button to execute the query.

What are SPARQL and RDF?

The Resource Description Framework (RDF) is a format for structured data that uses triples to represent information. A set of RDF triples, a.k.a. an RDF dataset, can be stored in a database or file and queried using the SPARQL query language (similar to how SQL works for relational databases).

What is SPARQL federation?

Federation is one of the key features of SPARQL that allows you to extend your queries to external data sources on the web and combine the results with your local data. This is done using the SERVICE keyword in SPARQL queries.

Here's a simple example of a federated query that retrieves additional data from an external endpoint:

PREFIX ex: <http://example.org/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT ?friend ?friendOfFriend
WHERE {
  ex:Alice foaf:knows ?friend .

  SERVICE <http://thirdparty.org/sparql> {
    ?friend foaf:knows ?friendOfFriend .
  }
}
SPARQL Playground (RDF Playground)
SPARQL Playground (RDF Playground)

All prices listed are in United States Dollars (USD). Visual representations of products are intended for illustrative purposes. Actual products may exhibit variations in color, texture, or other characteristics inherent to the manufacturing process. The products' design and underlying technology are protected by applicable intellectual property laws. Unauthorized reproduction or distribution is prohibited.