# IP

IP address lookup empowers with vital information about the origin, behavior, and geolocation of internet traffic. By analyzing IP addresses, this tool enhances network security, facilitates geotargeting strategies, and enables informed decision-making in various online activities.

## ip\_lookup

<mark style="color:green;">`POST`</mark> `https://secctrl.tutelar.io/api/v1/services/business_profile/ip_lookup`

### Post parameters description is given below,

<table><thead><tr><th>Body</th><th width="148">Type</th><th>Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>ip_address</td><td>String</td><td>Yes</td><td>IP Address</td></tr></tbody></table>

#### Sample Request Body

```json
{
  "ip_address": "255.255.0.0"
}
```

{% tabs %}
{% tab title=" 200: Success Response" %}

```json
{
    "success": true,
    "code": 200,
    "message": "The request has been successfully completed.",
    "reference_id": "007be974-a37c-4dc9-a39f-0cfd17452840",
    "status": "completed",
    "result": {
        "city": {
            "geo_id": 1264527,
            "name": "Chennai"
        },
        "continent": {
            "geo_id": 6255147,
            "code": "AS",
            "name": "Asia"
        },
        "country": {
            "geo_id": 1269750,
            "iso_code": "IN",
            "name": "India"
        },
        "location": {
            "accuracy_radius": 5,
            "latitude": 12.8996,
            "longitude": 80.2209,
            "time_zone": "Asia/Kolkata"
        },
        "postal_code": "600002",
        "registered_country": {
            "geo_id": 1269750,
            "iso_code": "IN",
            "name": "India"
        },
        "subdivisions": [
            {
                "geo_id": 1255053,
                "iso_code": "TN",
                "name": "Tamil Nadu"
            }
        ]
    },
    "requested_at": "2024-03-14T11:09:20.804Z",
    "completed_at": "2024-03-14T11:09:21.213Z"
}
```

{% endtab %}

{% tab title="400: Validation Error Response" %}

```json
{
    "success": false,
    "code": 400,
    "message": "Invalid input. Please check your request and try again.",
    "error": {
        "message": "Invalid IP Address",
        "field": "ip_address",
        "code": "BAD_REQUEST"
    }
}
```

{% endtab %}

{% tab title="200: Failure Response" %}

```json
{
    "success": true,
    "code": 200,
    "message": "The request could not be completed due to an error.",
    "reference_id": "8e22a730-b2dc-45b8-8532-91c076ca432c",
    "status": "failed",
    "error": {
        "message": "IP lookup not found or invalid. Please review the ip address information for accuracy.",
        "code": "ERROR"
    },
    "requested_at": "2024-03-14T11:13:58.757Z",
    "completed_at": "2024-03-14T11:13:58.969Z"
}
```

{% endtab %}
{% endtabs %}
