Skip to content
GuidesPlaygroundDashboard

Execute a SPARQL query

POST/api/v1/sparql

Execute a SPARQL query

Body ParametersJSONExpand Collapse
query: string

SPARQL query string

ReturnsExpand Collapse
SparqlResult = object { features, type }

GeoJSON FeatureCollection of SPARQL query results

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

GeoJSON features from SPARQL query

geometry: GeoJsonGeometry { 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)

One of the following:
array of number
array of array of number
array of array of array of number
array of array of array of array of number
type: "Point" or "LineString" or "Polygon" or 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: map[unknown]
type: "Feature"
id: optional string

Feature identifier (type/osm_id)

osm_id: optional number

OpenStreetMap ID

type: "FeatureCollection"

Execute a SPARQL query

curl https://plaza.fyi/api/v1/sparql \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $PLAZA_API_KEY" \
    -d '{
          "query": "query"
        }'
Returns Examples