CINXE.COM
KBpedia SPARQL
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="/static/css/style.css"> <title>KBpedia SPARQL</title> </head> <body> <div style="float:left; margin-left: 484px; padding-top: 3px;"> <img id="logo-header" src="/static/imgs/kbpedia-logo-420-horz.png" height="75" alt="KBpedia Knowledge Structure" name="logo-header"/> </div> <div style="float:right; margin: 24px 500px 0 0;"><h1>SPARQL Form</h1></div> <div style="clear: both;"> </div> <div style="float:left; margin-left: 470px;"> <ul> <li><a href="https://kbpedia.org/">Home</a></li> <li><a href="https://kbpedia.org/knowledge-graph/">Knowledge Graph</a></li> <li><a href="">SPARQL</a></li> <li><a href="https://kbpedia.org/background/">Background</a></li> <li><a href="https://kbpedia.org/use-cases/">Use Cases</a></li> <li><a href="https://kbpedia.org/resources/">Resources</a></li> </ul> </div> <div style="clear: both;"> </div> <div> <div class="separator"> </div> <div id="container-content" style="margin: 30px 120px;"> <p> You may submit <a href="https://en.wikipedia.org/wiki/SPARQL">SPARQL</a> queries against the <a href="https://kbpedia.org">KBpedia</a> knowledge graph OR external sources using this form. You may also inspect <a href="https://kbpedia.org/docs/sparql-service/">additional sample queries</a> See further documentation for this <a href="https://kbpedia.org/docs/sparql-service/">SPARQL service</a>. </p> <h3>Sample KBpedia Query</h3> <p> Here is a sample internal query you may copy and paste into the text area below: </p> <pre> <code> PREFIX rc: <http://kbpedia.org/kko/rc/> PREFIX kko: <http://kbpedia.org/ontologies/kko#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> SELECT DISTINCT ?x ?label WHERE { ?x rdfs:subClassOf rc:Bird. ?x skos:prefLabel ?label. } </code> </pre> <h3>Sample External Query</h3> <p> Here is a sample external query you may copy and paste into the text area below; make sure and also provide external query URL below: </p> <pre> <code> PREFIX schema: <http://schema.org/> SELECT ?item ?itemLabel ?wikilink ?itemDescription ?subClass ?subClassLabel WHERE { VALUES ?item { wd:Q25297630 wd:Q537127 wd:Q16831714 wd:Q24398318 wd:Q11755880 wd:Q681337 } ?item wdt:P910 ?subClass. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } </code> </pre> <h3>Enter your SPARQL query in the text box below:</h3> <form action="/submit" method="post" target="q_result"> <textarea name="q_submit" style="width:955px; height:300px;"></textarea> <br /><br /> <p>External Query URL: <input type="url" name="q_url" value="https://query.wikidata.org/sparql" size="63"></p> <br /> <label for="selectSource">Select Source:</label> <select name="selectSource"> <option value="kbpedia" selected>KBpedia</option> <option value="external">External</option> </select> <label for="selectFormat">Select Results Format:</label> <select name="selectFormat"> <option value="owlready" selected>owlready2</option> <option value="rdflib">RDFLib</option> <option value="rdfxml">RDF/XML</option> <option value="xml">XML</option> <option value="json">JSON</option> <option value="html">HTML</option> <option value="txt">Text</option> <option value="csv">CSV</option> </select> <input type="submit" value="Execute Query" /><br /> </form> <h3>Results:</h3> <iframe name="q_result" scrolling="auto" style="width:955px; height:300px; border: 0.5px solid #333;"> </iframe> </div> <div id="footer"> <p class="copyright" style="font-size: 10px; margin: 24px auto; display: table;"> 2016-2020 漏 <img src="/static/imgs/16x16_orange.png" alt="Cognonto Corp." style="vertical-align: middle;"> <a href="http://kbpedia.org" style="font-size: 10px;">Cognonto Corp.</a> All Rights Reserved. </p> </div> </body> </html>