新しいリクエストを作成する | ドキュメント | IP Geolocation Bulk API | WhoisXML API

リクエストの新規作成

POST https://ip-geolocation.whoisxmlapi.com/api/bgservice/request

CURLリクエストのサンプル

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"}'

POSTリクエスト本文のサンプル

{
    "apiKey": "YOUR_API_KEY",
    "terms": [
        "[email protected]",
        "8.8.8.8",
        "yahoo.com"
    ],
    "format": "json"
}

入力パラメータ

apiKey

必須My productsページで個人用APIキーを取得してください。

terms

必須。配列。

ジオロケーション情報を取得するためのIPアドレス、メールアドレス、ドメイン名の配列が含まれます。

format

任意。文字列。

応答の形式を指定します。

利用可能な値:「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」フィールドが含まれます。

エラーの場合は、 「error」にその説明が含まれます。複数のエラーがある場合は、その説明が「errors」配列に返されます。

id

整数。

新しく作成されたリクエストID。

error

文字列。

エラーの説明。

errors

配列。

複数のエラーメッセージ。