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.

Location context and 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
  • a list of upper-case ISO 3166-1 alpha-3 country codes through the in parameter type countryCode

Note that HERE Geocoding and Search supports the country group XEA, equivalent to the list of country codes AUT, BEL, BGR, HRV, CYP, CZE, DNK, EST, FIN, FRA, DEU, GRC, HUN, IRL, ITA, LVA, LTU, LUX, MLT, NLD, POL, PRT, ROU, SVK, SVN, ESP, SWE

More details are to be found in the API Reference.

The list of allowed at and in combinations on /browse is:

  • at
  • at with in=countryCode
  • at with in=circle
  • at with in=circle and in=countryCode
  • at with in=bbox
  • at with in=bbox and in=countryCode

Multi-granular place category filter

/browse allows you to retrieve places at a given position for a specific HERE Places category or HERE Places cuisine. For this, the query parameters categories and foodTypes are used respectively.

HERE Places categories can be specified as values for the categories field at any of their 3 levels:

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

HERE Places cuisines can be specified as values for the foodTypes field at any of their 2 levels:

  • level 1 for a high level (ex: 201 for places serving Chinese cuisine)
  • level 2 for fine-grained cuisines (ex: 201-009 for places serving Chinese cuisine from Szechuan)

Both categories and foodTypes query fields support multiple values, provided they are separated by a comma.

Example 1

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=47.80049,3.57119
    &limit=2
    &categories=700-7600-0000,700-7600-0116
    &apiKey={YOUR_API_KEY}

The expected result for this query would be the following:

{
  "items": [
    {
      "title": "E.Leclerc",
      "id": "here:pds:place:250u06xc-0689f131a30149b292741d0abcd19b8e",
      "categories": [{ "id": "700-7600-0116", "name": "Stations service", "primary": true }],
      "chains": [{ "id": "253", "name": "E. LECLERC" }],
      ...
    },
    {
      "title": "TOTAL",
      "id": "here:pds:place:250u06xc-f9bea569497c4bac907f478cd4d9cb0d",
      "categories": [
        { "id": "700-7600-0116", "name": "Stations service", "primary": true },
        { "id": "700-7850-0000", "name": "Garage auto" }
      ],
      "chains": [{ "id": "35", "name": "TOTAL" }],
      ...
    }
  ]
}

Example 2

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
    &apiKey={YOUR_API_KEY}

The expected result for this query would be:

{
  "items": [
    {
      "title": "Parco Viale Tiziano/ Villaggio Olimpico",
      "id": "here:pds:place:380sr2ye-ea05e6b5936b4bf4a03d80f174720d16",
      "categories": [{ "id": "550-5510-0202", "name": "Parco pubblico", "primary": true }],
      ...
    },
    {
      "title": "National Museum of XXI Century Arts",
      "id": "here:pds:place:380sr2ye-f1bd96fd9a0547b5ae0bd7761d108d79",
      "categories": [{ "id": "300-3100-0000", "name": "Museo", "primary": true }],
      ...
    },
    {
      "title": "MAXXI National Museum of the 21st Century Arts",
      "id": "here:pds:place:380sr2ye-90a6ac5cdadcda549b2824dd4e7ec46e",
      "categories": [{ "id": "300-3100-0000", "name": "Museo", "primary": true }],
      ...
    },
    {
      "title": "Maxxi Museo Nazionale delle Arti del ventunesimo Secolo",
      "id": "here:pds:place:380sr2ye-3f8bfb611d1640e88a8577457c00b118",
      "categories": [
        { "id": "300-3100-0029", "name": "Museo delle arti", "primary": true },
        { "id": "100-1000-0000", "name": "Ristorante" },
        { "id": "100-1100-0000", "name": "Caffè/Tè" },
        { "id": "300-3000-0000", "name": "Punto di riferimento o attrazione" },
        { "id": "300-3000-0025", "name": "Monumento storico" },
        { "id": "300-3100-0000", "name": "Museo" },
        { "id": "900-9300-0221", "name": "Edificio residenziale" }
      ],
      ...
    },
    ...
  ]
}

Example 3

The mobile phone application of previous example could use the combination of restaurant categories and the cuisine they serve:

  • fast food (100-1000-0009)
  • either Indian or Pakistani cuisine (202 or 208)

So that a query from a position in London would look like:

GET https://browse.search.hereapi.com/v1/
    browse
    ?at=51.51979,-0.088
    &limit=5
    &categories=100-1000-0009
    &foodTypes=202,208
    &apiKey={YOUR_API_KEY}

The expected result for this query would be:

{
  "items": [
    {
      "title": "Bema Eats",
      "id": "here:pds:place:826gcpvn-e8759ce61546444ba1b026589c68e212",
      "distance": 734,
      "categories": [{ "id": "100-1000-0009", "name": "Fast Food", "primary": true }],
      "foodTypes": [
        { "id": "200-000", "name": "Asian", "primary": true },
        { "id": "102-000", "name": "Mexican" },
        { "id": "202-000", "name": "Indian" },
        { "id": "250-000", "name": "Middle Eastern" },
        { "id": "800-066", "name": "Fusion" }
      ],
      ...
    },
    {
      "title": "Tifinbox",
      "id": "here:pds:place:826aabd1-e9ad6c1db5e50115cc767baf608af548",
      "distance": 851,
      "categories": [
        { "id": "100-1000-0000", "name": "Restaurant", "primary": true },
        { "id": "100-1000-0003", "name": "Take Out & Delivery Only" },
        { "id": "100-1000-0009", "name": "Fast Food" },
        { "id": "100-1100-0000", "name": "Coffee/Tea" },
        { "id": "100-1100-0010", "name": "Coffee Shop" }
      ],
      "foodTypes": [
        { "id": "800-064", "name": "International", "primary": true },
        { "id": "200-000", "name": "Asian" },
        { "id": "202-000", "name": "Indian" },
        { "id": "800-050", "name": "Fast Food" }
      ],
      ...
    },
    ...
  ]
}

Place chain filter

Additionally to categories and foodTypes query filters, /browse endpoint also propose a chains query filter. Any combination of HERE chain id can be used to retrieve places of the related chains.

For instance, a car manufacturer's companion app can use the filters categories=700-7850-0122&chains=299 to only retrieve nearby repairs for the car manufacturer's brand.

Negative filtering

/browse also allows you to retrieve places that do not have specific categories, cuisines or chains. For this an exclamation mark ("!") is necessary in front of the category ID , the cuisine ID or the chain ID. Negated and regular values can be mixed into the same field. Negated categories have precedence over regular ones.

For example, to retrieve all restaurants except fast-food restaurants, an application would add to Browse queries categories=100-1000,!100-1000-0009.

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, each result returned by /browse contains each token of the name filter value in at least one of its names.

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":

Note that /browse with name is also matching name tokens regardless of potential diacritics.

GET https://browse.search.hereapi.com/v1/
    browse
    ?at=-23.000813,-43.351629
    &categories=700-7600-0000,700-7600-0116
    &limit=3&lang=en-US
    &name=petrobras
    &apiKey={YOUR_API_KEY}

The expected result for this query would be the following:

{
  "items": [
    {
      "title": "Petrobras",
      "id": "here:pds:place:07675cjj-15f8bcd7e0d544758df31a6562d37a30",
      "distance": 47,
      "categories": [{ "id": "700-7600-0116", "name": "Gas Station", "primary": true }],
      "chains": [{ "id": "4017", "name": "Petrobras" }],
      "references": [{ "supplier": { "id": "core" }, "id": "1119174661" }],
      ...
    },
    {
      "title": "Petrobras",
      "id": "here:pds:place:07675cjj-b0aa3eaceee44dc1b6d4982adf4a1e1f",
      "distance": 1017,
      "categories": [{ "id": "700-7600-0116", "name": "Gas Station", "primary": true }],
      "chains": [{ "id": "4017", "name": "Petrobras" }],
      ...
    },
    {
      "title": "Petrobras",
      "id": "here:pds:place:07675cjj-fa3ca5d486024e098d2379e3b854a8c6",
      "resultType": "place",
      "distance": 1690,
      "categories": [{ "id": "700-7600-0116", "name": "Gas Station", "primary": true }],
      "chains": [{ "id": "4017", "name": "Petrobras" }],
      ...
    }
  ]
}

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.89296,-87.62283) in Chicago, a customer would send:

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

The expected result for this query would be the following:

{
  "items": [
    {
      "title": "N Saint Clair St, Chicago, IL 60611, United States",
      "id": "here:af:street:lCvTQTfs2eCj2xNrV9W..A",
      "resultType": "street",
      ...
    },
    {
      "title": "Inn of Chicago",
      "id": "here:pds:place:840dp3wq-b8a6b34502fe4852a5103fefd87b62ad",
      "resultType": "place",
      ...
    },
    {
      "title": "Inn Bar",
      "id": "here:pds:place:840dp3wq-5479400a4b47402492e7d47288f0a3d5",
      "resultType": "place",
      ...
    },
    {
      "title": "USPS Collection Box - Blue Box",
      "id": "here:pds:place:840dp3wq-4de5518b40d7cb88d6771dda834104d9",
      "resultType": "place",
      ...
    },
    ...
  ]
}

The first result is a street, the second place, etc.

To make sure that results only contain places, an accept-list 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
    &apiKey={YOUR_API_KEY}

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 "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 ""