How to query Wikidata items using its labels?

前端 未结 4 599
逝去的感伤
逝去的感伤 2021-02-05 15:55

How can I query Wikidata to get all items that have labels contain a word? I tried this but didn\'t work; it retrieved nothing.

SELECT ?item ?itemLabel WHERE {
          


        
4条回答
  •  渐次进展
    2021-02-05 16:25

    Yes, you can search by label, for example:

    SELECT distinct ?item ?itemLabel ?itemDescription WHERE{  
      ?item ?label "Something"@en.  
      ?article schema:about ?item .
      ?article schema:inLanguage "en" .
      ?article schema:isPartOf . 
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }    
    }
    

    see it on Query page.

提交回复
热议问题