Skip to content

GeoAPI is a fast and efficient way to search for cities in a MySQL database using the Golang. It is lightning fast.

License

Notifications You must be signed in to change notification settings

boleknowak/geoapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License

GeoAPI

GeoAPI is a powerful and efficient open-source project written in Golang that provides a simple yet effective way to search for cities in a MySQL database. This project is useful for applications that need to query a large database of cities in real-time.

API Reference

Search by city name

  GET /city
Parameter Type Description Demo
q / query string Required. For example: Albuque /city?q=Albuque
l / limit string Optional. For example: 2 /city?q=Los+Ang&limit=2

Example response

[
 {
  "id": "111130",
  "name": "Albuquerque",
  "country_code": "US",
  "lat": 35.08449,
  "lng": -106.65114,
  "country": {
   "id": "233",
   "name": "United States",
   "iso2": "US",
   "phonecode": "1",
   "native": "United States",
   "emoji": "🇺🇸"
  },
  "state": {
   "id": "1423",
   "name": "New Mexico",
   "iso2": "NM"
  }
 }
]

More functions will be added Soon™.

Data

  • Data Source
  • Database Dump is available in the cities_api.gz file.

TODO

  • Add more endpoints
  • Add Installation instructions
  • Add tests
  • Add demo link

License

The GeoAPI is open-sourced software licensed under the MIT license.

PS. This is my first project in Golang, so please be kind. :)

About

GeoAPI is a fast and efficient way to search for cities in a MySQL database using the Golang. It is lightning fast.

Topics

Resources

License

Stars

Watchers

Forks