チェーンを使用してplacesを検索
このチュートリアルでは、チェーンでplacesを検索する方法について説明します。
プロシージャ
ポーランド国境付近のドイツでの位置 (52.33012 、 14.41896) からシェルプレースを検索し、ドイツでのみ結果を取得するには、次のリクエストを送信します。
GET https://discover.search.hereapi.com/v1/
discover
?at=52.33012,14.41896
&q=Shell
&limit=2
&in=countryCode%3ADEU
&apiKey={YOUR_API_KEY}
次のパラメータが使用されます。
- at - 座標で表された検索コンテキストの中心を指定
- Q - フリーテキストのクエリを入力します。
- Limit :返される結果の最大数
- In-地理的領域内で検索します。 結果が指定した領域にある場合は、結果が返されます。
- apiKey - お客様の API キー 。
注
この要求は API キー 認証を使用します。 HERE platform の認証オプションの詳細については、『ID およびアクセス管理ガイド』を参照してください。
結果には、関連するロケーションオブジェクトに関する詳細情報が一覧表示されます。
{
"items": [
{
"title": "Shell",
"id": "here:pds:place:276u361x-8134bdc570ac4bca89ea8de8f2e6ef2d",
"ontologyId": "here:cm:ontology:shell",
"resultType": "place",
"address": {
"label": "Shell, 15236 Jacobsdorf, Deutschland",
"countryCode": "DEU",
"countryName": "Deutschland",
"stateCode": "BB",
"state": "Brandenburg",
"countyCode": "LOS",
"county": "Oder-Spree",
"city": "Jacobsdorf",
"postalCode": "15236"
},
"position": { "lat": 52.32121, "lng": 14.38886 },
"access": [{ "lat": 52.32121, "lng": 14.38886 }],
"distance": 2273,
"categories": [
{ "id": "700-7600-0116", "name": "Tankstelle", "primary": true },
{ "id": "700-7900-0131", "name": "Lkw-Parkplatz" }
],
"chains": [{ "id": "10" }],
"contacts": [{ "phone": [{ "value": "+493360849300" }], "fax": [{ "value": "+493360849301" }] }],
"openingHours": [
{
"text": ["Mon-Sun: 00:00 - 24:00"],
"isOpen": true,
"structured": [
{ "start": "T000000", "duration": "PT24H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA,SU" }
]
}
]
},
{
"title": "Shell",
"id": "here:pds:place:276u361x-9b1a09934b3b43b397e01bae933e2ecf",
"ontologyId": "here:cm:ontology:shell",
"resultType": "place",
"address": {
"label": "Shell, 15236 Jacobsdorf, Deutschland",
"countryCode": "DEU",
"countryName": "Deutschland",
"stateCode": "BB",
"state": "Brandenburg",
"countyCode": "LOS",
"county": "Oder-Spree",
"city": "Jacobsdorf",
"postalCode": "15236"
},
"position": { "lat": 52.32037, "lng": 14.38395 },
"access": [{ "lat": 52.32037, "lng": 14.38395 }],
"distance": 2615,
"categories": [
{ "id": "700-7600-0116", "name": "Tankstelle", "primary": true },
{ "id": "600-6000-0061", "name": "kleiner Lebensmittelladen" },
{ "id": "700-7900-0131", "name": "Lkw-Parkplatz" }
],
"chains": [{ "id": "10" }],
"references": [
{ "supplier": { "id": "core" }, "id": "56108280" },
{ "supplier": { "id": "core" }, "id": "56108284" }
],
"contacts": [
{
"phone": [{ "value": "+493360849621" }, { "value": "+493360881680" }, { "value": "+49493360881680" }],
"fax": [{ "value": "033608 81682" }, { "value": "3360881682" }],
"www": [
{ "value": "http://www.shell.de/" },
{ "value": "https://find.shell.com/de/fuel/10025882-pillgram-a12-bieg-helle-nord" },
{ "value": "https://find.shell.com/de/fuel/10025893-pillgram-a12-bieg-helle-sud" }
],
"email": [{ "value": "shellcustomercare@shell.com" }]
}
],
"openingHours": [
{
"text": ["Mon-Sun: 00:00 - 24:00"],
"isOpen": true,
"structured": [
{ "start": "T000000", "duration": "PT24H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA,SU" }
]
}
]
}
]
}
/discover
パラメータの詳細については、次のトピックを参照してください。 API リファレンス。