Skip to content

Instantly share code, notes, and snippets.

@ColinMaudry
Last active August 29, 2015 14:22
Show Gist options
  • Save ColinMaudry/6845c44b00ec9a85aadb to your computer and use it in GitHub Desktop.
Save ColinMaudry/6845c44b00ec9a85aadb to your computer and use it in GitHub Desktop.
Test SPARQL with cURL and Wikidata (entity types)
#Selects the first 20 types of entities encountered:
select distinct ?type where {
?thing <http://www.wikidata.org/prop/direct/P31> ?type
}
limit 20
curl http://wdqs-beta.wmflabs.org/bigdata/namespace/wdq/sparql?query=select%20distinct%20%3Ftype%20where%20%7B%0A%3Fthing%20a%20%3Ftype%0A%7D%0Alimit%2020 -H "Accept: text/csv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment