Get country data by IP address
Returns country information (ISO 3166-1 alpha-2 code) and phone prefix for the specified IP address. If the IP address is not provided, returns data based on the request IP address.
Query Parameters
- Type: stringip
IPv4 or IPv6 address. If not provided, the request IP address is used.
Responses
- application/json
Request Example for get/public/data-by-ip
curl 'https://sandbox-api.mrcr.io/v1.6/public/data-by-ip?ip='
{
"data": {
"country": {
"code": "string",
"enabled": true,
"phone_prefix": 1
}
},
"status": 1
}