名称: idealista
描述: 通过 idealista-cli(OAuth2 客户端凭证)查询 Idealista API。
许可证: MIT
主页: https://github.com/quifago/idealista-cli
元数据: {"clawdbot": {"emoji": "🏠", "requires": {"bins": ["python3"], "env": ["IDEALISTA_API_KEY", "IDEALISTA_API_SECRET"], "primaryEnv": "IDEALISTA_API_KEY"}, "install": [{"id": "git", "kind": "git", "label": "安装 idealista-cli(git clone)", "url": "https://github.com/quifago/idealista-cli", "bins": ["python3"]}]}}
本技能文档介绍了如何使用本地 idealista-cli 工具查询 Idealista API。
~/idealista-cliIdealista 使用 OAuth2 客户端凭证 进行认证。
推荐使用环境变量:
IDEALISTA_API_KEY = client_idIDEALISTA_API_SECRET = client_secret示例:
export IDEALISTA_API_KEY="<CLIENT_ID>"
export IDEALISTA_API_SECRET="<CLIENT_SECRET>"
或通过 CLI 持久化保存:
python3 -m idealista_cli config set \
--api-key "<CLIENT_ID>" \
--api-secret "<CLIENT_SECRET>"
配置文件路径:
- ~/.config/idealista-cli/config.json
令牌缓存路径:
- ~/.cache/idealista-cli/token.json
获取令牌:
python3 -m idealista_cli token
python3 -m idealista_cli token --refresh
搜索房源:
python3 -m idealista_cli search \
--center "39.594,-0.458" \
--distance 5000 \
--operation sale \
--property-type homes \
--all-pages \
--format summary
计算统计信息:
python3 -m idealista_cli avg \
--center "39.594,-0.458" \
--distance 5000 \
--operation sale \
--property-type homes \
--group-by propertyType
以下示例可作为调用 CLI 的智能代理的“提示”参考: