Start with the REST API if you want to try mapcodes quickly: integration is simple and you can get results in minutes. Use a library, like TypeScript, when you need local or offline encoding, lower latency, no network dependency, or no API data-transfer cost.
TypeScript when you want local encoding in web or Node.js apps.
Python for scripts, analysis and backend workflows.
Java for existing JVM applications.
REST API quick start
Use the public REST API to prove the encode and decode flow before choosing a deeper integration. These examples use Mount Kilimanjaro as a neutral landmark in Africa.
1. Coordinates to mapcode
Request mapcodes for a coordinate near Mount Kilimanjaro and restrict the local result to Tanzania.
Request
GET https://api.mapcode.com/mapcode/json/codes/-3.0674,37.3556?territory=TZA