地理的位置の近くのカテゴリでplacesを検索

このチュートリアルでは、地域に近いplacesを検索する方法について説明します。

プロシージャ

ハンブルクの 5 つの OBI のplacesを地理的位置(52.81730,12.23683)から検索するには、次のリクエストを送信します。

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 platform の認証オプションの詳細については、『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 リファレンス

」に一致する結果は 件です

    」に一致する結果はありません