View Country Name
The ClearIP API references each country by its unique ID defined within ClearIP. To obtain the corresponding human-readable country name, you must make a request with the country ID.
Method: GET
URL: https://api.clearip.com/countries/CLEARIP_COUNTRY_ID_HERE
Response Body:
{
"countries": [
{
"createdAt": CREATED_AT_UNIX_TIME_HERE,
"updatedAt": UPDATED_AT_UNIX_TIME_HERE,
"id": "CLEARIP_COUNTRY_ID_HERE
"name": "COUNTRY_NAME_HERE",
"code": "COUNTRY_CODE_HERE",
"isoAlpha2": "2_CHARACTER_ISO_CODE_HERE",
"isoAlpha3": "3_CHARACTER_ISO_CODE_HERE ",
"isoNumeric": "NUMERIC_ISO_CODE_HERE"
}
]
}
Example Request: View Country Names for Set of Country IDs
To request data for multiple IDs, the first ids field should have a question mark character ("?") in front. Subsequent ids fields should have an ampersand character ("&") in front.
Example Response: View Country Name for Specific Country IDs
{
"countries": [
{
"createdAt": 1502289244850,
"updatedAt": 1507358056387,
"id": "1369e742-ed33-40a1-8799-05966e32c5bc",
"name": "Canada",
"code": "1",
"isoAlpha2": "CA",
"isoAlpha3": "CAN",
"isoNumeric": "124"
},
{
"createdAt": 1502289244850,
"updatedAt": 1507358065732,
"id": "3008f0f8-e96e-4bf9-9cfd-ec017f131883",
"name": "United States",
"code": "1",
"isoAlpha2": "US",
"isoAlpha3": "USA",
"isoNumeric": "840"
},
{
"createdAt": 1502744277751,
"updatedAt": 1512677087484,
"id": "9ce80178-7232-46ef-9bfd-7c7a8ac1ec0d",
"name": "Unknown",
"code": "",
"isoAlpha2": "",
"isoAlpha3": "",
"isoNumeric": ""
},
{
"createdAt": 1502289244850,
"updatedAt": 1502289244850,
"id": "f43e9ba7-54f8-4687-91b0-be99ac7949eb",
"name": "Belgium",
"code": "32",
"isoAlpha2": "BE",
"isoAlpha3": "BEL",
"isoNumeric": "056"
}
]
}
View Location Name
A location refers to a U.S. state or Canadian territory or province. The ClearIP API references each location by its unique ID defined within ClearIP. To obtain the corresponding human-readable location name, you must make a request with the location ID.
Method: GET
URL: https://api.clearip.com/locations/CLEARIP_LOCATION_ID_HERE
Response Body:
{
"locations": [
{
"createdAt":CREATED_AT_UNIX_TIME_HERE,
"updatedAt":UPDATED_AT_UNIX_TIME_HERE,
"id": "CLEARIP_LOCATION_ID_HERE",
"name": "LOCATION_NAME_HERE",
"isoCode": "ISO_CODE_HERE",
"country": " CLEARIP_COUNTRY_ID_HERE"
}
]
}