介绍
# Swiss Phone Directory Skill
在瑞士电话簿 (search.ch) 中搜索商家、人员和电话号码。
## 快速开始
```bash # Search for a business python3 scripts/searchch.py search "Migros" --location "Zürich"
# Search for a person python3 scripts/searchch.py search "Müller Hans" --type person
# Reverse phone number lookup python3 scripts/searchch.py search "+41442345678"
# Business-only search python3 scripts/searchch.py search "Restaurant" --location "Bern" --type business --limit 5 ```
## 命令
### search
搜索商家、人员或电话号码。
```bash python3 scripts/searchch.py search <query> [options]
Options: --location, -l City, ZIP, street, or canton (e.g., "Zürich", "8000", "ZH") --type, -t Filter: "business", "person", or "all" (default: all) --limit, -n Max results (default: 10, max: 200) --lang Output language: de, fr, it, en (default: de) ```
### 示例
```bash # Find restaurants in Rapperswil python3 scripts/searchch.py search "Restaurant" -l "Rupperswil" -t business -n 5
# Find a person by name python3 scripts/searchch.py search "Meier Peter" -l "Zürich" -t person
# Reverse lookup a phone number python3 scripts/searchch.py search "044 123 45 67"
# Search with canton abbreviation python3 scripts/searchch.py search "Bäckerei" -l "SG" ```
## 输出格式
结果包括(如可用): - **Name** - 商家或人员名称 - **Type** - 机构或人员 - **Address** - 街道、邮编、城市、州 - **Phone** - 可点击的 tel: 链接(例如 `[044 123 45 67](tel:+41441234567)`) - **Fax** - 可点击的 tel: 链接 - **Email** - 电子邮件地址 - **Website** - 网站 URL - **Categories** - 业务类别
### 可点击的电话号码 📞
电话号码会自动使用 `tel:` 协议格式化为 Markdown 链接: ``` 📞 [044 123 45 67](tel:+41441234567) ```
这可以在移动设备(Telegram、Signal、WhatsApp 等)上实现**一键拨号**。
要禁用可点击链接,请使用 `--no-clickable`。
## 配置
### 获取 API 密钥(免费)
1. **请求密钥:** https://search.ch/tel/api/getkey.en.html 2. 填写表格(姓名、电子邮件、用例) 3. **审批:** 大约 10-15 分钟,密钥将通过电子邮件发送
### 设置环境变量
```bash export SEARCHCH_API_KEY="your-api-key-here" ```
有关永久设置,请参阅 [references/configuration.md](references/configuration.md)。
## API 参考
- Base URL: `https://search.ch/tel/api/` - Rate limits: 取决于 API 密钥等级 - Full docs: https://search.ch/tel/api/help.en.html