gargoyle icon indicating copy to clipboard operation
gargoyle copied to clipboard

[New Feature] Add IP2Location.io API in gipquery.c

Open ip2location opened this issue 2 years ago • 8 comments

I would like to suggest adding IP2Location.io API to gipquery.c.

(a) get user IP address - https://ip2location.io/ip (b) get IP geolocation by IP address - https://api.ip2location.io/?ip=[IP]

ip2location avatar Dec 29 '23 05:12 ip2location

Hi, thanks for reaching out! Can you please confirm if these APIs are free to consume?

lantis1008 avatar Dec 29 '23 08:12 lantis1008

Yes, both APIs are free to use.

For the IP geolocation API, there is a limit of 500 queries per IP address per day.

ip2location avatar Dec 29 '23 09:12 ip2location

Thanks! I'll look into this, I'm in the process of doing a large update anyway.

lantis1008 avatar Dec 29 '23 10:12 lantis1008

..."message":"Limit to 500 queries per day. Sign up for a Free plan at https://www.ip2location.io to get 30K queries per month."}

obsy avatar Dec 29 '23 12:12 obsy

@obsy The keyless/tokenless 500 credits should be sufficient in most use case.

ip2location avatar Dec 29 '23 23:12 ip2location

Hi @ip2location

(a) get user IP address - https://api.ip2location.io/ip

Is this expected to work? I get the following message every time

root@Gargoyle:~# ewget https://api.ip2location.io/ip
{"error":{"error_code":10000,"error_message":"Invalid API key or insufficient credit."}}

The geolocation api seems to work fine.

lantis1008 avatar Feb 16 '24 10:02 lantis1008

Sorry, the correction endpoint should be as following:

(a) get user IP address - https://ip2location.io/ip

ip2location avatar Feb 16 '24 10:02 ip2location

Thanks for letting us know about your service, I've added it in to our new development branch with commit 6749b46. This issue will automatically close when we bring that in to master, but if you'd like to close it yourself feel free. 👍

lantis1008 avatar Feb 17 '24 06:02 lantis1008