EU capitals
This Wikidata query returns EU-capital labels in English.
printf '%s' 'PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?label
WHERE {
?country wdt:P463 wd:Q458 ;
wdt:P36 ?capital .
?capital rdfs:label ?label .
FILTER(LANG(?label) = "en")
}
ORDER BY ?label
' |
vitrify sparql --endpoint https://qlever.dev/api/wikidata \
--query - \
--format csv \
--to eu-capitals
Success0.57 s231 bytes
Response bytes
eu-capitals/
├── results.csv
├── ro-crate-metadata.json
└── query.rq
Showing 5 of 28 rows.
| label |
|---|
| Amsterdam |
| Athens |
| Berlin |
| Bratislava |
| Brussels |
{
"@context": "https://w3id.org/ro/crate/1.3/context",
"@graph": [
{
"@id": "ro-crate-metadata.json",
"@type": "CreativeWork",
"conformsTo": {
"@id": "https://w3id.org/ro/crate/1.3"
},
"about": {
"@id": "./"
}
},
{
"@id": "./",
"@type": "Dataset",
"name": "results.csv",
"description": "SPARQL retrieval materialized by Vitrify.",
"datePublished": "2026-11-28T12:37:01.383867999+00:00",
"additionalProperty": [
{
"@id": "#retrieval-duration"
}
],
"license": "No license asserted by Vitrify; consult the source endpoint's terms of use.",
"hasPart": [
{
"@id": "results.csv"
},
{
"@id": "query.rq"
}
],
"publisher": {
"@id": "https://qlever.dev/api/wikidata"
},
"author": {
"@id": "https://vitrify.iolanta.tech"
}
},
{
"@id": "results.csv",
"@type": "File",
"contentSize": "231",
"sha256": "153492b341f45b92a4de6df3a885ce0efba64668d197d81edc112ad7eeef01aa",
"encodingFormat": "text/csv"
},
{
"@id": "query.rq",
"@type": "File",
"contentSize": "311",
"encodingFormat": "application/sparql-query",
"sha256": "d08b3aa60646c5fdfa5af1ba9495879d23a7ad54822914195865f927cc81703a"
},
{
"@id": "https://vitrify.iolanta.tech",
"@type": "SoftwareApplication",
"name": "Vitrify",
"url": "https://vitrify.iolanta.tech",
"version": "0.1.4"
},
{
"@id": "https://qlever.dev/api/wikidata",
"@type": "Organization"
},
{
"@id": "#retrieval",
"@type": "CreateAction",
"actionStatus": {
"@id": "http://schema.org/CompletedActionStatus"
},
"startTime": "2026-11-28T12:37:00.811549920+00:00",
"endTime": "2026-11-28T12:37:01.383867999+00:00",
"instrument": {
"@id": "https://vitrify.iolanta.tech"
},
"agent": {
"@id": "https://vitrify.iolanta.tech"
},
"object": [
{
"@id": "https://qlever.dev/api/wikidata"
},
{
"@id": "query.rq"
}
],
"result": {
"@id": "results.csv"
},
"identifier": "https://qlever.dev/api/wikidata",
"description": "HTTP 200; Accept: text/csv"
},
{
"@id": "#retrieval-duration",
"@type": "PropertyValue",
"propertyID": "retrieval-duration",
"name": "Retrieval duration",
"value": 0.568593961,
"unitCode": "SEC"
}
]
}
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?label
WHERE {
?country wdt:P463 wd:Q458 ;
wdt:P36 ?capital .
?capital rdfs:label ?label .
FILTER(LANG(?label) = "en")
}
ORDER BY ?label