# Query ## Execute an Overpass QL query **post** `/api/v1/overpass` Execute an Overpass QL query ### Body Parameters - `data: string` Overpass QL query string ### Returns - `FeatureCollection = object { features, type }` Bare GeoJSON FeatureCollection. Pagination metadata is returned in HTTP headers (X-Limit, X-Has-More, X-Next-Cursor, X-Next-Offset, Link). - `features: array of GeoJsonFeature` - `geometry: GeoJsonGeometry` - `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) - `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` - `"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"` ### Example ```http curl https://plaza.fyi/api/v1/overpass \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $PLAZA_API_KEY" \ -d '{ "data": "data" }' ``` ## Execute a SPARQL query **post** `/api/v1/sparql` Execute a SPARQL query ### Body Parameters - `query: string` SPARQL query string ### Returns - `SparqlResult = object { features, type }` GeoJSON FeatureCollection of SPARQL query results - `features: array of GeoJsonFeature` GeoJSON features from SPARQL query - `geometry: GeoJsonGeometry` - `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) - `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` - `"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"` ### Example ```http curl https://plaza.fyi/api/v1/sparql \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $PLAZA_API_KEY" \ -d '{ "query": "query" }' ``` ## Domain Types ### Overpass Query - `OverpassQuery = object { data }` - `data: string` Overpass QL query string ### Sparql Query - `SparqlQuery = object { query }` - `query: string` SPARQL query string ### Sparql Result - `SparqlResult = object { features, type }` GeoJSON FeatureCollection of SPARQL query results - `features: array of GeoJsonFeature` GeoJSON features from SPARQL query - `geometry: GeoJsonGeometry` - `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) - `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` - `"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"`