The new Surface API allows you to create your own geographic query API from any data in minutes. Here’s how:

1. Find and download a dataset

Government data portals like San Francisco’s DataSF provide many geographic datasets for public consumption. One of the datasets available on DataSF is a high-resolution shapefile of elevation contours generated from LiDAR data. We’ll use this high-resolution dataset to create our own custom elevation API.

2. Upload to

Upload the zipped shapefile directly to and we’ll automatically convert it into Mapbox Vector Tiles which work with the Surface API, Mapbox Studio Classic, and Mapbox GL.

3. Build a query

Build a query

Copy the Map ID of your upload and paste it into the Surface API query builder. This loads the data layers and their attributes, and allows you to build a query URL. Draw a line to query the data at a few points and see the response immediately.

Build a query

See the Surface API documentation for more details on modifying your query.

This is the basic process for an off-the-shelf dataset, and there are many more possibilities for building geo APIs from your own custom data. Find me on Twitter to talk about using custom data with the Surface API.