Skip to content
DeepfireDeepfire Docs
Esc
navigateopen⌘Jpreview
On this page

Output formats

Choose GeoJSON, CSV, GML, KML, or HTML with the f= parameter, and know which JSON envelope you are getting.

Select the response format with f=:

Format f= value
GeoJSON (standard — recommended) application/geo+json
GeoJSON (legacy envelope) application/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=, the format is negotiated from the Accept header: browsers get HTML (nice for exploring), while curl and HTTP libraries get JSON. Pin f= anyway so the response never depends on what your client happens to send.

The two JSON formats

application/geo+json and application/json return the same features wrapped in different envelopes:

  • application/geo+json — standard RFC 7946 GeoJSON and the canonical OGC API - Features representation: numberReturned, timeStamp, and a full links block (self, alternate, collection, next). Use this one.
  • application/json — a legacy GeoJSON envelope: adds a non-standard crs member and totalFeatures: "unknown", and carries only a bare next link.

Both page the same way (each response has a next link when more results exist). On the service metadata pages (landing page, conformance, /collections), plain application/json is the JSON format — geo+json is for feature responses.

Examples

CSV — drop straight into a spreadsheet or pandas:

curl -sG -H "Authorization: Bearer $TOKEN" \
  "https://api.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 -H "Authorization: Bearer $TOKEN" \
  "https://api.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

Was this page helpful?