Geo-Special Search API

📘

Prerequisite:

  • Create a Collection

  • Index a Collection , request payload meta fields should include location details.

  • Example 1

    {
        "apikey": "E4E6762CEB39E8482D7FACC88FB49514",
        "document": {
            "colname": "cnn",
            "url": "http://www.searchblox.com",
            "uid": "dal-001",
            "location": "http://www.searchblox.com",
            "alpha": "string",
            "size": "44244",
            "title": "Dallas office",
            "keywords": "keywords",
            "description":  "Dallas office",
            "content": "Our central office in Dallas.",
            "lastmodified": "14 January 2026 06:19:42 GMT",
            "contenttype": "HTML",
            "urllen": "300",
            "meta": {
          "location": "32.7767,-96.7970",
          "city": "Dallas"
        }
        }
    }
    
    
  • Example 2

{
    "apikey": "E4E6762CEB39E8482D7FACC88FB49514",
    "document": {
        "colname": "cnn",
        "url": "http://www.searchblox.com",
        "uid": "Bln-001",
        "location": "",
        "alpha": "string",
        "size": "44244",
        "title": "Berlin Store",
        "keywords": "keywords",
        "description": "Berlin Store",
        "content": "Our central office in Berlin.",
        "lastmodified": "14 January 2026 06:19:42 GMT",
        "contenttype": "HTML",
        "urllen": "300",
        "meta": {
            "latitude": "52.5200",
            "longitude": "13.4050",
            "city": "Berlin"
        }
    }
}


Search API

Search API in SearchBlox is used for secure search operations. Users can also use this API to retrieve search results in JSON format.

URL

https://localhost:8443/rest/v2/api/search?query=office&col=1&geo.lat=40.7128&geo.lon=-74.0060&geo.distance=50mi

Method

GET

params

Below given are the basic mandatory parameters. There are a wide variety of parameters that are supported, please refer Search Parameters

paramdescription
querysearch query
colcollection ID
geo.latlatitude value for a location
geo.lonlongitude value for given location
geo.distanceLocation distance in miles

Hybrid Search API

Hybrid Search API in SearchBlox is a standard search API that also supports hybrid search. To use this feature, Auto Relevance must be enabled. Auto Relevance can be enabled from the Settings tab of each collection

URL

https://localhost:8443/rest/v2/api/hybrid-search?query=office&col=10&geo.lat=40.7128&geo.lon=-74.0060&geo.distance=100mi

Method

GET

params

Below are the basic parameters used in the Hybrid Search API of SearchBlox. A wide variety of additional parameters are also supported, please refer Search Parameters

paramdescription
querysearch query
colcollection ID
geo.latlatitude value for a location
geo.lonlongitude value for given location
geo.distanceLocation distance in miles

Header

HeaderDescription
X-Correlation-IDA unique identifier that can be sent through the search API request.
The X-Correlation-IDs will be logged in ../webapps/ROOT/logs/query.log and can also be viewed in exported query logs file from SearchBlox Analytics.

Response

The JSON response from SearchBlox by default

Hybrid Search API With BBox

Hybrid Search API in SearchBlox is a standard search API that also supports hybrid search. To use this feature, Auto Relevance must be enabled. Auto Relevance can be enabled from the Settings tab of each collection

URL

https://localhost:8443/rest/v2/api/hybrid-search?query=office&col=10&geo.bbox.top=43.0&geo.bbox.left=-80.0&geo.bbox.bottom=38.0&geo.bbox.right=-70.0

Method

GET

params

Below are the basic parameters used in the Hybrid Search API of SearchBlox. A wide variety of additional parameters are also supported, please refer Search Parameters
Note : BBox is a range value.

paramdescription
querysearch query
colcollection ID
geo.bbox.topTop frequency for location in range
geo.bbox.leftLeft frequency for location in range
geo.bbox.rightRight frequency for location in range
geo.bbox.bottomBottom frequency for location in range

Header

HeaderDescription
X-Correlation-IDA unique identifier that can be sent through the search API request.
The X-Correlation-IDs will be logged in ../webapps/ROOT/logs/query.log and can also be viewed in exported query logs file from SearchBlox Analytics.

Response

The JSON response from SearchBlox by default