PitStopper.net

Blog - Tips, Stories & Updates

How PitStopper Uses Public APIs

Your Data Stays in Your Browser

One of PitStopper's core design principles is privacy. When you search for points of interest, all API queries are sent directly from your web browser to the various service providers. PitStopper's servers never see your route data, search queries, or location information.

This means:

  • Your GPX routes are processed entirely in your browser
  • POI searches go directly from your device to OpenStreetMap's Overpass API
  • Elevation queries go directly to elevation services
  • We can't track where you're planning to ride or hike

Being Good API Citizens

PitStopper currently has a small but growing community of users. We're mindful of the generous rate limits that public API providers offer, and we don't expect to approach any thresholds at our current scale.

We've built several features to minimize our API footprint:

POI Caching

When you search for POIs, the results are cached in your browser's localStorage. If you search for "cafes" along your route and then add "restaurants" as well, we won't re-query the cafe data - it's already stored locally. This reduces repeated API calls significantly.

You can view and manage this cache in Tools > System Tools > View POI Cache.

Smart Batching

For elevation data, we batch requests to query up to 100 points at once rather than making individual calls. This dramatically reduces the number of API requests while still providing accurate elevation information.

Future Infrastructure Plans

As our user base grows, we may eventually run our own infrastructure:

  • Self-hosted Overpass API server for POI queries
  • Cached map tile servers
  • Our own elevation data service

For now, the volume of API calls doesn't justify the infrastructure cost and maintenance overhead. We'd rather focus on building useful features than managing servers.

Built-in Diagnostic Tools

If you're curious about the APIs or experiencing issues, we've built some helpful diagnostic tools:

Test API Connections

Found in Tools > System Tools > Test API Connections, this tool tests connectivity to all the external APIs PitStopper uses. It runs all tests in parallel and shows response times, helping you identify if a particular service is slow or unavailable.

Overpass Server Statistics

Under Tools > System Tools > POI Server Stats, you can see detailed statistics for each Overpass API server including:

  • Number of requests made
  • Average response times
  • Failure counts
  • Server health status

This is useful for understanding which servers are performing well in your region.

The APIs We Rely On

POI Data (Overpass API)

We query OpenStreetMap data through four redundant Overpass API endpoints:

  • z.overpass-api.de (primary)
  • overpass-api.de (fallback)
  • overpass.private.coffee (fallback)
  • overpass.kumi.systems (fallback)

If one server is slow or unavailable, we automatically try the next one.

Elevation Data

  • OpenTopoData API - For bulk elevation queries (up to 100 points per request)
  • Open-Elevation API - For individual POI elevation lookups
  • Nominatim (OpenStreetMap) - Primary address search
  • Photon API (Komoot) - Fallback geocoding service

Sunrise & Sunset Times

  • SunriseSunset.io - Primary service with timezone support
  • Sunrise-Sunset.org - Fallback API

Map Tiles

  • OpenStreetMap - Default street map layer
  • ESRI World Imagery - Satellite view
  • OpenTopoMap - Topographic maps
  • CyclOSM - Cycling-focused maps
  • Thunderforest Outdoors - Outdoor activity maps

Thank You

PitStopper wouldn't be possible without the incredible work of the teams and volunteers behind these services. We're deeply grateful to:

  • The OpenStreetMap community for creating and maintaining the world's most comprehensive open map database
  • The operators of the Overpass API servers who handle millions of queries daily
  • OpenTopoData and Open-Elevation for free elevation services
  • Komoot for the Photon geocoding API
  • The developers of SunriseSunset.io and Sunrise-Sunset.org
  • All the map tile providers who make beautiful, free map layers available

These services embody the spirit of open data and open source. They make tools like PitStopper possible without requiring expensive commercial APIs or compromising user privacy.

If you find these services valuable, consider donating to OpenStreetMap or contributing to the map data in your area.