I am looking for some API endpoints that return GeoJSON shapes for each nation. I am not interested in downloading shapefiles. I need some lightweight (not super accurate) nation shapes for every nation that I can call frequently to overlay on a map webapp.

1 Answer 1


Although not an API, there are hosts of GeoJSON with quite a small size, for example, 251 KB: https://github.com/johan/world.geo.json/blob/master/countries.geo.json

raw data: https://raw.githubusercontent.com/johan/world.geo.json/master/countries.geo.json

If you need a web service, you can turn any (geo)Json into an API endpoint (either local or hosted). Here's one library doing that, although for sure there are many others: https://github.com/Noznoc/geojson-api


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.