countinteger
Number of results to return. The maximum is 100.
Domyślnie: 20
https://api.sandbase.ai/v1/api/brave/local-place-searchPlace Search from Brave. Returns the official Brave API response unchanged.
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
Returns a list of places (points of interest) that match a search query in an area. You give a q such as coffee and either a location string or latitude and longitude. Each result has a name, address, coordinates, phone number, opening hours and rating.
curl -X POST "https://api.sandbase.ai/v1/api/brave/local-place-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "coffee", "location": "seattle washington united states"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
count | integer | No | Number of results to return. The maximum is 100. |
country | string | No | Two-letter country code (ISO 3166-1 alpha-2) to scope the search. |
geoloc | string | No | Optional geolocation of the user in the format <latitude>x<longitude> . Used to calculate distance values in results. |
latitude | number | No | Latitude of the geographical coordinates. |
location | string | No | 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 s |
longitude | number | No | Longitude of the geographical coordinates. |
q | string | No | 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 | No | 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 c |
safesearch | string | No | Safe search level for the query results. |
search_lang | string | No | Language for the search results. |
spellcheck | boolean | No | Whether to apply spellcheck before executing the search. |
ui_lang | string | No | User interface language for the response. Usually <language>-<region> . |
units | string | No | Units of measurement for distance values: metric is kilometres, imperial is miles. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"addresses": [],
"cities": [],
"countries": [],
"location": {
"coordinates": [
47.60621
],
"country": "US",
"name": "Seattle"
},
"mixed": [
{
"all": false,
"index": 0,
"type": "results"
}
],
"neighborhoods": [],
"regions": [],
"results": [
{
"categories": [
"bakery"
],
"contact": {
"telephone": "+12067805777"
},
"coordinates": [
47.60895
],
"description": "Coffee Shop",
"family_friendly": true,
"icon_category": "cafe",
"id": "loc4DFZ5OEXSZVDUAEEDV6PMTFK6YDFANIHQIRRVKLA=",
"is_source_both": false,
"is_source_local": false,
"opening_hours": {
"current_day": [
{
"abbr_name": "Tue",
"closes": "17:00",
"full_name": "Tuesday",
"opens": "06:59"
}
],
"days": [
[
{
"abbr_name": "Mon",
"closes": "17:00",
"full_name": "Monday",
"opens": "06:59"
}
]
]
},
"pictures": {
"results": [
{
"original": "https://lh3.googleusercontent.com/p/AF1QipN6QS0pKXaJqJ7VUigWGEyXcjYJhKqayDx2TlVW…",
"src": "https://imgs.search.brave.com/XjGqFPcOkdFwsXjUb7-etFuMZCsudU6EnuAEzElKZ1Y/rs:fit…"
}
]
},
"postal_address": {
"displayAddress": "94 Pike St Top floor Suite 34, Seattle, WA 98101",
"type": "PostalAddress"
}
}
],
"streets": [],
"type": "locations"
}
| Field | Meaning |
|---|---|
results[].title | Name of the place. |
results[].id | Place ID, such as loc4DFZ5OEXSZVDUAEEDV6PMTFK6YDFANIHQIRRVKLA=. Use it to look up more details about the place. |
results[].postal_address.displayAddress | Full street address as one text line. |
results[].coordinates | Two numbers for the place. The first value matches latitude and the second matches longitude. |
results[].contact.telephone | Phone number in international format. |
results[].rating.ratingValue / results[].rating.bestRating / results[].rating.reviewCount | Average rating, the top possible rating, and the number of reviews behind the rating. |
results[].opening_hours.current_day[] / results[].opening_hours.days[][] | Opening and closing times (opens, closes, as HH:MM) with the day name in full_name and abbr_name. current_day holds today's hours. |
results[].categories / results[].description | Category tags and a short type label such as Coffee Shop. |
results[].url / results[].thumbnail.src / results[].pictures.results[].original | The place's website, a thumbnail image URL, and full-size photo URLs. |
location.name / location.coordinates / location.country | The area the search resolved to, with its center coordinates and country code. |
location (for example seattle washington united states) or both latitude and longitude to set the search area.count to set how many places come back. The default is 20 and the maximum is 100.id values from results[] to Brave POI Descriptions or Brave Local POIs to get more detail on each place.addresses, cities and streets appear in the response when the query matches only places.$0.005 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
curl -X POST "https://api.sandbase.ai/v1/api/brave/local-place-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "coffee",
"count": 20,
"units": "metric",
"country": "US",
"ui_lang": "en-US",
"location": "seattle washington united states",
"safesearch": "strict",
"spellcheck": true,
"search_lang": "en"
}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
countintegerNumber of results to return. The maximum is 100.
Domyślnie: 20
countrystringTwo-letter country code (ISO 3166-1 alpha-2) to scope the search.
Domyślnie: "US"
Możliwe wartości: 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
geolocstringOptional geolocation of the user in the format <latitude>x<longitude> . Used to calculate distance values in results.
latitudenumberLatitude of the geographical coordinates.
locationstringLocation 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
longitudenumberLongitude of the geographical coordinates.
qstringQuery 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.
Domyślnie: ""
radiusnumberSearch 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.
safesearchstringSafe search level for the query results.
Domyślnie: "strict"
Możliwe wartości: off, moderate, strict
search_langstringLanguage for the search results.
Domyślnie: "en"
Możliwe wartości: 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
spellcheckbooleanWhether to apply spellcheck before executing the search.
Domyślnie: true
ui_langstringUser interface language for the response. Usually <language>-<region> .
Domyślnie: "en-US"
Możliwe wartości: 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
unitsstringUnits of measurement for distance values: metric is kilometres, imperial is miles.
Domyślnie: "metric"
Możliwe wartości: imperial, metric
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
Nie opublikowano zapisanego response. Uruchom API w Playground, aby sprawdzić jego odpowiedź.
Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
Brave Place SearchTo API Brave | $0.005 za wywołanie | JSON |
Brave | $0.01 za wywołanie | JSON |
Brave | $0.005 za wywołanie | JSON |
Brave | $0.005 za wywołanie | JSON |
Brave | $0.005 za wywołanie | JSON |
Brave | $0.005 za wywołanie | JSON |
Pytania
Wyślij żądanie POST do https://api.sandbase.ai/v1/api/brave/local-place-search z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.
$0.005 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Nie są wymagane żadne parametry. Opcjonalne: count (integer), country (jedna z opcji: 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), latitude (number), location (string) i longitude (number) i jeszcze 7. Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.
Nie. Brave Place Search działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API Brave.