API documentation
Back to Home »
Table of Contents
IP Analyzer accepts TCP request with JSON encoded payload. All payload will pass through basic validation.
If you have enabled the optional API password authentication in env, you should append the password with auth
as key in the payload.
{
"ip": "1.1.1.1",
"auth": "password"
}
Name | Type | Description |
---|---|---|
ping |
any |
Ping service |
{
"ping": null
}
Success Response
{
"status": "success",
"data": null,
"message": "pong"
}
Name | Type | Description |
---|---|---|
status |
any |
Get service status |
Status API is only available when any of the following conditions are met:
- IP Analyzer is running in single worker mode
- Redis integration is enabled
{
"status": null
}
Success Response
{
"status": "success",
"data": {
"analyzed": 10,
"failed": 1
},
"message": null
}
Failed Response
{
"status": "error",
"data": null,
"message": "Redis store or running in single worker is required"
}
Name | Type | Description |
---|---|---|
ip |
string |
an IPv4/IPv6 string |
Get geo info on an IP address
{
"ip": "128.101.101.101"
}
Success Response
{
"status": "success",
"data": {
"code": "NA",
"continent": "North America",
"iso": "US",
"country": "United States",
"isEU": false,
"city": "Minneapolis",
"postal": "55423",
"div": "Minnesota",
"divIso": "MN",
"accuracy": 20,
"lat": 44.8769,
"long": -93.2535,
"timezone": "America\/Chicago"
},
"message": null
}
Please see Maxmind API docs for details on these returned data
If you have enabled the IPsum integration, a threat
number will be included in analysis result. The greater the number, the higher chance it might be a credible threat.
{
"status": "success",
"data": {
...
"threat": 5
},
"message": null
}
Failed Response
{
"status": "error",
"data": null,
"message": "invalid ip"
}
Name | Type | Description |
---|---|---|
iplist |
array |
an array of IPv4/IPv6 string(s) (max. 100 items) |
Get geo info on a list of IP address
{
"iplist": [
"128.101.101.101",
"128.101.101.102",
"128.101.101.103"
]
}
Success Response
{
"status": "success",
"data": {
"128.101.101.101": {
"code": "NA",
"continent": "North America",
"iso": "US",
"country": "United States",
"isEU": false,
"city": "Minneapolis",
"postal": "55423",
"div": "Minnesota",
"divIso": "MN",
"accuracy": 20,
"lat": 44.8769,
"long": -93.2535,
"timezone": "America\/Chicago"
},
"128.101.101.102": {
"code": "NA",
"continent": "North America",
"iso": "US",
"country": "United States",
"isEU": false,
"city": "Minneapolis",
"postal": "55423",
"div": "Minnesota",
"divIso": "MN",
"accuracy": 20,
"lat": 44.8769,
"long": -93.2535,
"timezone": "America\/Chicago"
},
"128.101.101.103": {
"code": "NA",
"continent": "North America",
"iso": "US",
"country": "United States",
"isEU": false,
"city": "Minneapolis",
"postal": "55423",
"div": "Minnesota",
"divIso": "MN",
"accuracy": 20,
"lat": 44.8769,
"long": -93.2535,
"timezone": "America\/Chicago"
}
},
"message": null
}
Please see Maxmind API docs for details on these returned data