PRA3006-SPARQL

wikidataChemicals.rq

Database Wikidata
SPARQl endpoint https://query.wikidata.org/bigdata/namespace/wdq/sparql
License CCZero

Code examples: curl

SPARQL

PREFIX wdt: <http://www.wikidata.org/prop/direct/>

SELECT * WHERE {
  ?o wdt:P31 wd:Q113145171 .
  ?o rdfs:label ?l.
  FILTER(LANG(?l)='en')
} LIMIT 50

Run or Edit

Output

o l
http://www.wikidata.org/entity/Q150681 octane
http://www.wikidata.org/entity/Q150694 nonane
http://www.wikidata.org/entity/Q153 ethanol
http://www.wikidata.org/entity/Q116073 disilane
http://www.wikidata.org/entity/Q116163 ethyl sulfate
http://www.wikidata.org/entity/Q116269 silicon dioxide
http://www.wikidata.org/entity/Q161498 1,3-propanediamine
http://www.wikidata.org/entity/Q161503 1,3-butadiene
http://www.wikidata.org/entity/Q161505 1,3-diiodopropane
http://www.wikidata.org/entity/Q161506 trimethylene carbonate
http://www.wikidata.org/entity/Q161507 (1E)-1,3-dichloropropene
http://www.wikidata.org/entity/Q161510 1,3-indandione
http://www.wikidata.org/entity/Q50703 cesium iodide
http://www.wikidata.org/entity/Q50980 xanthine
http://www.wikidata.org/entity/Q52353 benzyl alcohol
http://www.wikidata.org/entity/Q161526 1,4-dichlorobutane
http://www.wikidata.org/entity/Q161529 1,4-dichlorobenzene
http://www.wikidata.org/entity/Q161532 dioxane
http://www.wikidata.org/entity/Q161534 1,4-dioxin
http://www.wikidata.org/entity/Q161535 1,4-pentadiene
http://www.wikidata.org/entity/Q2025 carbon monoxide
http://www.wikidata.org/entity/Q116472 purpurin
http://www.wikidata.org/entity/Q116587 diisononyl adipate
http://www.wikidata.org/entity/Q116907 glutathione
http://www.wikidata.org/entity/Q2468 hydrogen fluoride
http://www.wikidata.org/entity/Q2546 potassium bromide
http://www.wikidata.org/entity/Q283 water
http://www.wikidata.org/entity/Q161557 1,5-pentanediol
http://www.wikidata.org/entity/Q161558 1,6-dibromohexane
http://www.wikidata.org/entity/Q161559 1,6-dichlorohexane
http://www.wikidata.org/entity/Q161560 1,6-diiodohexane
http://www.wikidata.org/entity/Q161563 1,6-hexanediol
http://www.wikidata.org/entity/Q161564 1,8-bis(dimethylamino)naphthalene
http://www.wikidata.org/entity/Q161572 eucalyptol
http://www.wikidata.org/entity/Q150831 pentadecane
http://www.wikidata.org/entity/Q150843 hexadecane
http://www.wikidata.org/entity/Q150888 heptadecane
http://www.wikidata.org/entity/Q150900 octadecane
http://www.wikidata.org/entity/Q161608 1-chlorobutane
http://www.wikidata.org/entity/Q161610 1-chloropentane
http://www.wikidata.org/entity/Q161612 propyl chloride
http://www.wikidata.org/entity/Q161613 migalastat
http://www.wikidata.org/entity/Q161617 lauryl alcohol
http://www.wikidata.org/entity/Q161619 1-dodecanethiol
http://www.wikidata.org/entity/Q161620 dodecene
http://www.wikidata.org/entity/Q161585 benzylpiperazine
http://www.wikidata.org/entity/Q161587 1-bromooctane
http://www.wikidata.org/entity/Q161589 propyl bromide
http://www.wikidata.org/entity/Q161593 1-butyl-3-methylimidazolium bis(trifluoromethylsulfonyl)imide
http://www.wikidata.org/entity/Q161597 1-butyne

Code examples

curl

curl -o wikidataChemicals.rq https://raw.githubusercontent.com/BiGCAT-UM/PRA3006-SPARQL/master/sparql/wikidataChemicals.rq
curl -H "Accept: text/tab-separated-values" -G https://query.wikidata.org/bigdata/namespace/wdq/sparql --data-urlencode query@wikidataChemicals.rq

This SPARQL query is available under CCZero.