GET /v1/entity/search/keyword/bynearest

HTTP Method: GET

Path: /v1/entity/search/keyword/bynearest

Authentication: API Key required

Description: Perform a search for entities where the supplied keyword either matches by category or by company name nearest a supplied latitude and longitude.

In effect, this is a combined entity/search/who/bynearest + entity/search/what/bynearest

Parameters:

parameter type description required
keyword string The name to be searched for e.g. plumber yes
latitude float Latitude of centre point of search
yes
Longitude float Longitude of centre point of search
yes
country string Two-letter ISO country code. Default is "gb" no
per_page integer The number of results to return per page. Default 10. no
page integer The page number of results to return. Default 1. no

Pseudo Sample Response:

{
    "success": true,
    "msg": "ok",
    "data": {
        "total_rows": 265,
        "rows": [
              {
                "id": "<entity_id>",
                "doc" : { }
              },              {

"id": "<entity_id>", "doc" : { } },

.

.

.

]

}

}

where

  • total_rows is the number of rows in the data set
  • <entity_id> is the number that uniquely identifies each entity
  • each "doc" is an entity, as described in the /v1/entity API call.

Docs Navigation