Query SPARQL Documentation
Methods
Execute SPARQL query against latest dataset version, via GET
GET /sparql/{owner}/{id}
Execute SPARQL query against latest dataset version, via POST. This is good when you have a query string too long to pass via a URL.
POST /sparql/{owner}/{id}
Parameters
Parameters:
Parameter | Description | Parameter Type | Data Type |
---|---|---|---|
owner | Dataset owner username. Included in data.world dataset URL path, after domain. For example, jonloyens in https://data.world/jonloyens/an-intro-to-dataworld-dataset |
path | string |
id | Dataset id. Included in data.world dataset URL, after owner's username. For example, an-intro-to-dataworld-dataset in https://data.world/jonloyens/an-intro-to-dataworld-dataset |
path | string |
query | SQARQL query. Example value: SELECT * WHERE {?s ?p ?o.} LIMIT 10 |
query | string |
parameters | query | string | |
maxQueryTimeMillis | Timeout time. Default 120000 |
query | integer |
Response formats
application/json
(default)text/csv
text/turtle
Errors
HTTP Status Code | Reason |
---|---|
400 | Bad Request |
404 | Not found |
Error response Model:
{
"code": 0,
"message": "string",
"details": "string"
}
Request URL:
https://query.data.world/sparql/jonloyens/an-intro-to-dataworld-dataset?query=query=SELECT%20*%20WHERE%20%7B%3Fs%20%3Fp%20%3Fo.%7D%20LIMIT%2010
cURL:
curl 'https://query.data.world/sparql/jonloyens/an-intro-to-dataworld-dataset' \
-H 'Authorization: Bearer <API TOKEN>' \
-H 'Accept: text/csv' \
--data-urlencode 'query=PREFIX : <http://data.world/jonloyens/an-intro-to-dataworld-dataset/DataDotWorldBBallTeam.csv/DataDotWorldBBallTeam#>
SELECT * WHERE { [ :Name ?name ; :Height ?height ; :Handedness ?handedness ] } LIMIT 10'
Response Body:
name,height,handedness
Jon,"6'5""",Right
Rob,"6'7.5""",Left
Sharon,"6'3""",Right
Alex,"6'2""",Right
Rebecca,7',Right
Ariane,"5'8""",Left
Bryon,7',Right
Brett,6',Right
Matt,"5'5""",Right