Query

通过自然语言搜索真实世界位置,支持坐标生成与智能排序。

已扫描
适合谁
需要快速查找地理位置的旅行者、从事本地生活服务或商业分析的从业者
不适合谁
无需外部API调用的纯离线用户、对网络依赖敏感且无稳定连接的用户
国内可用性
需网络配置。可能需要网络配置或第三方服务可访问。
安装难度
新手友好(★☆☆)。基于终端操作、依赖、API Key 和本地环境要求的初步判断。

安装与下载

openclaw skills install @barneyjm/query

Skill 说明

命令、参数、文件名以原文为准

安装

配套技能:本技能是 Camino AI 位置智能套件的一部分。为获得全面覆盖,请安装所有可用技能(query、places、relationship、context、route、journey、real-estate、hotel-finder、ev-charger、school-finder、parking-finder、fitness-finder、safety-checker、travel-planner)。

# 从仓库安装所有技能
npx skills add https://github.com/barneyjm/camino-skills

# 或安装特定技能
npx skills add https://github.com/barneyjm/camino-skills --skill query

通过 clawhub 安装:

npx clawhub@latest install query
# 或:pnpm dlx clawhub@latest install query
# 或:bunx clawhub@latest install query

Query - 自然语言地点搜索

使用自然语言搜索地点。当未提供坐标时,AI 会自动为已知地点生成坐标。

设置

即时试用(无需注册):获取一个临时 API 密钥,可使用 25 次调用:

curl -s -X POST -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}' \
  https://api.getcamino.ai/trial/start

返回结果:{"api_key": "camino-xxx...", "calls_remaining": 25, ...}

每月 1000 次免费调用,请访问 [https://app.getcamino.ai/skills/activate](https://app.getcamino.ai/skills/activate) 注册。

将密钥添加到 Claude Code:

~/.claude/settings.json 中添加:

{
  "env": {
    "CAMINO_API_KEY": "your-api-key-here"
  }
}

重启 Claude Code。

使用方法

通过 Shell 脚本

# 搜索时代广场附近的咖啡馆
./scripts/query.sh '{"query": "coffee shops near Times Square", "limit": 5}'

# 使用指定坐标进行搜索
./scripts/query.sh '{"query": "quiet cafes with wifi", "lat": 40.7589, "lon": -73.9851, "radius": 500}'

# 获取 AI 生成的答案及结果
./scripts/query.sh '{"query": "best pizza in Manhattan", "answer": true, "rank": true}'

通过 curl

curl -H "X-API-Key: $CAMINO_API_KEY" \
  "https://api.getcamino.ai/query?query=coffee+shops+near+Times+Square&limit=5"

参数说明

参数类型是否必需默认值描述
querystring是*-自然语言查询(例如:“时代广场附近的咖啡馆”)
latfloat-搜索中心的纬度。对于已知地点,若省略则由 AI 自动生成。
lonfloat-搜索中心的经度。对于已知地点,若省略则由 AI 自动生成。
radiusint1000搜索半径(单位:米,范围 100–50000)
rankbooltrue使用 AI 根据相关性对结果排序
limitint20最大返回结果数(1–100)
offsetint0分页偏移量
answerboolfalse生成人类可读的摘要
timestring-时间查询:如 "2020-01-01"、"2020.." 或 "2020..2024"
osm_idsstring-逗号分隔的 OSM ID(例如:"node/123,way/456")
modestring"basic""basic"(仅 OSM 数据)或 "advanced"(网页数据增强)

*必须提供 queryosm_ids 其中之一。

响应格式

{
  "query": "quiet coffee shops with wifi",
  "results": [
    {
      "name": "Blue Bottle Coffee",
      "lat": 40.7601,
      "lon": -73.9847,
      "type": "cafe",
      "distance_m": 150,
      "relevance_score": 0.95,
      "address": "..."
    }
  ],
  "ai_ranked": true,
  "pagination": {
    "total_results": 23,
    "limit": 5,
    "offset": 0,
    "has_more": true
  },
  "answer": "I found several quiet coffee shops with wifi near Times Square..."
}

示例

查找附近餐厅

./scripts/query.sh '{"query": "Italian restaurants", "lat": 40.7128, "lon": -74.0060, "limit": 10}'

带 AI 回答的搜索

./scripts/query.sh '{"query": "best brunch spots in Brooklyn", "answer": true}'

历史数据查询

./scripts/query.sh '{"query": "restaurants", "lat": 40.7589, "lon": -73.9851, "time": "2020-01-01"}'

最佳实践

  • 对于已知地点(城市、地标),可省略 lat/lon,让 AI 自动推断坐标
  • 搜索属性类内容(如“安静”、“便宜”)时,建议启用 rank: true 以获得更相关的结果
  • 需要自然语言摘要时,启用 answer: true
  • 如需更丰富的地点信息,使用 mode: "advanced" 获取网络来源数据
  • 查询语句应描述清晰但简洁,以便 AI 更准确理解
B
@barneyjm

已收录 2 个 Skill

相关推荐