資料說明
- 透過IP查詢國家以及時區
- 本資料來源已經有點久, 可能會有不準僅供參考
Endpoint
GET http://api.opencube.tw/ipcountryRequest
| # | 參數名稱 | 必填 | 說明 |
|---|---|---|---|
| 1 | ip | 是 | IP位址 |
Response
| # | 參數名稱 | 說明 |
|---|---|---|
| 1 | ip | 查詢的IP位址 |
| 2 | country | 國碼, 可參考國碼查詢 |
| 3 | country_name | 國家名稱 |
| 4 | timezone | 時區 |
Response Example
{"data":{"ip":"60.245.30.17","country":"TW","country_name":"台灣 ","timezone":"+08"},"status":200}
錯誤代碼
| status | 說明 |
|---|---|
| 200 | 成功 |
| 400 | 發生錯誤 |
| 404 | Endpoint錯誤 |
| 500 | 系統錯誤 |
