Launching our free public Mileage API
Five REST endpoints, API-key authentication, and a 1,000-request rolling 30-day free tier.
Why we're publishing a public API
Mileage reimbursement is one of the most overlooked pieces of the corporate expense stack.[^irs-2025] Most teams still use spreadsheets. Today we're shipping the Quilometragem public API to fix that: five REST endpoints that return GPS-calculated distance, official mileage rates by country, reimbursement amounts, signed PDF receipts, and geocoding. All free up to 1,000 requests per 30-day rolling window per key.
The five endpoints
The contract is deliberately small. `POST /distance` calculates distance and duration between two points, accepting free-text addresses or lat/lng pairs. `POST /reimbursement` applies the official rate for the supplied country and year — we currently cover US, BR, MX, CO, UK, and CA. `POST /receipt` generates an audit-ready PDF receipt with a SHA-256 integrity hash. `GET /rates/{country}/{year}` returns the official rate with a link to the source. `GET /geocode` converts addresses to coordinates. That's enough to build a full calculator, a driver portal, or an ERP connector.
Authentication and limits
The key goes in the `X-API-Key` header (Bearer also works). Every response carries `X-RateLimit-Limit` and `X-RateLimit-Remaining` headers so you can monitor consumption without extra calls. The 1,000-request rolling 30-day free tier comfortably covers prototypes, hackathons, and small teams. When you outgrow it, there's a partner tier with volume on request.
SDKs and OpenAPI
We ship official MIT-licensed clients for JavaScript/TypeScript (`npm install quilometragem-sdk-js`) and Python (`pip install quilometragem`). For other languages, import our OpenAPI 3.1 spec from `https://quilometragem.com/api/openapi.json` into Postman, Insomnia, or a ChatGPT plugin. cURL, Axios, Ruby, Go, and PHP samples live in the interactive docs at `/api`.
Get started in 60 seconds
Sign in, open `/account/api`, generate a key (you'll see the value exactly once), and test with cURL:
``` curl -X POST https://quilometragem.com/api/v1/public/distance \ -H 'X-API-Key: qkm_live_…' \ -H 'Content-Type: application/json' \ -d '{"origin":"San Francisco, CA","destination":"Los Angeles, CA"}' ```
You get distance in km, estimated duration, and a polyline of the route. Ready to feed into the reimbursement endpoint or straight into your UI.