Rethinking the Free Tier for Maps
Protomaps is a new mapping system, and usually that implies a new map API - an HTTP service, hosted by a company somewhere Out There on the Web. Your typical interactive web map talks to an API using these conventions:
- The world is split into a pyramid of square tiles, with objects simplified to one of many pre-determined zoom levels.
- The browser fetches an image or other data tile as the user zooms and pans.
The Status Quo: Consumption Pricing
Map tiles from an API are just one of many developer Software-as-a-Service (SaaS) products, which onboard new customers like this:
- Sign up and generate an API key.
- Embed that key on your site, which you can use for free up to a certain limit.
- Once you've exceeded that limit, you're billed on a pay-as-you-go pricing model.
This pay-as-you-go model is also called consumption pricing. Good examples of this model in the developer market are Sentry for error tracking and Twilio for SMS. Google applied this model to Maps, and it is infamously expensive:
In theory, consumption pricing is good for both vendors and customers. It lets companies capture mindshare via a free tier: developers, more than anyone else, love free stuff, especially when learning new tools for personal side projects. It also lets them charge much, much more for use cases with high willingness to pay, such as heavily trafficked retail websites, popular social media applications, or enterprise deployments.
Why SaaS does not serve all map use cases
Most developer services that come to mind fit the consumption pricing model perfectly - indie projects pay nothing, startup companies buy a medium-sized plan, and heavy usage is priced in after clicking the Contact Us button. However, a lot of mapping use cases do not fit the consumption pricing model.
Firstly, many useful applications of maps, even those that are important infrastructure for society, have high traffic but low ability to pay, like civic technology projects, environment & climate, public health, journalism and information visualization. Projects are often built on the free tier of a map API but discover they can't afford a higher tier after launch.
Secondly, the SaaS model means the vendor must track usage, which means applications must always connect to the public Internet. Developers could cache, proxy or scrape map data for offline use, but this is always forbidden by terms of service - see the Google Maps TOS as an example - because it contradicts the pay-as-you-go business model. Entire classes of applications are impossible due to policy, not technical feasibility. Mapping applications are always dependent on a third party, and exposed to changes in pricing or companies going offline on an Incredible Journey.
The narrow market served by pay-as-you-go pricing means that map vendors must cater to the most profitable commercial ventures, ignore exciting but unlucrative use cases, and enforce artificial scarcity of information.
Lastly, vendors rely on convincing customers that the service they provide is too difficult and complex to run themselves. Metered SaaS reshapes the architecture of systems to fit a business model. It creates strong disincentives for the creation of simple, modular software that can be adapted and re-used.
Can APIs be totally free?
OpenStreetMap is thought of as a "free" map service, due to ubiquitous confusion between the cartographic product served from openstreetmap.org, and the OpenStreetMap dataset. You've probably seen an embedded OSM map that looks like this:
OSM through its Foundation pays to host this for free, but for the primary purpose of aiding map editing and data creation, not widespread public embedding. The Tile Usage Policy plainly states: "OpenStreetMap data is free for everyone to use. Our tile servers are not."
There does exist alternate map services like maps.stamen.com that provide a set of pre-rendered map images. But free services ultimately depend on the a sponsor willing to commit to the long-term cost of data transfer, because bandwidth costs are not trivial.
Holding the Bandwidth Bag
Free map hosting is difficult for the same reasons image and video hosting is difficult: letting anyone embed assets anywhere on the web leads to exploding bandwidth costs. Bandwidth, while a commodity, is not free - AWS charges about $0.09 per gigabyte.
Slippy maps are sensitive to latency, so ideally a map can be served from a content delivery network, minimizing the time to serve a map to the end user. CDNs themselves follow consumption models, but strong competition between major players drives pricing down over time.
How Protomaps Is Different
Protomaps, runs a public API on the fast Cloudflare CDN, which you can use for free up to a soft cap of 1,000,000 requests per month. Like everywhere else, you can start by signing up for an account which will generate an associated API key.
But here's a key difference: If I change this free tier in the future, I go out of business, you outgrow the service, or you just don't want to depend on an external service anymore, you can export the map data and host it yourself for a limited area via Protomaps Downloads. This is much faster than scraping the API, and wraps the map into a tidy PMTiles package that lives on S3 with no intermediate server.
Obviously, there is no way for me to ever know how much you're using a downloaded map, and thus no way for me to charge you based on that! You'll still pay for your own storage and bandwidth, but those will be orders of magnitude cheaper than typical metered map APIs. Your map will work forever, even offline, because it transforms the map from a live service into just another asset like an image or video.
If you're excited about the possibilities here for your project, you can contact me at email@example.com.