---
updatedAt: 2026-09-28T14:50:10.000Z
agentTools:
  projectIndex: https://developer.searchblox.com/llms.txt
---

# Secure Search API

The Secure Search API allows authenticated users to retrieve search results from private or secured SearchBlox collections. It requires two steps: first, obtain a security token using your credentials, and then use that token to make search requests.

## Before You Begin

Before making authentication requests, configure the required realm in **Search > Security Settings** in the SearchBlox Admin Console. Also, ensure that the necessary users and groups have been added to the configured realm.

The Secure Search API in SearchBlox requires two API calls:

Get the security token

Make the Search API request using the security token

**GET the Security Token**

The authentication request sends user credentials based on the configured security system, such as SearchBlox Realm or LDAP Realm.

## Prerequisite

Select the required realm in Search → Security settings in SearchBlox, add the necessary users and groups, and then authenticate using the following API call.

## Method

`POST`

## Content-Type

application/json

## URL

https\://localhost:8443/rest/v2/api/secured/authenticate

## JSON Request

```text LDAP Realm
{
"username":"ad-test\\test",
"password":"password"
}
```

```text SearchBlox Realm
{
"username":"user",
"password":"pwd"
}
```

# **Search API Request**

Using the token generated in the previous step, you can retrieve search results in JSON format by making the following API request.

## Prerequisite

Provide the token generated in the previous request as the Bearer Token under the Authorization section in Postman. Please refer to the screenshot in postman for the same.

![](https://files.readme.io/f2ea55b-3e7e2d4-searchapi.png "3e7e2d4-searchapi.png")

## Method

`GET`

## URL

`https://localhost:8443/rest/v2/api/search?query=\*&public=true`

## Parameters

Below given are the basic mandatory parameters. There are a wide variety of parameters that are supported, please refer to [Search Parameters](https://developer.searchblox.com/docs/search-parameters)

| param  | description                       |
| :----- | :-------------------------------- |
| query  | query string                      |
| public | public parameter value to be true |