Geo-Special Search API
Prerequisite:
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
| param | description |
|---|---|
| query | search query |
| col | collection ID |
| geo.lat | latitude value for a location |
| geo.lon | longitude value for given location |
| geo.distance | Location 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
| param | description |
|---|---|
| query | search query |
| col | collection ID |
| geo.lat | latitude value for a location |
| geo.lon | longitude value for given location |
| geo.distance | Location distance in miles |
Header
| Header | Description |
|---|---|
| X-Correlation-ID | A 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.
| param | description |
|---|---|
| query | search query |
| col | collection ID |
| geo.bbox.top | Top frequency for location in range |
| geo.bbox.left | Left frequency for location in range |
| geo.bbox.right | Right frequency for location in range |
| geo.bbox.bottom | Bottom frequency for location in range |
Header
| Header | Description |
|---|---|
| X-Correlation-ID | A 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
Updated about 2 hours ago
