How to use SparqlProxy

From Data-gov Wiki

Jump to: navigation, search
Infobox (How-To) edit with form
  • name: How to use SparqlProxy

  • description: a tutorial for using SparqlProxy to connect RDF/SPARQL world with Web visualization tools
  • creator(s): Li Ding
  • created: April 16, 2010
  • relation(s): SparqlProxy
  • modified: 2010-5-8



RESTful API documentation

SparqlProxy is a RESTful Web Service. Check for the most up-to-date parameter descriptions and examples.

Service URL


  • query: encoded String of SPARQL query
  • query-uri : URI of SPARQL query
  • service-uri: URI of SPARQL endpoint
  • output: output format. The following values are support
xml - SPARQL XML Bindings
exhibit - Simile Exhibit JSON
gvds - Google Visualization JSON
csv - CSV
html - HTML table

Using SparqlProxy in Javascript

A query to a specific triple store (typical usage)

 var queryloc = "";
 var service  = "";
 var queryurl = ""
                 + "output=gvds"
                 + "&service-uri=" + encodeURIComponent(service)
                 + "&query-uri=" + encodeURIComponent(queryloc) ;

A query with from clause can be issued to a default SPARQL query service which load dataset on the fly.

 var queryloc = "";
 var queryurl = ""
                 + "output=gvds"
                 + "&query-uri=" + encodeURIComponent(queryloc) ;

Using SparqlProxy via Web Interface

There are two alternative options to use SparqlProxy

Option1 - Run SPARQL query.

You may type a SPARQL query into the SPARQL query: text area. Clicking the query button will submit the query to the SPARQL endpoint specified in the SPARQL service (URL) field. Once the SPARQL service URL returns the SPARQL XML Bindings, SparqlProxy transforms them into the format specified by the radio buttons (Google Viz/JSON, Exhibit/JSON, SPARQL/JSON, SPARQL/XML, HTML, CSV).

Option2 - Run SPARQL query (by URI)

This option performs the same function as Option 1, but accepts a URL for a SPARQL query instead of using the text entered in an input box. This requires that you save a SPARQL query into a text file available on the web.

Facts about How to use SparqlProxyRDF feed
Dcterms:created16 April 2010  +
Dcterms:creatorLi Ding  +
Dcterms:descriptiona tutorial for using SparqlProxy to connect RDF/SPARQL world with Web visualization tools
Dcterms:relationSparqlProxy  +
Foaf:nameHow to use SparqlProxy
Skos:altLabelHow to use SparqlProxy  +, how to use sparqlproxy  +, and HOW TO USE SPARQLPROXY  +
Personal tools
internal pages