local-place-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePlace Search (Search API)
地点搜索(Search API)
Requires API Key: Get one at https://api.search.brave.comPlan: Included in the Search plan (withoption). See https://api-dashboard.search.brave.com/app/subscriptions/subscribelocationsStandalone: Unlikeandlocal-pois, this endpoint does not require POI IDs from a prior web search. You provide a location and an optional query directly.local-descriptions
需要API Key:可前往https://api.search.brave.com获取套餐包含:属于Search套餐(含选项)。详情请见https://api-dashboard.search.brave.com/app/subscriptions/subscribelocations独立使用:与和local-pois不同,此端点无需来自前置网页搜索的POI ID。你可直接提供位置和可选的查询词。local-descriptions
Quick Start (cURL)
快速开始(cURL)
Search by Query + Coordinates
按查询词+坐标搜索
bash
curl -s "https://api.search.brave.com/res/v1/local/place_search" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=coffee shops" \
--data-urlencode "latitude=37.7749" \
--data-urlencode "longitude=-122.4194" \
--data-urlencode "radius=5000"bash
curl -s "https://api.search.brave.com/res/v1/local/place_search" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=coffee shops" \
--data-urlencode "latitude=37.7749" \
--data-urlencode "longitude=-122.4194" \
--data-urlencode "radius=5000"Search by Query + Location String
按查询词+位置字符串搜索
bash
curl -s "https://api.search.brave.com/res/v1/local/place_search" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=sushi restaurants" \
--data-urlencode "location=tokyo japan" \
--data-urlencode "country=JP" \
--data-urlencode "search_lang=en"bash
curl -s "https://api.search.brave.com/res/v1/local/place_search" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=sushi restaurants" \
--data-urlencode "location=tokyo japan" \
--data-urlencode "country=JP" \
--data-urlencode "search_lang=en"Browse General POIs (No Query)
浏览通用POI(无查询词)
bash
curl -s "https://api.search.brave.com/res/v1/local/place_search" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "latitude=48.8566" \
--data-urlencode "longitude=2.3522" \
--data-urlencode "radius=3000" \
--data-urlencode "country=FR"bash
curl -s "https://api.search.brave.com/res/v1/local/place_search" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "latitude=48.8566" \
--data-urlencode "longitude=2.3522" \
--data-urlencode "radius=3000" \
--data-urlencode "country=FR"Endpoint
端点
http
GET https://api.search.brave.com/res/v1/local/place_searchAuthentication: header
X-Subscription-Token: <API_KEY>http
GET https://api.search.brave.com/res/v1/local/place_search身份验证:请求头添加
X-Subscription-Token: <API_KEY>Parameters
参数
Location (optional but recommended)
位置(可选但推荐)
Providing a geographic anchor improves precision. You can use coordinates ( + ) or a string. Omitting both is allowed when a is given — results are sourced globally and may be less precise. Omitting all three (, /, and ) returns HTTP 422.
latitudelongitudelocationqqlatitudelongitudelocation| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| float | Conditional | — | Latitude (-90.0 to 90.0). Required together with |
| float | Conditional | — | Longitude (-180.0 to 180.0). Required together with |
| string | No | — | Location string, alternative to coordinates. US: |
提供地理锚点可提升搜索精度。你可使用坐标( + )或字符串。若提供,可同时省略两者——结果将来自全球,精度可能较低。若同时省略、/和,将返回HTTP 422错误。
latitudelongitudelocationqqlatitudelongitudelocation| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| float | 条件必填 | — | 纬度(-90.0至90.0),需与 |
| float | 条件必填 | — | 经度(-180.0至180.0),需与 |
| string | 否 | — | 位置字符串,作为坐标的替代方案。美国地区格式: |
Search
搜索
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | No | — | Free-text query (e.g., |
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 否 | — | 自由文本查询词(例如: |
Additional Options
额外选项
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| float | No | — | Search radius bias around the provided coordinates, in meters. Not a hard cutoff — results may extend beyond it. No upper limit |
| int | No | | Total items returned across all buckets (1–100), not just |
| string | No | — | User geolocation as |
| string | No | | Search country (2-letter country code or |
| string | No | | Language for search results (2+ char language code) |
| string | No | | UI language (locale code, e.g., |
| string | No | | Measurement units: |
| string | No | | Safe search level: |
| bool | No | | Whether to apply spellcheck to the query |
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| float | 否 | — | 围绕提供坐标的搜索半径偏好值,单位为米。并非严格限制——结果可能超出此范围。无上限 |
| int | 否 | | 所有分类下返回的总条目数(1–100),并非仅 |
| string | 否 | — | 用户地理位置,格式为 |
| string | 否 | | 搜索国家(两位国家代码或 |
| string | 否 | | 搜索结果的语言(两位及以上字符的语言代码) |
| string | 否 | | UI语言(区域代码,例如: |
| string | 否 | | 计量单位: |
| string | 否 | | 安全搜索级别: |
| bool | 否 | | 是否对查询词进行拼写检查 |
Response Format
响应格式
Top-Level Fields
顶层字段
| Field | Type | Description |
|---|---|---|
| string | Always |
| array | List of |
| array | Matched cities, |
| array | Matched countries, |
| array | Matched regions, |
| array | Matched neighborhoods, |
| array | List of |
| array | List of |
| array | |
| object? | Resolved location info |
| [float, float] | |
| string | Resolved location name (e.g., |
| string | Two-letter country code (e.g., |
Treat a missing bucket as empty. For typical POI-style queries only is populated, so clients that don't render rich SERPs can ignore the rest — except for address- or street-shaped queries, which can return an empty and put every match in /.
resultsresultsaddressesstreets| 字段 | 类型 | 描述 |
|---|---|---|
| string | 固定为 |
| array | |
| array | 匹配的城市, |
| array | 匹配的国家, |
| array | 匹配的地区, |
| array | 匹配的社区, |
| array | |
| array | |
| array | |
| object? | 解析后的位置信息 |
| [float, float] | 解析后的中心坐标 |
| string | 解析后的位置名称(例如: |
| string | 两位国家代码(例如: |
缺失的分类视为空。对于典型的POI类查询,仅分类会被填充,因此不渲染丰富搜索结果页的客户端可忽略其他分类——但地址或街道类查询除外,此类查询可能返回空的,并将所有匹配项放入/分类。
resultsresultsaddressesstreetsLocationResult Fields
LocationResult字段
Each item in is a :
resultsLocationResult| Field | Type | Description |
|---|---|---|
| string | Always |
| string | Business/POI name |
| string | Canonical URL |
| string? | Short description or category label (e.g., |
| string | Provider page URL |
| string? | Opaque POI identifier (valid ~8 hours, usable with |
| [float, float]? | |
| object | |
| string? | Phone number |
| string? | Email address |
| float? | Average rating |
| float? | Max possible rating |
| int? | Number of reviews |
| bool | Whether the rating comes from Tripadvisor |
| object[]? | Today's hours ( |
| object[][]? | Hours for each day of the week |
| string[] | Business categories (default |
| string? | Price indicator, e.g. |
| string[]? | Cuisine types (restaurants) |
| float? | Distance from the search location |
| string? | Distance unit |
| string? | Icon category slug (e.g., |
| string? | Thumbnail image URL |
| string? | Original image URL |
| object[]? | Additional images ( |
| object[]? | External profiles ( |
| string? | IANA timezone (e.g., |
| int | Suggested map zoom level (default |
resultsLocationResult| 字段 | 类型 | 描述 |
|---|---|---|
| string | 固定为 |
| string | 企业/POI名称 |
| string | 标准URL |
| string? | 简短描述或类别标签(例如: |
| string | 提供商页面URL |
| string? | 不透明的POI标识符(有效期约8小时,可用于 |
| [float, float]? | |
| object | |
| string? | 电话号码 |
| string? | 电子邮箱地址 |
| float? | 平均评分 |
| float? | 最高可能评分 |
| int? | 评论数量 |
| bool | 评分是否来自Tripadvisor |
| object[]? | 今日营业时间( |
| object[][]? | 一周中每天的营业时间 |
| string[] | 企业类别(默认 |
| string? | 价格标识,例如 |
| string[]? | 菜系类型(仅餐厅) |
| float? | 与搜索位置的距离 |
| string? | 距离单位 |
| string? | 图标类别标识(例如: |
| string? | 缩略图URL |
| string? | 原图URL |
| object[]? | 额外图片( |
| object[]? | 外部资料( |
| string? | IANA时区(例如: |
| int | 建议的地图缩放级别(默认 |
Geographic Place Fields (cities
, countries
, regions
, neighborhoods
)
citiescountriesregionsneighborhoods地理地点字段(cities
、countries
、regions
、neighborhoods
)
citiescountriesregionsneighborhoodsAll four buckets share one shape, differing only by the identifier. The published spec names
them / / / .
typeCityResultCountryResultRegionResultNeighborhoodResult| Field | Type | Description |
|---|---|---|
| string | Bucket identifier: |
| string | Place name |
| string | Country code of the place |
| [float, float] | |
| string | Primary image URL |
这四个分类的结构相同,仅标识符不同。官方规范将它们命名为///。
typeCityResultCountryResultRegionResultNeighborhoodResult| 字段 | 类型 | 描述 |
|---|---|---|
| string | 分类标识符: |
| string | 地点名称 |
| string | 地点所属的国家代码 |
| [float, float] | |
| string | 主图URL |
AddressResult Fields (addresses
and streets
)
addressesstreetsAddressResult字段(addresses
和streets
)
addressesstreetsSame model is used for both buckets. Items in have (street + number); items in have (entire street).
addressestype: "address"streetstype: "street"| Field | Type | Description |
|---|---|---|
| string | |
| string | Display name of the address or street |
| [float, float] | |
| object[] | |
| object[] | |
| int | Suggested map zoom level (default |
| float? | Distance from the search location |
| string? | Distance unit |
| object? | |
两个分类使用相同的模型。中的条目(街道+门牌号);中的条目(整条街道)。
addressestype: "address"streetstype: "street"| 字段 | 类型 | 描述 |
|---|---|---|
| string | |
| string | 地址或街道的显示名称 |
| [float, float] | |
| object[] | 位于此地址/街道的 |
| object[] | 位于此地址/街道附近的 |
| int | 建议的地图缩放级别(默认 |
| float? | 与搜索位置的距离 |
| string? | 距离单位 |
| object? | |
Mixed Ordering (mixed
)
mixed混合排序(mixed
)
mixedmixedResultReference| Field | Type | Description |
|---|---|---|
| string | Bucket to draw from: |
| int? | 0-based index of the item within that bucket. May be |
| bool | When |
Clients that only render POIs can ignore entirely and read directly.
mixedresultsmixedResultReference| 字段 | 类型 | 描述 |
|---|---|---|
| string | 来源分类: |
| int? | 该分类内条目的0-based索引。当 |
| bool | 若为 |
仅渲染POI的客户端可完全忽略,直接读取即可。
mixedresultsExample Response
响应示例
json
{
"type": "locations",
"results": [
{
"type": "location_result",
"title": "Blue Bottle Coffee",
"url": "https://yelp.com/biz/blue-bottle-coffee-sf",
"provider_url": "",
"id": "loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA=",
"description": "Coffee Shop",
"postal_address": {
"type": "PostalAddress",
"displayAddress": "315 Linden St, San Francisco, CA 94102"
},
"contact": { "telephone": "+15106533394" },
"rating": {
"ratingValue": 4.3,
"bestRating": 5.0,
"reviewCount": 1024,
"is_tripadvisor": true
},
"opening_hours": {
"current_day": [
{ "abbr_name": "Tue", "full_name": "Tuesday", "opens": "07:00", "closes": "18:00" }
],
"days": [
[{ "abbr_name": "Mon", "full_name": "Monday", "opens": "07:00", "closes": "18:00" }]
]
},
"coordinates": [37.7763, -122.4215],
"categories": [],
"serves_cuisine": ["Cafe", "Coffee Shop"],
"price_range": "$$",
"icon_category": "cafe",
"thumbnail": {
"src": "https://example.com/thumb.jpg",
"original": "https://example.com/original.jpg"
},
"zoom_level": 7
}
],
"cities": [],
"countries": [],
"regions": [],
"neighborhoods": [],
"addresses": [],
"streets": [],
"mixed": [
{ "type": "results", "index": 0, "all": false }
],
"location": {
"coordinates": [37.7749, -122.4194],
"name": "San Francisco",
"country": "US"
}
}For a query that matches a city name, the response additionally surfaces a city entry in :
citiesjson
{
"cities": [
{
"type": "city",
"name": "San Francisco",
"country": "US",
"coordinates": [37.7749, -122.4194],
"thumbnail": { "src": "https://example.com/sf.jpg" }
}
],
"mixed": [
{ "type": "cities", "index": 0, "all": false }
]
}json
{
"type": "locations",
"results": [
{
"type": "location_result",
"title": "Blue Bottle Coffee",
"url": "https://yelp.com/biz/blue-bottle-coffee-sf",
"provider_url": "",
"id": "loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA=",
"description": "Coffee Shop",
"postal_address": {
"type": "PostalAddress",
"displayAddress": "315 Linden St, San Francisco, CA 94102"
},
"contact": { "telephone": "+15106533394" },
"rating": {
"ratingValue": 4.3,
"bestRating": 5.0,
"reviewCount": 1024,
"is_tripadvisor": true
},
"opening_hours": {
"current_day": [
{ "abbr_name": "Tue", "full_name": "Tuesday", "opens": "07:00", "closes": "18:00" }
],
"days": [
[{ "abbr_name": "Mon", "full_name": "Monday", "opens": "07:00", "closes": "18:00" }]
]
},
"coordinates": [37.7763, -122.4215],
"categories": [],
"serves_cuisine": ["Cafe", "Coffee Shop"],
"price_range": "$$",
"icon_category": "cafe",
"thumbnail": {
"src": "https://example.com/thumb.jpg",
"original": "https://example.com/original.jpg"
},
"zoom_level": 7
}
],
"cities": [],
"countries": [],
"regions": [],
"neighborhoods": [],
"addresses": [],
"streets": [],
"mixed": [
{ "type": "results", "index": 0, "all": false }
],
"location": {
"coordinates": [37.7749, -122.4194],
"name": "San Francisco",
"country": "US"
}
}若查询词匹配城市名称,响应将在分类中额外显示城市条目:
citiesjson
{
"cities": [
{
"type": "city",
"name": "San Francisco",
"country": "US",
"coordinates": [37.7749, -122.4194],
"thumbnail": { "src": "https://example.com/sf.jpg" }
}
],
"mixed": [
{ "type": "cities", "index": 0, "all": false }
]
}Enriching Results with POI Details and Descriptions
使用POI详情和描述丰富结果
POI values from can be passed to sibling endpoints for richer data:
idresultsbash
undefinedresultsidbash
undefinedGet full POI details (hours, reviews, photos, web result mentions)
获取完整POI详情(营业时间、评论、照片、网页结果提及)
curl -s "https://api.search.brave.com/res/v1/local/pois" -G
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA="
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA="
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
curl -s "https://api.search.brave.com/res/v1/local/pois" -G
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA="
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA="
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
Get AI-generated descriptions
获取AI生成的描述
curl -s "https://api.search.brave.com/res/v1/local/descriptions" -G
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA="
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA="
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
undefinedcurl -s "https://api.search.brave.com/res/v1/local/descriptions" -G
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA="
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
--data-urlencode "ids=loc4CQWMJWLD4VBEBZ62XQLJTGK6YCJEEJDNAAAAAAA="
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
undefinedUse Cases
使用场景
- Map-based exploration: Search for POIs within a visible map viewport using coordinates + radius. No prior query needed.
- Location-aware apps: Build "nearby" features — pass device GPS coordinates and a query to find relevant businesses.
- Travel planning: Search for attractions, restaurants, and hotels by location string (e.g., ) without needing exact coordinates.
paris france
- 基于地图的探索:使用坐标+半径搜索可见地图视口内的POI,无需前置查询词。
- 位置感知应用:构建“附近”功能——传递设备GPS坐标和查询词以查找相关企业。
- 旅行规划:通过位置字符串(例如:)搜索景点、餐厅和酒店,无需精确坐标。
paris france
Notes
注意事项
- Finds places, not pages: This endpoint searches a geographic index of physical places. Use web search for general information retrieval.
- Choosing a radius: A tighter radius (below ~20 km) gives more focused results. Raise it to reach specific or well-known places further afield; for common category searches (e.g., ), the default bias or tighter works best.
restaurants
- 查找地点而非网页:此端点搜索现实地点的地理索引。如需通用信息检索,请使用网页搜索。
- 选择半径:较小的半径(约20公里以下)可获得更聚焦的结果。如需搜索更远的特定或知名地点,可增大半径;对于常见类别搜索(例如:),默认偏好或较小半径效果最佳。
restaurants