SPARQL Queries (with cURL command) on Wikidata
This gist resulted to be just the spark for a proper article, and won't be maintained here anymore.
The SPARQL endpoint is http://wdqs-beta.wmflabs.org/bigdata/namespace/wdq/sparql and it has a Web form to fire queries. However http://www.wikidata.org/prop/direct/P31
("instance of") tells you what the entity is.
The repository doesn't have named graphs, or at least the SPARQL endpoint rejects graph queries. The classes of entities (rdf:type
) are not described in the repository.
To find the HTML page of an entity (such as https://www.wikidata.org/entity/Q866405
), simply replace /entity/
with /wiki/
.