Created
January 6, 2021 20:26
-
-
Save thadguidry/6a6d1b051663665effcb183acc866a55 to your computer and use it in GitHub Desktop.
Wikidata query for drug search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# drug search | |
SELECT ?item ?itemLabel WHERE { | |
?item wdt:P31/wdt:P279* wd:Q8386 . | |
SERVICE wikibase:mwapi { | |
bd:serviceParam wikibase:endpoint "www.wikidata.org"; | |
wikibase:api "EntitySearch"; | |
mwapi:search "Tylenol"; # Search for things named "Tylenol" | |
mwapi:language "en". | |
?item wikibase:apiOutputItem mwapi:item. | |
} | |
SERVICE wikibase:label {bd:serviceParam wikibase:language "en".} | |
} | |
LIMIT 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment