General API

IP Check

Look up geolocation, ISP, and network information for any public IPv4 or IPv6 address.

Request Example
<?php $ch = curl_init(); curl_setopt_array($ch, [ CURLOPT_URL => "https://app.way2api.com/api/v1/ip/check", CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json" ], CURLOPT_POSTFIELDS => json_encode([ "ip_address" => "195.250.21.125" ]) ]); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $data = json_decode($response, true); print_r($data);
const response = await fetch("https://app.way2api.com/api/v1/ip/check", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ "ip_address": "195.250.21.125" }) }); if (!response.ok) { throw new Error(`HTTP error: ${response.status}`); } const data = await response.json(); console.log(data);
curl -X POST https://app.way2api.com/api/v1/ip/check \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{\"ip_address\":\"195.250.21.125\"}'
$.ajax({ url: "https://app.way2api.com/api/v1/ip/check", type: "POST", contentType: "application/json", headers: { "Authorization": "Bearer YOUR_API_KEY" }, data: JSON.stringify({ "ip_address": "195.250.21.125" }), success: function(data) { console.log(data); }, error: function(xhr) { console.error(xhr.responseJSON); } });
const { data } = await axios.post( "https://app.way2api.com/api/v1/ip/check", {"ip_address":"195.250.21.125"}, { headers: { "Authorization": "Bearer YOUR_API_KEY" } } ); console.log(data);
import requests response = requests.post( "https://app.way2api.com/api/v1/ip/check", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, json={ "ip_address": "195.250.21.125" } ) print(response.status_code) print(response.json())
Response Example
200 OK Success Response
{
    "success": true,
    "message": "",
    "data": {
        "order_id": "W2A_SAMPLE_ORDER",
        "result": {
            "query": "195.250.21.125",
            "status": "success",
            "country": "India",
            "countryCode": "IN",
            "region": "MH",
            "regionName": "Maharashtra",
            "city": "Navi Mumbai",
            "zip": "400703",
            "lat": 19.0336,
            "lon": 73.0118,
            "timezone": "Asia/Kolkata",
            "isp": "WHG Hosting Services Ltd",
            "org": "WHG Hosting Services Ltd",
            "as": "AS199404 WHG Hosting Services Ltd"
        }
    }
}
4xx Error Response
{
    "success": false,
    "message": "ip_address must be a valid IPv4 or IPv6 address.",
    "data": {
        "error_code": "VALIDATION_ERROR"
    }
}
Common Response Codes
Code Meaning
200 OK — Request successful
400 Bad Request — Missing or invalid parameters
401 Unauthorized — Invalid or missing API key
429 Too Many Requests — Rate limit exceeded
500 Server Error — Try again later
Ready to integrate?

Start with free trial API calls. No credit card required.

Get API Key — Free Browse All APIs
Way2API Way2API
Contact Way2API

Login