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
| Status | Description | Error codes |
|---|---|---|
200 | The key is valid and the address is registered. | |
401 | The key is missing, unknown or revoked. | unauthenticated |
403 | The key is valid but this request is refused. | ip_not_allowed key_paused |
429 | A rate limit or a quota has been reached. | rate_limited quota_exceeded |
503 | The service cannot answer right now. | service_unavailable |