位置の近くの場所をカテゴリーで検索する
- 最終更新日時2025年5月19日
- 12 分で読める
このチュートリアルでは、地理的位置の近くの場所を検索する方法を説明します。
手順
地理的位置 (52.81730,12.23683)
からハンブルクにある OBI の 5 つの場所を検索するには、次のリクエストを送信します。
GET https://discover.search.hereapi.com/v1/
discover
?at=52.8173086,12.2368342
&limit=2
&lang=en
&q=Obi+Hamburg
&apiKey={YOUR_API_KEY}
次のパラメーターを使用します。
- at - 座標で表される検索コンテキストの中心を指定します。
- limit - 返される結果の最大数。
- lang - BCP 47 に準拠した言語コードのリストから、結果のレンダリングに使用する言語を選択します。
- q - 名前を入力します。
- apiKey - API キー。
注
このリクエストは API キー認証を使用します。HERE プラットフォームの認証オプションの詳細については、「Identity & Access Management Guide」(ID とアクセス管理ガイド) を参照してください。
結果には関連する位置オブジェクトに関する詳細情報が表示されます。
{
"items": [
{
"title": "OBI",
"id": "here:pds:place:276jx7ps-d60b21a41707034c23961246181c0373",
"ontologyId": "here:cm:ontology:obi",
"resultType": "place",
"address": {
"label": "OBI, Ruhrstraße, 22761 Hamburg, Germany",
"countryCode": "DEU",
"countryName": "Germany",
"stateCode": "HH",
"state": "Hamburg",
"countyCode": "HH",
"county": "Hamburg",
"city": "Hamburg",
"district": "Bahrenfeld",
"street": "Ruhrstraße",
"postalCode": "22761"
},
"position": { "lat": 53.56552, "lng": 9.92562 },
"access": [{ "lat": 53.56552, "lng": 9.92562 }],
"distance": 175004,
"categories": [
{ "id": "600-6600-0077", "name": "Home Improvement/Hardware Store", "primary": true },
{ "id": "600-6600-0080", "name": "Furniture Store" },
{ "id": "600-6600-0082", "name": "Garden Center" },
{ "id": "600-6600-0085", "name": "Major Appliance" },
{ "id": "600-6900-0000", "name": "Consumer Goods" },
{ "id": "600-6900-0095", "name": "Office Supply & Services Store" },
{ "id": "700-7200-0263", "name": "Locksmiths and Security Systems Services" },
{ "id": "700-7200-0274", "name": "Rental and Leasing" }
],
"chains": [{ "id": "4502" }],
"references": [
{ "supplier": { "id": "core" }, "id": "1148722020" },
{ "supplier": { "id": "yelp" }, "id": "_-iPBFnJKpJT94H1jHNmfQ" }
],
"contacts": [
{
"phone": [{ "value": "+494089726420" }],
"www": [
{ "value": "https://www.obi.de/baumarkt/hamburg-altona/?wt_mc=port.de497_Hamburg-Altona" },
{ "value": "https://www.obi.de/baumarkt/hamburg-altona/?wt_mc=port.de497_Hamburg-Altona..." },
{ "value": "https://www.obi.de/baumarkt/hamburg-altona/?wt_mc=port.de.de497_Hamburg-Altona..." }
],
"email": [{ "value": "hamburg-altona@obi.de" }, { "value": "service@obi.de" }]
}
],
"openingHours": [
{
"text": ["Mon-Sat: 08:00 - 20:00"],
"isOpen": true,
"structured": [{ "start": "T080000", "duration": "PT12H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA" }]
}
]
},
{
"title": "Obi Markt Hamburg-Eppendorf",
"id": "here:pds:place:276jx7ps-0697ddb404a60f0a92391fe6daa60a0f",
"ontologyId": "here:cm:ontology:obi",
"resultType": "place",
"address": {
"label": "Obi Markt Hamburg-Eppendorf, Nedderfeld 100, 22529 Hamburg, Germany",
"countryCode": "DEU",
"countryName": "Germany",
"stateCode": "HH",
"state": "Hamburg",
"countyCode": "HH",
"county": "Hamburg",
"city": "Hamburg",
"district": "Eppendorf",
"street": "Nedderfeld",
"postalCode": "22529",
"houseNumber": "100"
},
"position": { "lat": 53.6013, "lng": 9.97856 },
"access": [{ "lat": 53.6015, "lng": 9.97861 }],
"distance": 173816,
"categories": [
{ "id": "600-6600-0077", "name": "Home Improvement/Hardware Store", "primary": true },
{ "id": "600-6600-0080", "name": "Furniture Store" },
{ "id": "600-6600-0082", "name": "Garden Center" },
{ "id": "600-6600-0085", "name": "Major Appliance" },
{ "id": "600-6900-0095", "name": "Office Supply & Services Store" },
{ "id": "600-6900-0097", "name": "Pet Supply" },
{ "id": "600-6900-0098", "name": "Warehouse/Wholesale Store" },
{ "id": "700-7200-0274", "name": "Rental and Leasing" }
],
"chains": [{ "id": "4502" }],
"references": [
{ "supplier": { "id": "core" }, "id": "1163120081" },
{ "supplier": { "id": "yelp" }, "id": "GOBoHmG6pi2BP039KwrIRw" }
],
"contacts": [
{
"phone": [{ "value": "+494051326380" }],
"www": [
{ "value": "https://www.obi.de/baumarkt/hamburg-eppendorf/?wt_mc=port.de281_Hamburg-Eppendorf" },
{ "value": "https://www.obi.de/baumarkt/hamburg-eppendorf/?wt_mc=port.de281_Hamburg-Eppendorf..." },
{ "value": "https://www.obi.de/baumarkt/hamburg-eppendorf/?wt_mc=port.de.de281_Hamburg-Eppendorf..." }
],
"email": [{ "value": "Hamburg-Eppendorf@obi.de" }, { "value": "service@obi.de" }]
}
],
"openingHours": [
{
"text": ["Mon-Fri: 07:00 - 20:00", "Sat: 08:00 - 20:00"],
"isOpen": true,
"structured": [
{ "start": "T070000", "duration": "PT13H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR" },
{ "start": "T080000", "duration": "PT12H00M", "recurrence": "FREQ:DAILY;BYDAY:SA" }
]
}
]
}
]
}
同様に、住所区画近くのチェーンの場所の場合、HERE Geocoding and Search は住所区画近くのカテゴリーの場所の検索ユースケースでもサポートしています。
追加情報
/discover
パラメーターの詳細については、次のトピックを参照してください:API リファレンス