@laravelPWA

Quickstart

Make one API Request to see it in action, lookup any IP address

Your API response:

{"status":"success","country":"United States","countryCode":"US","region":"VA","regionName":"Virginia","city":"Ashburn","zip":"20149","lat":39.0438,"lon":-77.4874,"timezone":"America\/New_York","isp":"Amazon.com, Inc.","org":"AWS EC2 (us-east-1)","as":"AS14618 Amazon.com, Inc.","query":"100.25.42.211","areaCode":"","dmaCode":"511","inEU":0,"euVATrate":false,"continentCode":"NA","continentName":"North America","locationAccuracyRadius":"1000","currencyCode":"USD","currencySymbol":"$","currencySymbol_UTF8":"$","currencyConverter":0,"flag":"\ud83c\uddfa\ud83c\uddf8","callingCode":"1","languageCode":null,"security":{"is_proxy":false,"proxy_type":null,"is_crawler":false,"crawler_name":null,"crawler_type":null,"is_tor":false,"threat_level":"low","threat_types":null},"connection":{"asn":14618,"isp":"amazon.com Inc."},"type":"ipv4"}

Documentation

API Access Key & Authentication

After signing up, every user is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the IpXapi API, simply include your bearer token in the Authorization header.

Headers

Header Description
Authorization [Required] Should be Bearer access_key. See "Your API Access Key" above.

API Features

Object Description
IP address [Required] IP to look up using ipXapi.

Example API Request:

 curl 'https://ipxapi.com/api/ip?ip=100.25.42.211' -X GET  -H 'Accept: application/json' -H 'Authorization: Bearer '

Example API Response:

{"status":"success","country":"United States","countryCode":"US","region":"VA","regionName":"Virginia","city":"Ashburn","zip":"20149","lat":39.0438,"lon":-77.4874,"timezone":"America\/New_York","isp":"Amazon.com, Inc.","org":"AWS EC2 (us-east-1)","as":"AS14618 Amazon.com, Inc.","query":"100.25.42.211","areaCode":"","dmaCode":"511","inEU":0,"euVATrate":false,"continentCode":"NA","continentName":"North America","locationAccuracyRadius":"1000","currencyCode":"USD","currencySymbol":"$","currencySymbol_UTF8":"$","currencyConverter":0,"flag":"\ud83c\uddfa\ud83c\uddf8","callingCode":"1","languageCode":null,"security":{"is_proxy":false,"proxy_type":null,"is_crawler":false,"crawler_name":null,"crawler_type":null,"is_tor":false,"threat_level":"low","threat_types":null},"connection":{"asn":14618,"isp":"amazon.com Inc."},"type":"ipv4"}

Examples

PHP cURL

                $curl = curl_init();
                
                curl_setopt_array($curl, array(
                  CURLOPT_URL => "https://ipxapi.com/api/ip?ip=8.8.8.8",
                  CURLOPT_RETURNTRANSFER => true,
                  CURLOPT_ENCODING => "",
                  CURLOPT_MAXREDIRS => 10,
                  CURLOPT_TIMEOUT => 30,
                  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                  CURLOPT_HTTPHEADER => array(
                    "Accept: application/json",
                    "Authorization: Bearer ",
                    "Content-Type: application/json",
                    "cache-control: no-cache"
                  ),
                ));
                
                $response = curl_exec($curl);
                $err = curl_error($curl);
                
                curl_close($curl);
                
                if ($err) {
                  echo "cURL Error #:" . $err;
                } else {
                  echo $response;
                }

Python

                import requests

                url = "https://ipxapi.com/api/ip?ip=8.8.8.8"
                
                headers = {
                    'Accept': "application/json",
                    'Content-Type': "application/json",
                    'Authorization': "Bearer ",
                    'cache-control': "no-cache"
                    }
                
                response = requests.request("GET", url, headers=headers)
                
                print(response.text)

JavaScript Jquery AJAX

                var settings = {
                "async": true,
                "crossDomain": true,
                "url": "https://ipxapi.com/api/ip?ip=8.8.8.8",
                "method": "GET",
                "headers": {
                  "Accept": "application/json",
                  "Content-Type": "application/json",
                  "Authorization": "Bearer ",
                  "cache-control": "no-cache"
                },
                "processData": false
              }
              
              $.ajax(settings).done(function (response) {
                console.log(response);
              });
Copyright © 2022 ipXapi . All rights reserved. Hand-crafted & made with in London