API Basics
★  Fundamentals
★  Error Codes
★  Examples
★  Batch Processing
★  Specifications
★  Best Practice
★  SDKs
★  Stats
Data Tools
WWW
Telephony
Geolocation
Security and Networking
E-commerce
Imaging

Examples

Minimal snippets for various languages. You might also like to check out our SDKs

C#
Go
PHP

Perl Example


use LWP::UserAgent;
use URI::Escape;
use JSON;

my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(POST => "https://neutrinoapi.com/ip-info");
$req->content_type("application/x-www-form-urlencoded");
$req->content(
  "user-id=".uri_escape("YOUR_USER_ID")."&".
  "api-key=".uri_escape("YOUR_API_KEY")."&".
  "ip=".uri_escape("162.209.104.195")
);

my $resp = $ua->request($req);
$result = decode_json($resp->content);
print $result->{"country"} . "\n";
print $result->{"country-code"} . "\n";
print $result->{"region"} . "\n";
print $result->{"city"} . "\n";