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
LIMIT 5
' |
vitrify sparql --endpoint https://query.wikidata.org/sparql \
--query - \
--format csv \
--to eu-capitals
Success1.88 s56 bytes
Response bytes
eu-capitals/
├── results.csv
├── ro-crate-metadata.json
└── query.rq
{
"@context": "https://w3id.org/ro/crate/1.2/context",
"@graph": [
{
"@id": "ro-crate-metadata.json",
"@type": "CreativeWork",
"about": {
"@id": "./"
},
"conformsTo": {
"@id": "https://w3id.org/ro/crate/1.2"
}
},
{
"@id": "./",
"@type": "Dataset",
"additionalProperty": [
{
"@id": "#retrieval-duration"
}
],
"author": {
"@id": "https://vitrify.iolanta.tech"
},
"datePublished": "2026-10-16T08:03:31.314040542+00:00",
"description": "SPARQL retrieval materialized by Vitrify.",
"hasPart": [
{
"@id": "results.csv"
},
{
"@id": "query.rq"
}
],
"license": "No license asserted by Vitrify; consult the source endpoint's terms of use.",
"name": "results.csv",
"publisher": {
"@id": "https://query.wikidata.org/sparql"
}
},
{
"@id": "results.csv",
"@type": "File",
"additionalProperty": [
{
"@id": "#row-count"
}
],
"contentSize": "56",
"encodingFormat": "text/csv",
"sha256": "33307cadf954e568c60a6bef44be880858ff197ab5d5bc8b0deb24b751115eee"
},
{
"@id": "query.rq",
"@type": "File",
"contentSize": "319",
"encodingFormat": "application/sparql-query",
"sha256": "68974f8807346f05c7df9f9784440af6904a6b4254c3f2e3b73965e92b8860b9"
},
{
"@id": "https://vitrify.iolanta.tech",
"@type": "SoftwareApplication",
"name": "Vitrify",
"url": "https://vitrify.iolanta.tech",
"version": "0.1.1"
},
{
"@id": "https://query.wikidata.org/sparql",
"@type": "Organization"
},
{
"@id": "#retrieval",
"@type": "CreateAction",
"actionStatus": {
"@id": "http://schema.org/CompletedActionStatus"
},
"agent": {
"@id": "https://vitrify.iolanta.tech"
},
"description": "HTTP 200; Accept: text/csv",
"endTime": "2026-10-16T08:03:31.314040542+00:00",
"identifier": "https://query.wikidata.org/sparql",
"instrument": {
"@id": "https://vitrify.iolanta.tech"
},
"object": [
{
"@id": "https://query.wikidata.org/sparql"
},
{
"@id": "query.rq"
}
],
"result": {
"@id": "results.csv"
},
"startTime": "2026-10-16T08:03:29.416624254+00:00"
},
{
"@id": "#retrieval-duration",
"@type": "PropertyValue",
"name": "Retrieval duration",
"propertyID": "retrieval-duration",
"unitCode": "SEC",
"value": 1.884620221
},
{
"@id": "#row-count",
"@type": "PropertyValue",
"name": "Row count",
"propertyID": "row-count",
"unitText": "rows",
"value": 7
}
]
}
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
LIMIT 5