Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Brave Local POIs

API 文件
https://api.sandbase.ai/v1/api/brave/local-pois

Local POIs from Brave. Returns the official Brave API response unchanged.

價格
$0.005美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 3 個選填

Playground

輸入
A list of unique identifiers for the location. The ids are valid only for 8 hours.
The search language preference. The 2 or more character language code for which the search results are provided.
User interface language preferred in response. Usually of the format <language_code>-<country_code>. For more, see RFC 9110 .
The measurement units. The following values are supported: metric - The standardized measurement system (km, celcius…) imperial - The British Imperial system of units (mile, fahrenheit…)
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

Brave Local POIs API

Returns details for one or more local places (points of interest) from Brave, such as name, address, phone number, coordinates, opening hours, rating, photos and related web pages. It needs a list of location ids in the ids parameter.

Use cases

  • Show a business card with name, address, phone and opening hours for a place found in a search.
  • Check which days and hours a cafe or shop is open before you send a customer there.
  • Plot places on a map with coordinates and show their rating and photos.
  • Collect the website and social profile links for a local business.

Request

curl -X POST "https://api.sandbase.ai/v1/api/brave/local-pois" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids": ["loc4DFZ5OEXSZVDUAEEDV6PMTFK6YDFANIHQIRRVKLA="]}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
idsarrayYesA list of unique identifiers for the location. The ids are valid only for 8 hours.
search_langstringNoThe search language preference. The 2 or more character language code for which the search results are provided.
ui_langstringNoUser interface language preferred in response. Usually of the format <language_code>-<country_code>. For more, see RFC 9110 .
unitsstringNoThe measurement units. The following values are supported: metric - The standardized measurement system (km, celcius…) imperial - The British Imperial system of units (mile, fahrenheit…)

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "results": [
    {
      "categories": [],
      "contact": {
        "telephone": "+12067805777"
      },
      "coordinates": [
        47.60895
      ],
      "family_friendly": true,
      "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"
      },
      "profiles": [
        {
          "img": "https://imgs.search.brave.com/Ez_ahZzZ3ushkbmoJgmdHsAic0dvbVgEO80Y5igGQbA/rs:fit…",
          "name": "storyville.com",
          "type": "external",
          "url": "https://storyville.com/pages/pike-place-market"
        }
      ],
      "provider_url": "https://storyville.com/pages/pike-place-market"
    }
  ],
  "type": "local_pois"
}

Response fields

FieldMeaning
results[].titleName of the place.
results[].postal_address.displayAddressFull street address as a single display string.
results[].coordinatesLatitude and longitude of the place, in that order.
results[].contact.telephonePhone number of the place in international format.
results[].opening_hours.days[] / results[].opening_hours.current_day[]Opening hours. Each entry has full_name, abbr_name, opens and closes. current_day holds the entry for the current day.
results[].rating.ratingValue / results[].rating.bestRating / results[].rating.reviewCountAverage rating, the top possible rating, and the number of reviews. is_tripadvisor is true when the rating comes from Tripadvisor.
results[].profiles[].name / results[].profiles[].urlName and link of a web or social profile for the place, such as its website, Facebook or Instagram page.
results[].pictures.results[].original / results[].pictures.results[].srcLink to the original photo and a resized copy of it.
results[].results[].title / results[].results[].url / results[].results[].descriptionWeb pages related to the place, with title, link and a text snippet.
results[].family_friendlyWhether the place is flagged as family friendly.

Notes

  • Pass the location IDs in ids as an array. The IDs look like loc4DFZ5OEXSZVDUAEEDV6PMTFK6YDFANIHQIRRVKLA= and are valid only for 8 hours.
  • Get location IDs from Brave Place Search or Brave Web Search, then pass them here.
  • For a text description of the same places, call Brave POI Descriptions with the same IDs.
  • search_lang, ui_lang and units are optional. units accepts metric or imperial.

Pricing

$0.005 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
Brave每次呼叫 $0.005JSON
Brave每次呼叫 $0.01JSON
Brave每次呼叫 $0.005JSON
Brave每次呼叫 $0.005JSON
Brave每次呼叫 $0.005JSON
Brave每次呼叫 $0.005JSON

問題

常見問題

我要如何使用 Brave Local POIs API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/brave/local-pois。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Brave Local POIs API 的費用是多少?

每次 $0.005,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Brave Local POIs API 接受哪些參數?

必要:ids (array)。 選填:search_lang(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 之一), ui_lang(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(imperial, metric 之一)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Brave Local POIs API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Brave 開發者帳號或 API 金鑰嗎?

不需要。Brave Local POIs 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Brave API 存取權。