Skip to main content

Run UDFs as API

Every UDF can be used as a file system:

Dynamic File System Overview

Output formats

UDFs can return data in various formats via the format query parameter:

Vector data formats

FormatExtensionDescription
parquet.parquetEfficient columnar storage format
geojson.geojsonStandard GeoJSON format
json.jsonJSON objects and GeoJSON
csv.csvComma-separated values
mvt.mvtMapbox Vector Tiles
feather.featherApache Arrow IPC format
excel.xlsxExcel spreadsheet
xml.xmlXML data
html.htmlHTML document

Raster data formats

FormatExtensionDescription
png.pngLossless raster images
jpeg.jpeg / .jpgCompressed raster images
gif.gifAnimated or static images
webp.webpModern efficient image format
apng.apngAnimated PNG images
svg.svgScalable vector graphics
tiff.tiff / .tifGeoTIFF and TIFF rasters
npy.npyNumPy array binary format

Example usage

Returning as JSON

https://udf.ai/YOUR_TOKEN.json

Returning as CSV

https://udf.ai/YOUR_TOKEN.csv

Returning as HTML

https://udf.ai/YOUR_TOKEN.html

Tile endpoints

For map tile servers, use the tiles path with {z}/{x}/{y} template:

Vector tiles (MVT)

https://udf.ai/YOUR_TOKEN/run/tiles/{z}/{x}/{y}?=mvt

Raster tiles (PNG)

https://udf.ai/YOUR_TOKEN/run/tiles/{z}/{x}/{y}?=png

Integrations

These dynamic endpoints work with:

  • DeckGL - Interactive maps
  • Mapbox - Web maps
  • QGIS - Desktop GIS
  • Felt - Collaborative mapping
  • Google Sheets - Spreadsheet import