Programmatically convert IP's into GEO location data.
npm install @ip2geo/sdk
Your go-to IP-to-Geo cloud service — fast, accurate, and built for developers. Start free with 2,000 monthly stored conversions.
Website
•
Dashboard
•
Documentation
•
Services Status
This package provides a lightweight, type-safe way to integrate Ip2Geo. Blazingly fast and works with Node, Bun, and Deno out of the box.
bun
npm i @ip2geo/sdk@latest
`$3
`typescript
import { Init } from '@ip2geo/sdk'
import { Env } from '@/data'await Init(Env.IP2GEO_API_KEY)
`$3
`typescript
import { ConvertIP, ConvertIPs } from '@ip2geo/sdk'const convertedIp = await ConvertIP({
ip: '8.8.8.8'
})
const convertedIps = await ConvertIPs({
ips: [
'8.8.8.8',
'1.1.1.1',
'9.9.9.9',
'64.6.64.6'
]
})
// {
// success: boolean
// code: number
// message: string
// data: Ip | null
// _req: {
// reqId: string | null
// resTime: number
// }
// }
// {
// message: string
// code: number
// sucess: boolean
// data: [
// {
// ip: string
// conversion: Ip | null
// }
// ],
// _req: {
// reqId: string | null
// resTime: number
// }
// }
``