重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
local-pois by brave/brave-search-skills
npx skills add https://github.com/brave/brave-search-skills --skill local-pois需要 API 密钥:在 https://api.search.brave.com 获取
套餐:包含在 搜索 套餐中。请参阅 https://api-dashboard.search.brave.com/app/subscriptions/subscribe
两步流程:此端点需要来自先前网络搜索的 POI ID。
- 调用
web-search并设置result_filter=locations,从locations.results[].id获取 POI ID- 将这些 ID 传递给此端点以获取完整的商家详情
curl -s "https://api.search.brave.com/res/v1/local/pois" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA="
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
curl -s "https://api.search.brave.com/res/v1/local/pois" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-H "X-Loc-Lat: 37.7749" \
-H "X-Loc-Long: -122.4194" \
-G \
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA=" \
--data-urlencode "ids=loc4HTAVTJKP4RBEBZCEMBI3NG26YD4II4PATIHPDYI=" \
--data-urlencode "units=imperial"
注意:POI ID 是网络搜索 locations.results[].id 中返回的不透明字符串。ID 是临时的,约 8 小时后过期。上面的示例 ID 仅用于说明——请通过 web-search 并设置 result_filter=locations 来获取新的 ID。使用 --data-urlencode,因为 ID 可能包含 =。
GET https://api.search.brave.com/res/v1/local/pois
认证:X-Subscription-Token: <API_KEY> 请求头
| 参数 | 类型 | 必需 | 默认值 | 描述 |
|---|---|---|---|---|
ids | string[] | 是 | — | 来自网络搜索结果的 POI ID(1-20 个) |
search_lang | string | 否 | en | 语言偏好(2+ 字符语言代码) |
ui_lang | string | 否 | en-US | 界面语言(区域代码,例如 "en-US") |
units | string | 否 | null | metric(公里)或 imperial(英里) |
用于根据用户位置计算距离:
| 请求头 | 类型 | 范围 | 描述 |
|---|---|---|---|
X-Loc-Lat | float | -90.0 到 90.0 | 用户纬度 |
X-Loc-Long | float | -180.0 到 180.0 | 用户经度 |
响应包含 type: "local_pois" 和一个 LocationResult 对象的 results 数组:
| 字段 | 类型 | 描述 |
|---|---|---|
title | string | 商家/POI 名称 |
url | string | 该位置的标准 URL |
provider_url | string | 提供方页面 URL |
type | string | 始终为 "location_result" |
id | string | POI 标识符(不透明字符串,有效期约 8 小时) |
description | string? | 简短描述 |
postal_address.type | string | 始终为 "PostalAddress" |
postal_address.displayAddress | string | 格式化后的显示地址 |
postal_address.streetAddress | string? | 街道地址 |
postal_address.addressLocality | string? | 城市 |
postal_address.addressRegion | string? | 州/地区 |
postal_address.postalCode | string? | 邮政编码/ZIP 码 |
postal_address.country | string? | 国家代码 |
contact.telephone | string? | 电话号码 |
contact.email | string? | 电子邮件地址 |
rating.ratingValue | float? | 平均评分(≥0) |
rating.bestRating | float? | 最高可能评分 |
rating.reviewCount | int? | 评论数量 |
rating.profile.name | string? | 评分提供方名称 |
rating.profile.url | string? | 评分提供方 URL |
opening_hours.current_day | object[]? | 今日营业时间(abbr_name, full_name, opens, closes) |
opening_hours.days | object[][]? | 每周各天的营业时间(相同结构) |
coordinates | [float, float]? | [纬度, 经度] 元组 |
distance.value | float? | 与用户位置的距离 |
distance.units | string? | 距离单位(km 或 miles) |
categories | string[] | 商家类别(默认 []) |
price_range | string? | 价格指示符($, $$, $$$, $$$$) |
serves_cuisine | string[]? | 菜系类型(餐厅) |
thumbnail.src | string? | 缩略图图片 URL |
thumbnail.original | string? | 原始图片 URL |
profiles | object[]? | 外部资料(name, url, long_name, img) |
reviews.reviews_in_foreign_language | bool | 是否有外语评论可用 |
pictures.results | object[]? | 照片缩略图 |
action | object? | 可执行的操作——包含 type(字符串)和 url(字符串) |
results | object[]? | 相关的网络结果(包含 meta_url 的 LocationWebResult) |
timezone | string? | IANA 时区(例如 America/Los_Angeles) |
timezone_offset | int? | UTC 时区偏移量 |
{
"type": "local_pois",
"results": [
{
"type": "location_result",
"title": "Park Mediterranean Grill",
"url": "https://yelp.com/biz/park-mediterranean-grill-sf",
"provider_url": "https://yelp.com/biz/park-mediterranean-grill-sf",
"id": "loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA=",
"postal_address": {
"type": "PostalAddress",
"displayAddress": "123 Main St, San Francisco, CA 94102",
"streetAddress": "123 Main St",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94102",
"country": "US"
},
"contact": { "telephone": "+1 415-555-0123" },
"thumbnail": {
"src": "https://example.com/thumb.jpg",
"original": "https://example.com/original.jpg"
},
"rating": {
"ratingValue": 4.5,
"bestRating": 5.0,
"reviewCount": 234,
},
"opening_hours": {
"current_day": [
{ "abbr_name": "Mon", "full_name": "Monday", "opens": "07:00", "closes": "21:00" }
]
},
"coordinates": [37.7749, -122.4194],
"distance": { "value": 0.3, "units": "miles" },
"categories": ["Mediterranean", "Greek"],
"price_range": "$$",
"serves_cuisine": ["Mediterranean", "Greek"],
"timezone": "America/Los_Angeles"
}
]
}
POI ID 来自 网络搜索 API (web-search) 并设置 result_filter=locations:
# 1. 搜索本地商家
curl -s "https://api.search.brave.com/res/v1/web/search?q=coffee+shops+near+me&result_filter=locations" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-H "X-Loc-Lat: 37.7749" \
-H "X-Loc-Long: -122.4194"
# 2. 从 locations.results[].id 提取 POI ID
# 3. 将这些 ID 用于此端点
--data-urlencode)metric 或 imperial 用于距离测量偏好每周安装量
25
代码仓库
GitHub 星标数
71
首次出现
2026年2月14日
安全审计
安装于
gemini-cli24
codex24
opencode23
github-copilot23
kimi-cli23
amp22
Requires API Key : Get one at https://api.search.brave.com
Plan : Included in the Search plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe
Two-step flow : This endpoint requires POI IDs from a prior web search.
- Call
web-searchwithresult_filter=locationsto get POI IDs fromlocations.results[].id- Pass those IDs to this endpoint to get full business details
curl -s "https://api.search.brave.com/res/v1/local/pois" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA="
curl -s "https://api.search.brave.com/res/v1/local/pois" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-H "X-Loc-Lat: 37.7749" \
-H "X-Loc-Long: -122.4194" \
-G \
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA=" \
--data-urlencode "ids=loc4HTAVTJKP4RBEBZCEMBI3NG26YD4II4PATIHPDYI=" \
--data-urlencode "units=imperial"
Note : POI IDs are opaque strings returned in web search locations.results[].id. IDs are ephemeral and expire after ~8 hours. The example IDs above are for illustration — fetch fresh IDs via web-search with result_filter=locations. Use --data-urlencode since IDs may contain =.
GET https://api.search.brave.com/res/v1/local/pois
Authentication : X-Subscription-Token: <API_KEY> header
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
ids | string[] | Yes | — | POI IDs from web search results (1-20) |
search_lang | string | No | en | Language preference (2+ char language code) |
ui_lang | string | No | en-US |
For distance calculation from user location:
| Header | Type | Range | Description |
|---|---|---|---|
X-Loc-Lat | float | -90.0 to 90.0 | User latitude |
X-Loc-Long | float | -180.0 to 180.0 | User longitude |
The response has type: "local_pois" and a results array of LocationResult objects:
| Field | Type | Description |
|---|---|---|
title | string | Business/POI name |
url | string | Canonical URL for the location |
provider_url | string | Provider page URL |
type | string | Always "location_result" |
id |
{
"type": "local_pois",
"results": [
{
"type": "location_result",
"title": "Park Mediterranean Grill",
"url": "https://yelp.com/biz/park-mediterranean-grill-sf",
"provider_url": "https://yelp.com/biz/park-mediterranean-grill-sf",
"id": "loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA=",
"postal_address": {
"type": "PostalAddress",
"displayAddress": "123 Main St, San Francisco, CA 94102",
"streetAddress": "123 Main St",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94102",
"country": "US"
},
"contact": { "telephone": "+1 415-555-0123" },
"thumbnail": {
"src": "https://example.com/thumb.jpg",
"original": "https://example.com/original.jpg"
},
"rating": {
"ratingValue": 4.5,
"bestRating": 5.0,
"reviewCount": 234,
},
"opening_hours": {
"current_day": [
{ "abbr_name": "Mon", "full_name": "Monday", "opens": "07:00", "closes": "21:00" }
]
},
"coordinates": [37.7749, -122.4194],
"distance": { "value": 0.3, "units": "miles" },
"categories": ["Mediterranean", "Greek"],
"price_range": "$$",
"serves_cuisine": ["Mediterranean", "Greek"],
"timezone": "America/Los_Angeles"
}
]
}
POI IDs come from the Web Search API (web-search) with result_filter=locations:
# 1. Search for local businesses
curl -s "https://api.search.brave.com/res/v1/web/search?q=coffee+shops+near+me&result_filter=locations" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-H "X-Loc-Lat: 37.7749" \
-H "X-Loc-Long: -122.4194"
# 2. Extract POI IDs from locations.results[].id
# 3. Use those IDs with this endpoint
--data-urlencode for cURL)metric or imperial for distance measurement preferenceWeekly Installs
25
Repository
GitHub Stars
71
First Seen
Feb 14, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
gemini-cli24
codex24
opencode23
github-copilot23
kimi-cli23
amp22
Lark Drive API 使用指南:飞书云文档、Wiki、表格 Token 处理与文件管理
40,700 周安装
| UI language (locale code, e.g., "en-US") |
units | string | No | null | metric (km) or imperial (miles) |
| string |
| POI identifier (opaque string, valid ~8 hours) |
description | string? | Short description |
postal_address.type | string | Always "PostalAddress" |
postal_address.displayAddress | string | Formatted display address |
postal_address.streetAddress | string? | Street address |
postal_address.addressLocality | string? | City |
postal_address.addressRegion | string? | State/region |
postal_address.postalCode | string? | Postal/ZIP code |
postal_address.country | string? | Country code |
contact.telephone | string? | Phone number |
contact.email | string? | Email address |
rating.ratingValue | float? | Average rating (≥0) |
rating.bestRating | float? | Max possible rating |
rating.reviewCount | int? | Number of reviews |
rating.profile.name | string? | Rating provider name |
rating.profile.url | string? | Rating provider URL |
opening_hours.current_day | object[]? | Today's hours (abbr_name, full_name, opens, closes) |
opening_hours.days | object[][]? | Hours for each day of the week (same structure) |
coordinates | [float, float]? | [latitude, longitude] tuple |
distance.value | float? | Distance from user location |
distance.units | string? | Distance unit (km or miles) |
categories | string[] | Business categories (default []) |
price_range | string? | Price indicator ($, $$, $$$, $$$$) |
serves_cuisine | string[]? | Cuisine types (restaurants) |
thumbnail.src | string? | Thumbnail image URL |
thumbnail.original | string? | Original image URL |
profiles | object[]? | External profiles (name, url, long_name, img) |
reviews.reviews_in_foreign_language | bool | Whether reviews in a foreign language are available |
pictures.results | object[]? | Photo thumbnails |
action | object? | Action to take — has type (string) and url (string) |
results | object[]? | Related web results (LocationWebResult with meta_url) |
timezone | string? | IANA timezone (e.g., America/Los_Angeles) |
timezone_offset | int? | UTC timezone offset |