Output formats
Select the response format with f= (OGC API - Features) or outputFormat= (WFS):
| Format | f= value |
|---|---|
| GeoJSON | application/json or application/geo+json |
| CSV | text/csv |
| GML 3.2 | application/gml+xml;version=3.2 |
| KML | application/vnd.google-earth.kml+xml |
| HTML (browser) | text/html |
Without f=, most endpoints return HTML — nice for exploring in a browser, not what you
want in code.
Examples
CSV — drop straight into a spreadsheet or pandas:
curl -sG "https://ogc.deepfire.co/ogc/features/v1/collections/deepfire:hotspots/items" \
--data-urlencode "bbox=-125,32,-114,42" \
--data-urlencode "filter-lang=cql2-text" \
--data-urlencode "filter=active = true" \
--data-urlencode "f=text/csv" -o hotspots.csv
KML — open in Google Earth:
curl -sG "https://ogc.deepfire.co/ogc/features/v1/collections/deepfire:satellite-perimeters/items" \
--data-urlencode "filter-lang=cql2-text" \
--data-urlencode "filter=active = true" \
--data-urlencode "limit=1000" \
--data-urlencode "f=application/vnd.google-earth.kml+xml" -o perimeters.kml
The WFS equivalent uses outputFormat=, e.g. outputFormat=application/json for GeoJSON
— see the WFS guide.