Re: [Wikidata] Is there a Wikidata API query that retrieves the label for an item in a claim?

2015-11-23 Thread james
As a post-script, the following query that I cobbled together from examples accomplishes the objective stated below. However, I don't yet understand SPARQL well enough to know why it works. Sorry for the noise, and I'll not post any more SPARQL questions until I've thoroughly read Bob DuCharme's

Re: [Wikidata] Is there a Wikidata API query that retrieves the label for an item in a claim?

2015-11-23 Thread james
Thanks for your help, James. I'm now attempting to use a SPARQL query, and am having trouble returning the property labels. Here's the query I'm using: PREFIX entity: PREFIX p: PREFIX rdfs:

Re: [Wikidata] Is there a Wikidata API query that retrieves the label for an item in a claim?

2015-11-22 Thread James Heald
You could use the SPARQL API to extract any or all of the statements on an item in one go, plus the labels in any language you wanted, depending on what you put in the query. The JSON won't be formatted exactly as below -- you'd get back a structure corresponding to a row for each statement,