Do you have an API?
Yes, our website provide a several API which we allow to use for free for other websites and/or applications.
Currently there are the following public APIs you can use for your needs:
- Text-based IP-detection.
- JSON-based extended IP information.
- Geo-IP API.
- Link building to website tools
It could be used to detect IP without any additional information. The API is accessible at http://smart-ip.myip/myip. Output is a plain/text and contains detected IP address string terminated with CR-LF characters (\r\n - "caret return", "line-feed").
There is no limit for requests to that page, but we reserve the right to protect our server from flood, so if you'll abuse to much the server, your IP address could be banned. By the way, we are ready to hold a heavy load, so in the most cases you are able really do a lot of requests per second.
This page is also could be easily used with the command-line in such environment as Linux to detect an external IP address. For example, such command does the job easily:
#> curl http://smart-ip.net/myip
If you need more info about detected IP address we strictly not recommend to abuse the main page of our website. When we are detecting such a case, we are adding abusing IPs to a permanent ban list forever.
If you need more info about IP, have a look at our next API, which will do the job for you.
JSON-based extended IP information
This is another way to detect IP with an additional information about it. For example, it could be used to build web-browser extensions or add IP-info to third-party websites.
NOTE: This API supports JSONP, callback function parameter name is "callback". So you can use it as http://smart-ip.net/info-json?callback=_your_function_name_.
ATTENTION! This API does not take any arguments and does not provide information to any IP address, except that is automatically detected.
There is also no hard limit to the number of requests to the service, but we recommend doing not more then 10 requests per second.
Geo-IP API - is our main service to retrieve a geolocation data by IP. It supports various parameters and produces XML and JSON response formats. This service also supports JSONP and cross domain XML requests.
The service has a day-limit for requests. See details at documentation page.
Link Building to Website Tools
Most of the tools on this site support parameterization. For example, you can build links on your website (or in the admin-panels or applications) that will provide the required information for the specified parameters. The following list describes the services and supported options:
Supported parameter is IP-address only. It should be set immediately after the service name. Example: http://ru.smart-ip.net/whois/220.127.116.11 (IPv4) or http://ru.smart-ip.net/whois/dead::beef (IPv6)
Supported parameters are: IP-address or hostname, number of attempts, the type of connection. Connection type and number of attempts are optional. Number of attempts is an integer in the range from 4 to 12. Connection type can be one of the values of "a" (IPv4), "aaaa" (IPv6), "auto" (automatic detection, which corresponds to the current connection to the site). Examples: http://ru.smart-ip.net/ping/google.com/8/a, http://ru.smart-ip.net/ping/google.com/4/aaaa, http:// ru.smart-ip.net/ping/2a00:1450:4007:803::1004
Supported parameters are: IP-address or hostname, the maximum number of hops, the connection type. Connection type and number of hops are optional. Number of hops is an integer in the range of 10 to 30. Connection type can be one of the values of "a" (IPv4), "aaaa" (IPv6), "auto" (automatic detection, which corresponds to the current connection to the site). Examples: http://ru.smart-ip.net/traceroute/google.com/20/a, http://ru.smart-ip.net/traceroute/google.com/20/aaaa, http:// ru.smart-ip.net/traceroute/2a00:1450:4007:803::1004
Supported parameter is IP-address only, which is set immediately after the service name. Example: http://ru.smart-ip.net/spam-check/18.104.22.168 (IPv4) or http://ru.smart-ip.net/whois/dead::beef (IPv6)
Supported parameters are: IP-address or host name, type of connection. Type of connection is optional and can be one of the values of "a" (IPv4), "aaaa" (IPv6), "auto" (automatic detection, which corresponds to the current connection to the site). Examples: http://ru.smart-ip.net/geoip/google.com/a, http://ru.smart-ip.net/geoip/google.com/aaaa, http://ru.smart- ip.net/geoip/2a00:1450:4007:803::1004
Supported parameter is e-mail address. Example: http://email@example.com