Search code examples
gpsopenai-api

Verify GPS coordinates generated by gpt-4o API


I am working on a project fetching different places/locations from the GPT-4o prompt.

I am getting the correct details, and names of places but when it comes to GPS coordinates, it gives slightly wrong coordinates like somewhere 20km away from the exact location on Google Maps.

Is there any way to verify that the generated coordinates are correct? Or is there any alternate solution that is less costly? I'm using the free version of gpt-4o API.


Solution

  • The idea to get gps coordinates was insane. So use google map api if you can afford pricing for your project else , the best free openstreet api also works just fine.

    https://nominatim.openstreetmap.org/search?q={Name of place}&format=json