Skip to content
GuidesPlaygroundDashboard

Execute a SPARQL query

$ plaza query sparql
POST/api/v1/sparql

Execute a SPARQL query

ParametersExpand Collapse
--query: string

SPARQL query string

ReturnsExpand Collapse
sparql_result: object { features, type }

GeoJSON FeatureCollection of SPARQL query results

features: array of GeoJsonFeature { geometry, properties, type, 2 more }

GeoJSON features from SPARQL query

geometry: object { coordinates, type }
coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number

GeoJSON coordinates array (nesting depth varies by geometry type)

union_member_0: array of number
union_member_1: array of array of number
union_member_2: array of array of array of number
union_member_3: array of array of array of array of number
type: "Point" or "LineString" or "Polygon" or 3 more
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: map[unknown]
type: "Feature"
"Feature"
id: optional string

Feature identifier (type/osm_id)

osm_id: optional number

OpenStreetMap ID

type: "FeatureCollection"
"FeatureCollection"

Execute a SPARQL query

plaza query sparql \
  --api-key 'My API Key' \
  --query query
Returns Examples