local-descriptions
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLocal Descriptions (Search API)
本地描述(Search API)
Requires API Key: Get one at https://api.search.brave.comPlan: Included in the Search plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribeTwo-step flow: This endpoint requires POI IDs from a prior web search.
- Call
withweb-searchto get POI IDs fromresult_filter=locationslocations.results[].id- Pass those IDs to this endpoint to get AI-generated descriptions
需API Key:前往https://api.search.brave.com 获取套餐要求:包含在搜索套餐中,详情查看https://api-dashboard.search.brave.com/app/subscriptions/subscribe两步流程:该接口需要从前置的网络搜索请求中获取POI ID
- 调用
并设置web-search,从result_filter=locations字段获取POI IDlocations.results[].id- 将这些ID传入本接口即可获取AI生成的描述
Quick Start (cURL)
快速开始(cURL)
Get POI Description
获取POI描述
bash
curl -s "https://api.search.brave.com/res/v1/local/descriptions?ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA%3D" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"bash
curl -s "https://api.search.brave.com/res/v1/local/descriptions?ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA%3D" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"Multiple POIs
多个POI
bash
curl -s "https://api.search.brave.com/res/v1/local/descriptions" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA=" \
--data-urlencode "ids=loc4HTAVTJKP4RBEBZCEMBI3NG26YD4II4PATIHPDYI="Note: POI IDs are opaque strings returned in web search . They are valid for approximately 8 hours. The example IDs above are for illustration — fetch fresh IDs via with .
locations.results[].idweb-searchresult_filter=locationsbash
curl -s "https://api.search.brave.com/res/v1/local/descriptions" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA=" \
--data-urlencode "ids=loc4HTAVTJKP4RBEBZCEMBI3NG26YD4II4PATIHPDYI="注意:POI ID是网络搜索接口返回的不透明字符串,有效期约为8小时。上述示例ID仅用于演示,请通过设置了的请求获取最新的ID。
result_filter=locationsweb-searchEndpoint
接口地址
http
GET https://api.search.brave.com/res/v1/local/descriptionsAuthentication: header
X-Subscription-Token: <API_KEY>http
GET https://api.search.brave.com/res/v1/local/descriptions鉴权方式:通过请求头鉴权
X-Subscription-Token: <API_KEY>Parameters
参数
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string[] | Yes | — | POI IDs from web search |
| 参数 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string[] | 是 | — | 从网络搜索 |
Response Format
响应格式
Response Fields
响应字段
| Field | Type | Description |
|---|---|---|
| string | Always |
| array | List of description objects (entries may be |
| string | Always |
| string | POI identifier matching the request |
| string? | AI-generated markdown description, or |
| 字段 | 类型 | 描述 |
|---|---|---|
| string | 固定为 |
| array | 描述对象列表,条目可能为 |
| string | 固定为 |
| string | 与请求对应的POI标识符 |
| string? | AI生成的markdown格式描述,无可用内容时返回 |
Example Response
示例响应
json
{
"type": "local_descriptions",
"results": [
{
"type": "local_description",
"id": "loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA=",
"description": "### Overview\nA cozy neighborhood cafe known for its **artisanal coffee**..."
}
]
}json
{
"type": "local_descriptions",
"results": [
{
"type": "local_description",
"id": "loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA=",
"description": "### Overview\nA cozy neighborhood cafe known for its **artisanal coffee**..."
}
]
}Getting POI IDs
获取POI ID
POI IDs come from the Web Search API () with :
web-searchresult_filter=locationsbash
undefinedPOI ID来自设置了的Web Search API():
result_filter=locationsweb-searchbash
undefined1. Search for local businesses
1. 搜索本地商家
curl -s "https://api.search.brave.com/res/v1/web/search?q=restaurants+san+francisco&result_filter=locations"
-H "Accept: application/json"
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
-H "Accept: application/json"
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
curl -s "https://api.search.brave.com/res/v1/web/search?q=restaurants+san+francisco&result_filter=locations"
-H "Accept: application/json"
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
-H "Accept: application/json"
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
2. Extract POI IDs from locations.results[].id
2. 从locations.results[].id提取POI ID
3. Use those IDs with local/pois and local/descriptions
3. 将这些ID用于local/pois和local/descriptions接口
undefinedundefinedUse Cases
适用场景
- Local business overview: Pair with to get both structured data (hours, ratings) and narrative descriptions
local-pois - Travel/tourism enrichment: Add descriptive context to POIs for travel planning or destination guides
- Search results augmentation: Supplement web search results with AI-generated summaries of local businesses
- 本地商家概览:与接口搭配使用,可同时获取结构化数据(营业时间、评分)和叙述性描述
local-pois - 旅行/旅游内容丰富:为POI添加描述性上下文,用于旅行规划或目的地指南
- 搜索结果增强:用AI生成的本地商家摘要补充网页搜索结果
Notes
注意事项
- Always markdown: Descriptions use headings, bullet lists, bold/italics — always formatted as markdown
### - Travel-guide tone: Typically 200-400 words covering what makes the POI notable
- AI-generated: Descriptions are AI-generated based on web search context, not sourced from business profiles
- Availability: Not all POIs have descriptions — may be
descriptionnull - Max IDs: Up to 20 IDs per request
- 始终为markdown格式:描述使用标题、无序列表、*粗体/斜体格式,统一为markdown排版
### - 旅行指南风格:通常为200-400字,内容涵盖POI的特色亮点
- AI生成:描述基于网页搜索上下文AI生成,并非来自商家官方资料
- 可用性:并非所有POI都有对应描述,可能为
descriptionnull - ID数量上限:每次请求最多传入20个ID