Housing Market API 整合指南

參考表格、端點說明、錯誤代碼和範例皆由 API 規格產生,在所有語言版本中均保留英文。名稱、參數和代碼在各處完全相同。

IP 允許清單

金鑰只能從為其登錄的 IP 位址使用。您在訂閱時登錄一個位址。

若要了解我們看到的是哪個位址,請從您的伺服器呼叫 GET /v1/ping。回應會在 address 欄位中傳回該位址。請登錄這個位址,而非您辦公室或筆記型電腦的位址。

來自其他任何位址的請求都會遭拒絕並傳回 ip_not_allowed,即使金鑰正確也一樣。IPv4 和 IPv6 位址皆可接受。

您可以在主控台變更已登錄的位址。變更會留下紀錄且有次數限制,因此請登錄一台穩定伺服器的對外位址;如果您在雲端服務供應商上執行,請使用固定的對外位址。

如果您的伺服器位於代理伺服器或 NAT 閘道之後,請登錄代理伺服器或閘道的位址,因為我們看到的是該位址。

GET /v1/ping

Check your key and the address we see

Confirms that the key is accepted from the address the request came from, and echoes that address. Use it to check the IP you registered before you build anything else.

Parameters

No parameters.

Responses

StatusDescriptionError codes
200The key is valid and the address is registered.
401The key is missing, unknown or revoked.unauthenticated
403The key is valid but this request is refused.ip_not_allowed key_paused
429A rate limit or a quota has been reached.rate_limited quota_exceeded
503The service cannot answer right now.service_unavailable