{"_id":"@dr-nio/geo-locator","_rev":"8-100ec6bf685245368b1f418dd4f843f2","name":"@dr-nio/geo-locator","dist-tags":{"latest":"2.6.0"},"versions":{"1.0.0":{"name":"@dr-nio/geo-locator","version":"1.0.0","author":{"name":"Dr-Nio"},"license":"ISC","_id":"@dr-nio/geo-locator@1.0.0","maintainers":[{"name":"dr-nio","email":"nicky.oscar@yahoo.com"}],"homepage":"https://github.com/Dr-Nio/geo-locator#readme","bugs":{"url":"https://github.com/Dr-Nio/geo-locator/issues"},"dist":{"shasum":"da77cd03094cde07087d897e7b517e1b7d5c8cc2","tarball":"https://registry.npmjs.org/@dr-nio/geo-locator/-/geo-locator-1.0.0.tgz","fileCount":5,"integrity":"sha512-uGz/AhCP+ZHmmyA8Q55XsEY84Yi/v0JpTWaF6/qQHo8meX+OmD2MiJvONRLh2XSQ5kx/C6gAta5JsXYWxZMBPg==","signatures":[{"sig":"MEYCIQCUsCaec+RIHib3B9ORndbk+7tHWrqbMZYkUlaJAuL0TAIhAMeKcjBRb+zmIvprtKnUUtRZQLLXAIuocm5rXwrLOzed","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4803},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"edb8e61fe683ca3fd1725c29c1be906dbb4436d6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"dr-nio","email":"nicky.oscar@yahoo.com"},"repository":{"url":"git+https://github.com/Dr-Nio/geo-locator.git","type":"git"},"_npmVersion":"11.4.2","description":"A clean TypeScript package to convert an address into coordinates using the Open-Meteo Geocoding API.","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^20.11.30"},"_npmOperationalInternal":{"tmp":"tmp/geo-locator_1.0.0_1765064260651_0.10473468540541542","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@dr-nio/geo-locator","version":"2.0.0","author":{"name":"Dr-Nio"},"license":"ISC","_id":"@dr-nio/geo-locator@2.0.0","maintainers":[{"name":"dr-nio","email":"nicky.oscar@yahoo.com"}],"homepage":"https://github.com/Dr-Nio/geo-locator#readme","bugs":{"url":"https://github.com/Dr-Nio/geo-locator/issues"},"dist":{"shasum":"4f3fe5cc75679ef63c68f17b89175bbbf5a0736c","tarball":"https://registry.npmjs.org/@dr-nio/geo-locator/-/geo-locator-2.0.0.tgz","fileCount":5,"integrity":"sha512-Ri2vaR+rbJjQRSBfeENhS+ZSIbBskh77FLTQRUGq6WUTDjJkCf2RdPpTv+A0RwyVC/Ws2E9TR9j7I9s1zIeDlg==","signatures":[{"sig":"MEUCIHBuqRga+NiDc0T80n19y5/xLU4rGQuyaf/0jhlqFPBuAiEAnKYsaniO74D/LOMbzRy0a20vubi7cG6fHQqWIX6pS1Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4772},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"edb8e61fe683ca3fd1725c29c1be906dbb4436d6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"dr-nio","email":"nicky.oscar@yahoo.com"},"repository":{"url":"git+https://github.com/Dr-Nio/geo-locator.git","type":"git"},"_npmVersion":"11.4.2","description":"A clean TypeScript package to convert an address into coordinates using the Open-Meteo Geocoding API.","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^20.11.30"},"_npmOperationalInternal":{"tmp":"tmp/geo-locator_2.0.0_1765165193551_0.45107576045554887","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@dr-nio/geo-locator","version":"2.1.0","author":{"name":"Dr-Nio"},"license":"ISC","_id":"@dr-nio/geo-locator@2.1.0","maintainers":[{"name":"dr-nio","email":"nicky.oscar@yahoo.com"}],"homepage":"https://github.com/Dr-Nio/geo-locator#readme","bugs":{"url":"https://github.com/Dr-Nio/geo-locator/issues"},"dist":{"shasum":"06319204575ef13b9761fc34e49fc97288df1a6e","tarball":"https://registry.npmjs.org/@dr-nio/geo-locator/-/geo-locator-2.1.0.tgz","fileCount":5,"integrity":"sha512-+2L0IUvgnzb1HnTa9q3w8YdJv4iCIsCxe6IvuTMVShCs1WdmzLel3+RnRAczZLh1+AldBoY9/ELdUPcNVLc4iA==","signatures":[{"sig":"MEQCIHfu0EOsuhJ0Jdj92ETpwKkLrMR1yZueDtO+c+jseS/qAiBcJN+UnUZqeAXT/iLlcGoXZVGUFVAK8oK4RTABTXx79w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4807},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"edb8e61fe683ca3fd1725c29c1be906dbb4436d6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"dr-nio","email":"nicky.oscar@yahoo.com"},"repository":{"url":"git+https://github.com/Dr-Nio/geo-locator.git","type":"git"},"_npmVersion":"11.4.2","description":"A clean TypeScript package to convert an address into coordinates using the Open-Meteo Geocoding API.","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^20.11.30"},"_npmOperationalInternal":{"tmp":"tmp/geo-locator_2.1.0_1765165596037_0.30717384014963356","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@dr-nio/geo-locator","version":"2.2.0","author":{"name":"Dr-Nio"},"license":"ISC","_id":"@dr-nio/geo-locator@2.2.0","maintainers":[{"name":"dr-nio","email":"nicky.oscar@yahoo.com"}],"homepage":"https://github.com/Dr-Nio/geo-locator#readme","bugs":{"url":"https://github.com/Dr-Nio/geo-locator/issues"},"dist":{"shasum":"5ea32ef55106d509095ccaf5558aee2c5b2be1f5","tarball":"https://registry.npmjs.org/@dr-nio/geo-locator/-/geo-locator-2.2.0.tgz","fileCount":5,"integrity":"sha512-RpPJhF04mg1a/0aAwLio/wLW0+q4Xx8iOEjoSjPrl+dmimi17IOwcYnRjOY3QpSLNhVQdX/08Hr+oovXAb7gDw==","signatures":[{"sig":"MEUCIQDZyrccDECLXQAUBd0iqVwi+KdJ1PyoPZQ9kzzNuq0s5QIgUVJqu6CSAfnKMwn4/tYzNyTfLZT0EbT+gk1w0hd6BQY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5253},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"edb8e61fe683ca3fd1725c29c1be906dbb4436d6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"dr-nio","email":"nicky.oscar@yahoo.com"},"repository":{"url":"git+https://github.com/Dr-Nio/geo-locator.git","type":"git"},"_npmVersion":"11.4.2","description":"A clean TypeScript package to convert an address into coordinates using the Open-Meteo Geocoding API.","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^20.11.30"},"_npmOperationalInternal":{"tmp":"tmp/geo-locator_2.2.0_1765166884014_0.13738852341983177","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"@dr-nio/geo-locator","version":"2.3.0","author":{"name":"Dr-Nio"},"license":"ISC","_id":"@dr-nio/geo-locator@2.3.0","maintainers":[{"name":"dr-nio","email":"nicky.oscar@yahoo.com"}],"homepage":"https://github.com/Dr-Nio/geo-locator#readme","bugs":{"url":"https://github.com/Dr-Nio/geo-locator/issues"},"dist":{"shasum":"5da99778eb25bce43c0f6efe553f1268aded8a00","tarball":"https://registry.npmjs.org/@dr-nio/geo-locator/-/geo-locator-2.3.0.tgz","fileCount":5,"integrity":"sha512-jPpsCr3ZApqca4HmvZoVzyCEU1EBOS/5CuxZIV7XtzLyS/e/td0LLSsJaVF00dl1y/jKSf2OD1I6Vk4cCRQXtA==","signatures":[{"sig":"MEUCIQDNdxvP1SwnONrZrJwbXyoj/mgpVkWWygnFIU9aABLS9QIgHqmCC/Kv/Zi+iJcS+7Qn87oSgmlzO2aUDNO5J/Q9V4M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4845},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"edb8e61fe683ca3fd1725c29c1be906dbb4436d6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"dr-nio","email":"nicky.oscar@yahoo.com"},"repository":{"url":"git+https://github.com/Dr-Nio/geo-locator.git","type":"git"},"_npmVersion":"11.4.2","description":"A clean TypeScript package to convert an address into coordinates using the Open-Meteo Geocoding API.","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^20.11.30"},"_npmOperationalInternal":{"tmp":"tmp/geo-locator_2.3.0_1765167620506_0.4957117447639041","host":"s3://npm-registry-packages-npm-production"}},"2.4.0":{"name":"@dr-nio/geo-locator","version":"2.4.0","author":{"name":"Dr-Nio"},"license":"ISC","_id":"@dr-nio/geo-locator@2.4.0","maintainers":[{"name":"dr-nio","email":"nicky.oscar@yahoo.com"}],"homepage":"https://github.com/Dr-Nio/geo-locator#readme","bugs":{"url":"https://github.com/Dr-Nio/geo-locator/issues"},"dist":{"shasum":"5f5c0c46714b4702bbb1c51970cd2f877a72035c","tarball":"https://registry.npmjs.org/@dr-nio/geo-locator/-/geo-locator-2.4.0.tgz","fileCount":5,"integrity":"sha512-ktj6rNsmdJdjO679nUDov+onIceOdvz5IcDaXO9ZV8wFOTnU6kgsIt308MHEXRcLtCKA2b9STBPofGmr9jFL0w==","signatures":[{"sig":"MEYCIQCV+TLUkUaOdzWYI+1mfiX+Z+t6ys3P46R/znyZtK2SDwIhALzgKAaHie6hSfdl8arcxiILjf5vAUKRzZd/j1VG0YYX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5037},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"edb8e61fe683ca3fd1725c29c1be906dbb4436d6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"dr-nio","email":"nicky.oscar@yahoo.com"},"repository":{"url":"git+https://github.com/Dr-Nio/geo-locator.git","type":"git"},"_npmVersion":"11.4.2","description":"A clean TypeScript package to convert an address into coordinates using the Open-Meteo Geocoding API.","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^20.11.30"},"_npmOperationalInternal":{"tmp":"tmp/geo-locator_2.4.0_1765168029581_0.12096198230233557","host":"s3://npm-registry-packages-npm-production"}},"2.5.0":{"name":"@dr-nio/geo-locator","version":"2.5.0","author":{"name":"Dr-Nio"},"license":"ISC","_id":"@dr-nio/geo-locator@2.5.0","maintainers":[{"name":"dr-nio","email":"nicky.oscar@yahoo.com"}],"homepage":"https://github.com/Dr-Nio/geo-locator#readme","bugs":{"url":"https://github.com/Dr-Nio/geo-locator/issues"},"dist":{"shasum":"3f7fd0e1137c6a35a8c102b3ec4636d2a4e09f36","tarball":"https://registry.npmjs.org/@dr-nio/geo-locator/-/geo-locator-2.5.0.tgz","fileCount":5,"integrity":"sha512-ODXhjZPFh3OiRhRFe2SDwI2V8Ixs2IiP58UzdaoNHQRJxLoWkA/cn8ta3siYGx06fi4pW8eQxlG6FmEyagUgFA==","signatures":[{"sig":"MEUCIC29HDal9ceR788cayJitc2WuKmFuCOUFYPKdcarui6xAiEAi0yAnd6hX779vviVl7yquBa5inSW3u1XNmG56Mh41Y4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5050},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"edb8e61fe683ca3fd1725c29c1be906dbb4436d6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"dr-nio","email":"nicky.oscar@yahoo.com"},"repository":{"url":"git+https://github.com/Dr-Nio/geo-locator.git","type":"git"},"_npmVersion":"11.4.2","description":"A clean TypeScript package to convert an address into coordinates using the Open-Meteo Geocoding API.","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^20.11.30"},"_npmOperationalInternal":{"tmp":"tmp/geo-locator_2.5.0_1765190578482_0.22094270611104982","host":"s3://npm-registry-packages-npm-production"}},"2.6.0":{"name":"@dr-nio/geo-locator","version":"2.6.0","description":"A clean TypeScript package to convert an address into coordinates using the Open-Meteo Geocoding API.","homepage":"https://github.com/Dr-Nio/geo-locator#readme","bugs":{"url":"https://github.com/Dr-Nio/geo-locator/issues"},"repository":{"type":"git","url":"git+https://github.com/Dr-Nio/geo-locator.git"},"license":"ISC","author":{"name":"Dr-Nio"},"type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","prepublishOnly":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"@types/node":"^20.11.30","typescript":"^5.9.3"},"_id":"@dr-nio/geo-locator@2.6.0","gitHead":"edb8e61fe683ca3fd1725c29c1be906dbb4436d6","_nodeVersion":"22.15.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-oJgL4vNSBwcKAsm7nIj9czRZyRYSOPAQjkMKVZZa7fH6PmZmzWqdtdxKtwSByTwyT+J3zlotctVAOa9rEeRoUA==","shasum":"9b6f6e0cae44bce20326876a622b2e4fbc04c9dd","tarball":"https://registry.npmjs.org/@dr-nio/geo-locator/-/geo-locator-2.6.0.tgz","fileCount":7,"unpackedSize":6619,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAVcDjdaNtY4eY/0HI6/lKWS/cdk3M6KVUw/c6mNkM5AAiBwo4W1oR3bllU2eEIza0If122I1OpPH9Ggfkk1W4t+zQ=="}]},"_npmUser":{"name":"dr-nio","email":"nicky.oscar@yahoo.com"},"directories":{},"maintainers":[{"name":"dr-nio","email":"nicky.oscar@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/geo-locator_2.6.0_1765194806407_0.7752478955813746"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-06T23:37:40.553Z","modified":"2025-12-08T11:53:26.749Z","1.0.0":"2025-12-06T23:37:40.802Z","2.0.0":"2025-12-08T03:39:53.702Z","2.1.0":"2025-12-08T03:46:36.175Z","2.2.0":"2025-12-08T04:08:04.157Z","2.3.0":"2025-12-08T04:20:20.651Z","2.4.0":"2025-12-08T04:27:09.704Z","2.5.0":"2025-12-08T10:42:58.618Z","2.6.0":"2025-12-08T11:53:26.547Z"},"bugs":{"url":"https://github.com/Dr-Nio/geo-locator/issues"},"author":{"name":"Dr-Nio"},"license":"ISC","homepage":"https://github.com/Dr-Nio/geo-locator#readme","repository":{"type":"git","url":"git+https://github.com/Dr-Nio/geo-locator.git"},"description":"A clean TypeScript package to convert an address into coordinates using the Open-Meteo Geocoding API.","maintainers":[{"name":"dr-nio","email":"nicky.oscar@yahoo.com"}],"readme":"# @dr-nio/geo-locator\n\nA lightweight and developer-friendly TypeScript package that converts any address into geographic coordinates using the **Open-Meteo Geocoding API**. No API key required, no rate limits, and fully free.\n\n---\n\n## 🚀 Features\n\n* ✔️ Convert any address into latitude & longitude\n* ✔️ Uses a stable, global, free geocoding API\n* ✔️ Built with TypeScript\n* ✔️ Zero dependencies\n* ✔️ Works in Node.js and server environments\n\n---\n\n## 📦 Installation\n\nInstall the package via npm:\n\n```bash\nnpm install @dr-nio/geo-locator\n```\n\nOr with yarn:\n\n```bash\nyarn add @dr-nio/geo-locator\n```\n\n---\n\n## 🧠 Usage Guide\n\n### **Basic Example**\n\n```ts\nimport { getCoordinates } from \"@dr-nio/geo-locator\";\n\nasync function run() {\n  try {\n    const coords = await getCoordinates(\"Ikeja, Lagos, Nigeria\");\n    console.log(\"Coordinates:\", coords);\n  } catch (error) {\n    console.error(error);\n  }\n}\n\nrun();\n```\n\n### Output Example\n\n```\n{\n  lat: 6.605874,\n  lng: 3.349149\n}\n```\n\n---\n\n## 📘 API Reference\n\n### **`getCoordinates(address: string): Promise<Coordinates>`**\n\nFetches the latitude and longitude for a given address string.\n\n#### **Parameters:**\n\n* `address` *(string)* – The location you want to geocode.\n\n#### **Returns:**\n\nA Promise that resolves to an object:\n\n```ts\ninterface Coordinates {\n  lat: number;\n  lng: number;\n}\n```\n\n#### **Example Response:**\n\n```\n{\n  lat: 40.7128,\n  lng: -74.0060\n}\n```\n\n#### **Throws Errors:**\n\n* Empty address passed\n* No coordinates found\n* Network or API failure\n\n---\n\n## 🌍 How It Works\n\nThe package uses the **Open-Meteo Geocoding API**, a free, public, reliable service:\n\n```\nhttps://geocoding-api.open-meteo.com/v1/search?name=ADDRESS&count=1\n```\n\nThis ensures:\n\n* No API key\n* Fast response\n* High uptime\n* Global coverage\n\n---\n\n## ⚙️ Development\n\n### Build the project\n\n```bash\nnpm run build\n```\n\n### Project Structure\n\n```\nsrc/\n  index.ts      → Source code\n\ndist/\n  index.js      → Compiled output\n  index.d.ts    → Type definitions\n```\n\n---\n\n## 📝 License\n\nThis project is licensed under the **ISC License**.\n\n---\n\n## 👨‍💻 Author\n\n**Dr‑Nio** — passionate about developer tools and clean architecture.\n\n---\n\n## ⭐ Support the Project\n\nIf you find this useful, give the repo a star or share it with other developers!\n","readmeFilename":"README.md"}