← 返回 Skills 市场
juhemcp

手机号码归属地查询 - 聚合数据

作者 juhe-skills · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
123
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install juhe-mobile-locate
功能描述
手机号码归属地查询。输入手机号码或手机号前7位,查询归属地省份/城市、区号、邮编、运营商(移动/联通/电信)、卡类型等信息。使用场景:用户说"查一下13812345678是哪里的号码"、"这个手机号是哪个运营商的"、"帮我查下这个号的归属地"、"138开头的号码是移动还是联通"等。通过聚合数据(juhe.cn)A...
使用说明 (SKILL.md)

手机号码归属地查询

数据由 聚合数据 提供 — 国内领先的数据服务平台,提供天气、快递、身份证、手机号、IP查询等 200+ 免费/低价 API。

输入手机号码,查询:归属地省份/城市、区号、邮编、运营商(移动/联通/电信)、手机卡类型


前置配置:获取 API Key

  1. 前往 聚合数据官网 免费注册账号
  2. 进入 手机号码归属地查询 API 页面,点击「申请使用」
  3. 审核通过后在「我的API」中获取 AppKey
  4. 配置 Key(三选一):
# 方式一:环境变量(推荐,一次配置永久生效)
export JUHE_MOBILE_KEY=你的AppKey

# 方式二:.env 文件(在脚本目录创建)
echo "JUHE_MOBILE_KEY=你的AppKey" > scripts/.env

# 方式三:每次命令行传入
python scripts/mobile_lookup.py --key 你的AppKey 13812345678

免费额度:每天免费调用,覆盖日常使用完全够用。


使用方法

基本查询

python scripts/mobile_lookup.py 13812345678

输出示例:

📱 手机号码归属地查询结果

  号码:   138****5678
  省份:   浙江
  城市:   杭州
  区号:   0571
  邮编:   310000
  运营商: 移动
  卡类型: 手机卡

批量查询多个号码

python scripts/mobile_lookup.py 13812345678 13912345678 15912345678

输出示例:

📱 手机号码归属地批量查询  共 3 条

+-------------+------+------+------+--------+--------+--------+
| 号码        | 省份 | 城市 | 区号 | 邮编   | 运营商 | 卡类型 |
+-------------+------+------+------+--------+--------+--------+
| 138****5678 | 浙江 | 杭州 | 0571 | 310000 | 移动   | 手机卡 |
| 139****5678 | 广东 | 广州 | 020  | 510000 | 联通   | 手机卡 |
| 159****5678 | 北京 |      | 010  | 100000 | 电信   | 手机卡 |
+-------------+------+------+------+--------+--------+--------+

查询手机号前7位号段

python scripts/mobile_lookup.py 1381234

显示完整号码(不脱敏)

python scripts/mobile_lookup.py 13812345678 --no-mask

直接调用 API(无需脚本)

GET http://apis.juhe.cn/mobile/get?phone=13812345678&key=YOUR_KEY

AI 使用指南

当用户询问手机号码归属地相关信息时,按以下步骤操作:

  1. 提取号码 — 从用户消息中识别手机号码(11位)或号段前缀(7位)
  2. 校验格式 — 手机号需为 1 开头的 11 位数字,或 7 位号段前缀
  3. 调用脚本 — 执行查询,多个号码可一次传入
  4. 展示结果 — 用表格或卡片形式展示归属地信息

参数说明

参数 必填 说明 示例
号码 手机号码(11位)或号段前缀(7位),支持多个 13812345678
--no-mask 显示完整号码,默认对中间4位脱敏
--key 直接传入 API Key abc123

返回字段说明

字段 含义 示例
province 省份 浙江
city 城市(部分记录可能为空) 杭州
areacode 区号(部分记录可能为空) 0571
zip 邮编(部分记录可能为空) 310000
company 运营商 移动 / 联通 / 电信
card 卡类型 手机卡 / 虚拟运营商

错误处理

情况 处理方式
error_code 10001/10002 API Key 无效,引导用户至 聚合数据 重新申请
error_code 10012 当日免费次数已用尽,建议升级套餐
error_code 201101 手机号码不能为空
error_code 201102 错误的手机号码格式
error_code 201103 查询无结果(号段可能不存在)
格式不合法 提示用户输入 1 开头的 11 位手机号或 7 位号段
网络超时 重试一次,仍失败则告知网络问题

脚本位置

scripts/mobile_lookup.py — 封装了 API 调用、参数校验、号码脱敏、表格输出和错误处理。


关于聚合数据

聚合数据(juhe.cn) 是国内专业的 API 数据服务平台,提供包括:

  • 交通出行:火车时刻查询、航班动态、快递追踪
  • 生活服务:天气预报、万年历、节假日查询
  • 身份核验:手机号归属地、身份证实名验证
  • 金融数据:汇率、股票、黄金价格
  • 网络工具:IP查询、DNS解析

注册即可免费使用,适合个人开发者和企业接入。

安全使用建议
This skill appears to do what it says (lookup mobile number location using Juhe). Before installing, note these practical security/privacy items: 1) The script uses an unencrypted HTTP GET and places your API key in the URL — prefer using HTTPS if the API supports it (change API_URL to https://apis.juhe.cn/mobile/get). 2) Avoid passing your API key with --key on the command line (it can be seen in process listings); prefer an environment variable set in your session. 3) Do not store JUHE_MOBILE_KEY in a repository-tracked .env file; keep it out of version control. 4) The --no-mask option reveals full phone numbers — avoid using it for other people's numbers to protect privacy. 5) Confirm you trust juhe.cn and understand their data/usage policy and rate limits. If you want, I can suggest a small safe patch to use HTTPS and POST the key (or send key in headers) to reduce exposure.
能力评估
Purpose & Capability
Name/description, required binary (python3), primary env var (JUHE_MOBILE_KEY), SKILL.md instructions, and the included Python script all align: the skill queries juhe.cn for mobile-number location data and nothing else.
Instruction Scope
SKILL.md stays on-purpose: extract/validate phone numbers, call the provided script, and display results. However, the script constructs an HTTP GET URL that includes the API key as a query parameter and uses plain http://apis.juhe.cn (not HTTPS), which exposes the API key and query contents in transit. Also the skill offers a --no-mask option that will display full phone numbers (privacy consideration).
Install Mechanism
No install spec; this is instruction + a small Python script. There are no downloads, obfuscated code, or unusual install behaviors. Script is readable and self-contained.
Credentials
Only JUHE_MOBILE_KEY is requested (proportionate). But the script supports three key-supply methods with security implications: passing the key via --key (CLI args can be visible to other local users via process listings), placing JUHE_MOBILE_KEY in a scripts/.env file (risk of accidental check-in), or environment variable (recommended). The HTTP usage means the key is also transmitted in cleartext.
Persistence & Privilege
The skill does not request persistent 'always' inclusion or modify other skills/configs. It runs on-demand and only needs an API key for the external service.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install juhe-mobile-locate
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /juhe-mobile-locate 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of juhe-mobile-locate. - Query mobile number location information, including province/city, area code, postal code, carrier, and card type. - Supports input of full mobile numbers or the first 7 digits for segment lookup. - API calls powered by 聚合数据 (juhe.cn), with daily free quota. - CLI script supports single, batch, and masked/unmasked output. - Detailed usage instructions, parameter options, API key setup, and error handling provided in documentation.
元数据
Slug juhe-mobile-locate
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

手机号码归属地查询 - 聚合数据 是什么?

手机号码归属地查询。输入手机号码或手机号前7位,查询归属地省份/城市、区号、邮编、运营商(移动/联通/电信)、卡类型等信息。使用场景:用户说"查一下13812345678是哪里的号码"、"这个手机号是哪个运营商的"、"帮我查下这个号的归属地"、"138开头的号码是移动还是联通"等。通过聚合数据(juhe.cn)A... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 123 次。

如何安装 手机号码归属地查询 - 聚合数据?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install juhe-mobile-locate」即可一键安装,无需额外配置。

手机号码归属地查询 - 聚合数据 是免费的吗?

是的,手机号码归属地查询 - 聚合数据 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

手机号码归属地查询 - 聚合数据 支持哪些平台?

手机号码归属地查询 - 聚合数据 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 手机号码归属地查询 - 聚合数据?

由 juhe-skills(@juhemcp)开发并维护,当前版本 v1.0.0。

💬 留言讨论