ericpaulbishop/gargoyle

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

ip2location opened this issue · 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]

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

Yes, both APIs are free to use.

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

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

obsy commented

..."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 The keyless/tokenless 500 credits should be sufficient in most use case.

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.

Sorry, the correction endpoint should be as following:

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

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.
👍