Search for a place using a phone number

This tutorial demonstrates how to search for a place using its phone number.

Procedure

To search for Hako Ramen restaurant in Berlin, you can use its phone number against Discover. The phone number has various forms:

  • international forms: +493089405000, 00493089405000
  • local forms: (030) 89405000, 03089405000

Searching for this place with "(030) 89405000" from a position in the Berlin vicinity would send the following request:

GET https://discover.search.hereapi.com/v1/
    discover
    ?at=52.60088,13.5924
    &q=(030)%2089405000
    &apiKey={YOUR_API_KEY}

The following parameters are used:

  • at - Specify the center of the search context expressed as coordinates.
  • q - Enter a free-text query.
  • apiKey - Your API key.

Note

This request uses API key authentication. For more information about authentication options on the HERE platform, see the Identity & Access Management Guide.

The result lists detailed information about the related location objects:

{
  "items": [
    {
      "title": "Hako Ramen",
      "id": "here:pds:place:276u33d8-f880e93a803146e2a1c9a63539026f05",
      "resultType": "place",
      "foodTypes": [{ "id": "203-000", "name": "Japanese", "primary": true }],
      "contacts": [
        { "phone": [{ "value": "+493089405000" }], "www": [{ "value": "https://www.hakoramenberlin.de" }] }
      ],
      "address": {
        "label": "Hako Ramen, Bergmannstraße 11, 10961 Berlin, Deutschland",
        ...
      },
      ...
    }
  ]
}

Additional information

For more information about /discover parameters, see: API Reference.

results matching ""

    No results matching ""