curl https://ip-geolocation.whoisxmlapi.com/api/bgservice/request -X POST -H "Content-Type: application/json" -d '{"apiKey": "YOUR_API_KEY", "terms": ["[email protected]", "8.8.8.8", "yahoo.com"], "format": "json"}'
{
"apiKey": "YOUR_API_KEY",
"terms": [
"[email protected]",
"8.8.8.8",
"yahoo.com"
],
"format": "json"
}
apiKey |
必填。在“我的产品”页面获取您的个人 API KEY。 |
条款 |
必填。Array。 包含用于获取地理定位的 IP、电子邮件、域名数组。 |
format |
选填。String。 用于指定响应格式。 允许值:“xml”、“json”、“csv”。 默认值:“json”。 |
{
"response": {
"id": 5
}
}
Code: 200 OK.
{
"response": {
"errors": [
"The format field should have one of the following values: json, xml."
]
}
}
Code: 400 Bad Request.
{
"response": {
"error": "Authorisation or authentication failed"
}
}
Code: 401 Unauthorized.
{
"response": {
"error": "Insufficient balance"
}
}
Code: 402 Payment Required.
response |
响应对象。 运行成功时包含整数“id”字段。 如果出现错误,它会在“错误”字段中包含其描述。如果有多个错误,它们的描述将返回到“错误”数组中。 |
ID |
整数。 新创建的请求 ID。 |
error |
String 错误描述。 |
errors |
Array 多条错误信息。 |
WhoisXML API使用cookies来为您提供网站最佳用户体验,此外,cookies将协助我们了解网站的使用情况。点击此处了解更多信息。如继续使用我们的网站,即表示您同意使用cookies条款。