Browse

The /browse endpoint provides a structured search by filtering items by category and name at a given geo-position in a radius of 250km. Items returned are places, streets or localities, ranked by increasing distance.

geographic filter

/browse returns HERE Geocoding and Search indices data at am maximum distance of 250km from a search center. The Search center is defined by the geo-position specified in the input query parameter at. Items distances are calculated with respect to this search center.

Additionally to the implicit filter of 250km around the search center, /browse supports 2 additional geographic filters through the query parameter in:

  • a circle through the in parameter type circle
  • a bounding box through the in parameter type bbox

More details are to be found in the API Reference.

Multigranular category filter

/browse allows you to retrieve places at a given position for a specific HERE Places category or cuisine.

Multiple values are supported, provided they are separated by a comma. /browse returns places with at least one of the queried categories. Additionally, the 3 levels of Places categories are supported, for customers needing to retrieve places of a more general category.

/browse also allows customers to filter results using HERE Places categories at any of their 3 levels:

  • level 3 for fine grained categories (ex: 100-1000-0002 for fine dining places),
  • level 2 for intermediate granularity (ex: 100-1000 for restaurant places) or
  • level 1 for a high level (ex: 100 for places where you can eat and drink)

For example, an application in a car or on a cell-phone would expose an icon representing a gas-station, and use the category id 700-7600-0000,700-7600-0116 as value for the categories parameter of a /browse query:

GET https://browse.search.hereapi.com/v1/
    browse
    ?at=-23.000813,-43.351629
    &limit=2
    &categories=100-1100,200-2000-0011,100-1000

Authorization: Bearer [your token]

The expected result for this query would be the following:

{
  "items": [
    {
      "title": "La Nonna",
      "id": "here:pds:place:07675cjn-003772de1ae7465a8f67305e31a3611a",
      "resultType": "place",
      "address": {
        "label": "La Nonna, Rua Maria Philomena Lage, Barra da Tijuca, Rio de Janeiro - RJ, 22631-440, Brasil",
        "countryCode": "BRA",
        "countryName": "Brasil",
        "state": "Rio de Janeiro",
        "city": "Rio de Janeiro",
        "district": "Barra da Tijuca",
        "street": "Rua Maria Philomena Lage",
        "postalCode": "22631-440"
      },
      "position": { "lat": -23.00056, "lng": -43.35198 },
      "access": [{ "lat": -23.00056, "lng": -43.35198 }],
      "distance": 45,
      "categories": [{ "id": "100-1000-0000", "primary": true }]
    },
    {
      "title": "Mirilli e Elias",
      "id": "here:pds:place:076xjxn4-bd00422cd7cc0293789ade509aeaef55",
      "resultType": "place",
      "address": {
        "label": "Mirilli e Elias, Avenida das Américas, 3757, Barra da Tijuca, Rio de Janeiro - RJ, 22631-003, Brasil",
        "countryCode": "BRA",
        "countryName": "Brasil",
        "state": "Rio de Janeiro",
        "city": "Rio de Janeiro",
        "district": "Barra da Tijuca",
        "street": "Avenida das Américas",
        "postalCode": "22631-003",
        "houseNumber": "3757"
      },
      "position": { "lat": -23.00052, "lng": -43.35129 },
      "access": [{ "lat": -23.0004, "lng": -43.35129 }],
      "distance": 47,
      "categories": [
        { "id": "100-1000-0000", "primary": true },
        { "id": "600-6000-0061" }
      ],
      "contacts": [{ "phone": [{ "value": "+552124312897" }] }]
    }
  ]
}

A mobile phone application for tourists could use the combination of

  • historical monuments (300-3000-0025) and museums (300-3100)
  • shopping malls (600-6100-0062)
  • parks (550-5510-0202) and leisure places (500-5520)

So that a query from a position in Rome, Italy would look like:

GET https://browse.search.hereapi.com/v1/
    browse
    ?at=41.93088,12.46803
    &limit=5
    &categories=300-3000-0025,300-3100.550-5510-0202,500-5520,600-6100-0062

Authorization: Bearer [your token]

The expected result for this query would be:

{
  "items": [
    {
      "title": "I Ragazzi del Muretto",
      "id": "here:pds:place:380sr2ye-961ff1a15b8a4620b07bcbb22abb2068",
      "resultType": "place",
      "categories": [
        { "id": "200-2000-0000", "primary": true },
        { "id": "300-3000-0000" },
        { "id": "300-3000-0025" }
      ],
      ...
    },
    {
      "title": "Maxxi - Museo Nazionale delle Arti del XXI Secolo",
      "id": "here:pds:place:380sr2ye-3f8bfb611d1640e88a8577457c00b118",
      "resultType": "place",
      "categories": [
        { "id": "300-3100-0029" "primary": true },
        { "id": "300-3000-0000" }, { "id": "300-3000-0024" }, { "id": "300-3000-0025" },
        { "id": "300-3100-0000" }, { "id": "800-8600-0197" }, { "id": "900-9300-0221" }
      ],
      ...
    },
    {
      "title": "Palazzetto dello Sport",
      "id": "here:pds:place:380sr2ye-90260c572b6444c78b2fc9aa5d5ae4bb",
      "resultType": "place",
      "categories": [
        { "id": "800-8600-0180", "primary": true },
        { "id": "300-3000-0025" }, { "id": "800-8600-0000" },  { "id": "800-8600-0197" },
        { "id": "900-9300-0221" }
      ],
      ...
    },
    {
      "title": "L' Edicola di Marco Leonardi",
      "id": "here:pds:place:380sr2ye-de532d88bc2c47c2820fc167ee6ba95d",
      "resultType": "place",
      "categories": [
        { "id": "700-7200-0000", "primary": true },
        { "id": "300-3000-0000" }, { "id": "300-3000-0025" }
      ],
      ...
    },
    {
      "title": "Chiesa di San Valentino",
      "id": "here:pds:place:380sr2ye-a353a5276b3945b8b7dc9e00e593ef79",
      "resultType": "place",
      "categories": [
        { "id": "300-3000-0025", "primary": true },
        { "id": "300-3000-0000" }
      ],
      ...
    }
  ]
}

Name filter

An additional way to filter locations is to use a name filter. Such a filter is most useful as a complement of a category filter, but can be used solely too.

More specifically, /browse only returns items for which addresses and names contain a common word with the name parameter.

For example, a cell-phone application would expose an icon representing Petrobras gas-stations, and use the category id 700-7600-0000,700-7600-0116 as value for the categories parameter together with a name parameter set to "petrobras":

GET https://browse.search.hereapi.com/v1/
    browse
    ?at=-23.000813,-43.351629
    &limit=2
    &categories=700-7600-0000,700-7600-0116
    &name=Petrobras

Authorization: Bearer [your token]

The expected result for this query would be the following:

{
  "items": [
    {
      "title": "Petrobras",
      "id": "here:pds:place:07675cjj-15f8bcd7e0d544758df31a6562d37a30",
      "resultType": "place",
      "categories": [
        { "id": "700-7600-0116", "primary": true },
        { "id": "700-7400-0000" }
      ],
      ...
    },
    {
      "title": "Petrobras",
      "id": "here:pds:place:07675cjj-b0aa3eaceee44dc1b6d4982adf4a1e1f",
      "resultType": "place",
      "categories": [
        { "id": "700-7600-0116", "primary": true },
        { "id": "700-7400-0000" }
      ],
      ...
    }
  ]
}

Language preference

Applications needing to enforce a preferred language in the /browse result items need to set the lang parameter to the necessary BCP 47 language code. Where possible, the endpoint will present the slice-and-diced response items in the expected language. If lang is not set, or if the result item has no translation in the requested language, the default language will be used.

Surroundings

A special use-case served by /browse is to return surrounding places, streets or localities at a given position without any names or categories filtering.

For example, to get the 10 items at the position (41.89344,-87.62406) in Chicago Millennium Mile, a customer would send:

GET https://browse.search.hereapi.com/v1/
    browse
    ?at=41.89344,-87.62406
    &limit=10

Authorization: Bearer [your token]

The expected result for this query would be the following:

{
  "items": [
    {
      "title": "BURBERRY",
      "id": "here:pds:place:840dp3wq-bb300b5b4fe04484847007a0d56257c0",
      "resultType": "place",
      "address": {
        "label": "BURBERRY, 633 N Michigan Ave, Chicago, IL 60611, United States",
        "countryCode": "USA",
        "countryName": "United States",
        "state": "Illinois",
        "county": "Cook",
        "city": "Chicago",
        "district": "River North",
        "street": "N Michigan Ave",
        "postalCode": "60611",
        "houseNumber": "633"
      },
      "position": { "lat": 41.8935, "lng": -87.62387 },
      "access": [{ "lat": 41.8935, "lng": -87.6242 }],
      "distance": 17,
      "categories": [
        { "id": "600-6800-0089", "primary": true },
        { "id": "600-6800-0000" },
        ...
      ],
      ...
    },
    {
      "title": "Woman's Athletic Club",
      "id": "here:pds:place:840dp3wq-ffceb707caa9431b8264c144f862de7b",
      ...
    },
    {
      "title": "Cartier",
      "id": "here:pds:place:840dp3wq-f3355e532c7b49109f373377dc9e9251",
      ...
    },
    {
      "title": "Michigan & Ontario",
      "id": "here:pds:place:840dp3wq-60621060ea2849839c023fb68db4f3e6",
      ...
    {
      "title": "American Osteopathic Info",
      "id": "here:pds:place:840dp3wq-c483479cb4a14e459a69691554016b4b",
      ...
    },
    {
      "title": "American Osteopathic Foundation",
      "id": "here:pds:place:840dp3wq-aa1e802dd3284e71a6b7987ecabdaedb",
      ...
    },
    {
      "title": "Musburger Todd W",
      "id": "here:pds:place:840dp3wq-88d65749e1e542688de180199d15f965",
      ...
    },
    {
      "title": "National Certification for",
      "id": "here:pds:place:840dp3wq-5e2d395c96594e62bdcde3f9d66a667b",
      ...
    },
    {
      "title": "American Osteopathic Association",
      "id": "here:pds:place:840dp3wq-0d0924169bf64975b9fef3f6c65fac03",
      ...
    },
    {
      "title": "Dr Ronna Fisher, Aud",
      "id": "here:pds:place:8408lxx5-0002694e83060bc51303628b6b96f2e3",
      ...
    }
  ]
}

The first result is a luxury shop, the second a bus stop, etc.

To make sure that results only contain places, a whitelist of all level 1 categories is necessary:

GET https://browse.search.hereapi.com/v1/
    browse
    ?at=41.89344,-87.62406
    &limit=10
    &categories=100,200,300,350,400,500,550,600,700,800,900

Authorization: Bearer [your token]

Along the route

Last but not least, /browse like /autosuggest and /discover supports search along the route through the addition of a route parameter to the at parameter. Check Implementing Search along the route for specifics.

Filtering versus One-box

Whereas /discover anticipates the intention of the submitter's (human) search request, the /browse endpoint takes a more machine-oriented or precise interpretation of the request.

For example, if you submit a request for for "New York Pizza", /discover returns results for restaurants in New York City serving pizza. Whereas, /browse returns a restaurant named "New York Pizza".

As another example, german end-users would formulate a search query for gas-stations with the phrase "Tankstellen" sent to the /discover endpoint, while an in-car application would propose pre-defined category search shortcuts linked to the /browse endpoint together with associated catgory ids like 700-7600-0000 for gas-stations.

The sorting is similarly contrasted: for /discover endpoint results are mostly sorted by relevance, whereas in /browse, results are always sorted by distance.

results matching ""

    No results matching ""