idsarray必須
A list of unique identifiers for the location. The ids are valid only for 8 hours.
https://api.sandbase.ai/v1/api/brave/local-descriptionsPOI Descriptions from Brave. Returns the official Brave API response unchanged.
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
Returns a text description for each place ID you send. The input is a required ids array of location IDs, and each ID returns one description object.
curl -X POST "https://api.sandbase.ai/v1/api/brave/local-descriptions" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ids": ["loc4DFZ5OEXSZVDUAEEDV6PMTFK6YDFANIHQIRRVKLA="]}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
ids | array | Yes | A list of unique identifiers for the location. The ids are valid only for 8 hours. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"results": [
{
"description": "**Storyville Coffee Pike Place** is a renowned specialty coffee roaster and café…",
"id": "loc4DFZ5OEXSZVDUAEEDV6PMTFK6YDFANIHQIRRVKLA=",
"type": "local_description"
}
],
"type": "local_descriptions"
}
| Field | Meaning |
|---|---|
results | List of description objects. It holds one entry for each ID you sent. |
results[].id | The location ID this description belongs to. Use it to match each description to the ID in your request. |
results[].description | Text description of the place. It can contain Markdown, such as **bold** around the place name. |
results[].type | Type of the item. In this response it is local_description. |
type | Type of the whole response. In this response it is local_descriptions. |
loc4DFZ5OEXSZVDUAEEDV6PMTFK6YDFANIHQIRRVKLA=.ids array to get several descriptions in one call.$0.005 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
curl -X POST "https://api.sandbase.ai/v1/api/brave/local-descriptions" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"loc4DFZ5OEXSZVDUAEEDV6PMTFK6YDFANIHQIRRVKLA="
]
}'SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
idsarray必須A list of unique identifiers for the location. The ids are valid only for 8 hours.
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
保存済みレスポンスはまだ公開されていません。PlaygroundでAPIを実行し、レスポンスを確認してください。
さらに探索
| API | 価格 | レスポンス |
|---|---|---|
Brave POI Descriptionsこの API Brave | $0.005 / 回 | JSON |
Brave | $0.01 / 回 | JSON |
Brave | $0.005 / 回 | JSON |
Brave | $0.005 / 回 | JSON |
Brave | $0.005 / 回 | JSON |
Brave | $0.005 / 回 | JSON |
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/brave/local-descriptions に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.005、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
必須: ids (array)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。Brave POI Descriptions は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Brave の API アクセスを別途申請する必要はありません。