Skip to main content
GET
Place Search

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求头

accept
enum<string>
默认值:application/json

The default supported media type is application/json.

可用选项:
application/json,
*/*
示例:

"application/json"

api-version
string | null

The API version to use. This is denoted by the format YYYY-MM-DD. Default is the latest that is available. Read more about API versioning.

cache-control
enum<string> | null

Brave Search will return cached content by default. To prevent caching set the Cache-Control header to no-cache. This is currently done as best effort.

可用选项:
no-cache
Allowed value: "no-cache"
user-agent
string | null

The user agent originating the request. Brave search can utilize the user agent to provide a different experience depending on the device as described by the string. The user agent should follow the commonly used browser agent strings on each platform. For more information on curating user agents, see RFC 9110.

查询参数

count
integer
默认值:20

Number of results to return. The maximum is 100.

必填范围: 1 <= x <= 100
country
enum<string>
默认值:US

Two-letter country code (ISO 3166-1 alpha-2) to scope the search.

可用选项:
AR,
AU,
AT,
BE,
BR,
CA,
CL,
DK,
FI,
FR,
DE,
GR,
HK,
IN,
ID,
IT,
JP,
KR,
MY,
MX,
NL,
NZ,
NO,
CN,
PL,
PT,
PH,
RU,
SA,
ZA,
ES,
SE,
CH,
TW,
TR,
GB,
US,
ALL
geoloc
string | null

Optional geolocation of the user in the format <latitude>x<longitude>. Used to calculate distance values in results.

latitude
number | null

Latitude of the geographical coordinates.

必填范围: -90 <= x <= 90
location
string | null

Location string to search for points of interest in an area. This is alternative to the latitude and longitude parameters.

  • For locations in US prefer the form <city> <state> <country name>, ie. san francisco ca united states
  • For non-US locations, use the form <city> <country name>, ie. tokyo japan
  • No need for commas or other special chars, capitalization does not matter
  • We cover multiple languages: nueva york instead of new york works, but using English or the most popular language on the target city should work the best
longitude
number | null

Longitude of the geographical coordinates.

必填范围: -180 <= x <= 180
q
string
默认值:""

Query string to search for points of interest in an area. If no q is provided, the endpoint will return general points of interest in the given area.

radius
number | null

Search radius bias around the given coordinates, in meters. NOTE: This is not strictly the radius of the search (nor the resulting radius of the results), but rather a bias towards results that are closer to the given coordinates. Search is performed globally if no radius is provided.

必填范围: x >= 0
safesearch
enum<string>
默认值:strict

Safe search level for the query results.

可用选项:
off,
moderate,
strict
search_lang
enum<string>
默认值:en

Language for the search results.

可用选项:
ar,
eu,
bn,
bg,
ca,
zh-hans,
zh-hant,
hr,
cs,
da,
nl,
en,
en-gb,
et,
fi,
fr,
gl,
de,
el,
gu,
he,
hi,
hu,
is,
it,
ja,
jp,
kn,
ko,
lv,
lt,
ms,
ml,
mr,
nb,
pl,
pt-br,
pt-pt,
pa,
ro,
ru,
sr,
sk,
sl,
es,
sv,
ta,
te,
th,
tr,
uk,
vi
spellcheck
boolean
默认值:true

Whether to apply spellcheck before executing the search.

ui_lang
enum<string>
默认值:en-US

User interface language for the response. Usually <language>-<region>.

可用选项:
es-AR,
en-AU,
de-AT,
nl-BE,
fr-BE,
pt-BR,
en-CA,
fr-CA,
es-CL,
da-DK,
fi-FI,
fr-FR,
de-DE,
el-GR,
zh-HK,
en-IN,
en-ID,
it-IT,
ja-JP,
ko-KR,
en-MY,
es-MX,
nl-NL,
en-NZ,
no-NO,
zh-CN,
pl-PL,
en-PH,
ru-RU,
en-ZA,
es-ES,
sv-SE,
fr-CH,
de-CH,
zh-TW,
tr-TR,
en-GB,
en-US,
es-US
units
enum<string>
默认值:metric

Units of measurement for distance values: metric is kilometres, imperial is miles.

可用选项:
imperial,
metric

响应

Successful Response

type
enum<string>
默认值:locations
可用选项:
locations
Allowed value: "locations"
query
Query · object | null

The query object containing the original and potentially spell-corrected query.

results
LocationResult · object[] | null

The list of points of interest results for the given quer.

cities
CityResult · object[] | null

The list of city results for the given query.

countries
CountryResult · object[] | null

The list of country results for the given query.

regions
RegionResult · object[] | null

The list of region results for the given query.

neighborhoods
NeighborhoodResult · object[] | null

The list of neighborhood results for the given query.

addresses
AddressResult · object[] | null

The list of address results for the given query.

streets
AddressResult · object[] | null

The list of street results for the given query.

mixed
ResultReference · object[]

The list of mixed results for the given query.

location
Location · object | null

Information about location resolved from either the coordinates of the location string.