API Basics
Data Tools
WWW
Browser Bot
HTML Clean
URL Info
Telephony
Geolocation
Security and Networking
E-commerce
Imaging
Legacy APIs

Examples

Example code for various languages. You might also like to check out our SDKs

C#
Go
PHP

Ruby Example

Note:
This is a minimal 'cut and paste' example demonstrating the IP Info API.
This example does not include any error handling or validation of response data.
require "net/http"
require "net/https"
require "uri"
require "json"
 
uri = URI.parse("https://neutrinoapi.net/ip-info")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(
    {
        "user-id" => "YOUR_USER_ID", 
        "api-key" => "YOUR_API_KEY",
        "ip" => "162.209.104.195"
    })
response = http.request(request)
result = JSON.parse response.body
 
print result['country'], "\n"
print result['country-code'], "\n"
print result['region'], "\n"
print result['city'], "\n"