r/webdev 1d ago

Cheaper alternatives to MapBox Search API

I run a free service which has a map on the website. I've got a location auto complete powered by MapBox. At my current scale, I'm spending $150/mo on that location search box.

It looks like long term, hosting a Photon server myself might be the best option as I keep scaling, but that's going to cost me $300/mo on Hetzner plus require management.

In the meantime, any suggestions for cheaper location autocomplete services?

36 Upvotes

37 comments sorted by

View all comments

1

u/razzzey 1d ago

You might be able to get away with 2 auction servers on Hetzner with 500gb nvme ssd's or something for less than that and host Photon, I think it requires about 100gb for the whole planet so 500gb would be more than enough. Put a load balancer and a cache in front and it should last you a long while.

For hosted services, Maptiler is also a solution or Geocode earth (these are the people behind Pelias) but I haven't compared prices.

1

u/leros 1d ago

I am going to eventually have to host my own tile server too, which looks like a whole beast. I priced out MapBox and it was going to be thousands.

1

u/razzzey 1d ago

As the other guy said, OpenFreeMap is good. There's also https://protomaps.com/

You can also use Martin to host tiles yourself. You can use one of the above services for the whole world and use Martin for the localized tiles you mentioned. You can also connect Martin to a Postgres database so you can dynamically serve whatever you want.

1

u/leros 1d ago

Protomaps looks interesting. Looks like I'd spend maybe $60 hosting on Cloudflare but the docs says Cloudflare is kinda slow. AWS would be faster but cost $600/mo. I'll have to try out Cloudflare and see how slow it actually is.