---
updatedAt: 2026-09-28T14:14:07.000Z
agentTools:
  projectIndex: https://developer.searchblox.com/v10.2/llms.txt
---

# Featured Results API

The SearchBlox Featured Results API enables you to add featured results into SearchBlox using simple HTTP POST and GET actions. The Featured Results API can create, activate, update and delete featured results. SearchBlox Featured Results API provides methods for working with featured results using REST requests with JSON payloads.

\#**Creating a New Featured Result**
\##Index URL
<https://localhost:8443/rest/v2/api/ads/create>

\##Method
POST

\##Media Type
application/json

\##Headers
content-type : application/json
accept: application/json

\##Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==

\##Document Syntax

[block:code]
{
  "codes": [
    {
      "code": "{\n \"apikey\": \"C6D418861BAD66A46A7CC96B70CEADF9\",\n \"title\": \"featured ad\",\n \"url\": \"http://www.bbc.com\",\n \"uid\": \"1\",\n \"startDate\": \"12-09-2021\",\n \"expiryDate\": \"18-10-2021\",\n \"expiryCount\": \"-1\",\n \"priority\": \"1\",\n \"active\": \"true\",\n \"keywordType\": \"keyword\",\n \"keywords\": \"test is good\",\n \"keywordsurl\": \"\",\n \"keywordsFieldType\": \"STRING\",\n \"type\": \"TEXT\",\n \"description\": \"asd\",\n \"imageUrl\": \"\",\n \"useDates\": \"false\",\n \"keywordsphrase\": \"false\",\n \"collections\": \"1,2,3,4,5\"\n}",
      "language": "json"
    }
  ]
}
[/block]

\##Document Description

[block:parameters]
{
  "data": {
    "h-0": "Fields",
    "h-1": "Description",
    "h-2": "Value",
    "0-0": "apikey",
    "0-1": "API key accessible in the Dashboard->Administration->License. It is also present in the config.xml file.",
    "0-2": "License value from license.xml file",
    "1-0": "title",
    "1-2": "API key from http://localhost:8080/searchblox/admin/main.jsp?menu1=adm",
    "2-0": "url",
    "2-1": "URL for the featured result.",
    "2-2": "Name of the custom collection",
    "1-1": "Title of a featured result .",
    "3-0": "uid",
    "3-1": "Unique id for the featured result.\nNote: Each featured result should be given unique ID",
    "4-0": "startDate",
    "5-0": "expiryDate",
    "6-0": "expiryCount",
    "7-0": "priority",
    "8-0": "active",
    "9-0": "keywordType",
    "11-0": "keywords",
    "13-0": "type",
    "14-0": "description",
    "15-0": "imageUrl",
    "16-0": "useDates",
    "17-0": "keywordsphrase",
    "18-0": "collections",
    "12-0": "keywordsurl",
    "4-1": "Start date to display the featured result.",
    "5-1": "Expiry date for the featured result.",
    "6-1": "Expiry count, i.e., number of times the featured result has to be displayed.",
    "7-1": "Priority in which the featured result has to be displayed. The value has to be given in numbers, example: 1, 2, 3 as per the priority.",
    "8-1": "This is to activate the featured result while creating.\nWhen value is **true** the featured result will be activated while creating.\nWhen value is  **false** the featured result will be deactivated while creating.",
    "9-1": "For Keyword Match the value is **keyword**\nFor Phrase Match the value is **phrase**\nFor Exact Match the value is **exact**",
    "11-1": "The list of keywords for the featured results.",
    "12-1": "The keywords URL for the featured results.",
    "13-1": "The type of featured result, whether **TEXT** or **GRAPHIC**.",
    "14-1": "Description of the featured result.",
    "15-1": "If the featured result is a graphic, then the image URL has to be given in this field.",
    "16-1": "Whether to use start and end dates for the featured results.",
    "17-1": "If keywords are to be taken as phrase then the value has to be entered as **true**.",
    "18-1": "The list of collections separated by comma for which the featured results has to be displayed.",
    "10-0": "keywordsFieldType",
    "10-1": "Whether it is words or string or keywords URL.\nThe value can be **STRING **for keywords and **URL** for keywords URL."
  },
  "cols": 2,
  "rows": 19
}
[/block]

\#**Update an Existing Featured Result**
\##Index URL
<https://localhost:8443/rest/v2/api/ads/update>

\##Method
POST

\##Media Type
application/json

\##Headers
content-type : application/json
accept: application/json

\##Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==

\##Document Syntax

[block:code]
{
  "codes": [
    {
      "code": "{\n \"apikey\": \"C6D418861BAD66A46A7CC96B70CEADF9\",\n \"title\": \"featured ad\",\n \"url\": \"http://www.bbc.com\",\n \"uid\": \"1\",\n \"startDate\": \"12-09-2021\",\n \"expiryDate\": \"18-10-2021\",\n \"expiryCount\": \"-1\",\n \"priority\": \"1\",\n \"active\": \"true\",\n \"keywordType\": \"exact\",\n \"keywords\": \"test is good\",\n \"keywordsurl\": \"\",\n \"keywordsFieldType\": \"STRING\",\n \"type\": \"TEXT\",\n \"description\": \"asd\",\n \"imageUrl\": \"\",\n \"useDates\": \"false\",\n \"keywordsphrase\": \"false\",\n \"collections\": \"1,2,3,4,5\"\n}",
      "language": "json"
    }
  ]
}
[/block]

\##Document Description

[block:parameters]
{
  "data": {
    "h-0": "Fields",
    "h-1": "Description",
    "h-2": "Value",
    "0-0": "apikey",
    "0-1": "API key accessible in the Dashboard->Administration->License. It is also present in the config.xml file.",
    "0-2": "License value from license.xml file",
    "1-0": "title",
    "1-2": "API key from http://localhost:8080/searchblox/admin/main.jsp?menu1=adm",
    "2-0": "url",
    "2-1": "URL for the featured result.",
    "2-2": "Name of the custom collection",
    "1-1": "Title of the featured result.",
    "3-0": "uid",
    "3-1": "Unique ID for the featured result.\nNote: Each featured result should be given unique ID",
    "4-0": "startDate",
    "5-0": "expiryDate",
    "6-0": "expiryCount",
    "7-0": "priority",
    "8-0": "active",
    "9-0": "keywordType",
    "11-0": "keywords",
    "13-0": "type",
    "14-0": "description",
    "15-0": "imageUrl",
    "16-0": "useDates",
    "17-0": "keywordsphrase",
    "18-0": "collections",
    "12-0": "keywordsurl",
    "4-1": "Start date to display the featured result.",
    "5-1": "Expiry date for the featured result.",
    "6-1": "Expiry count, i.e., no of times the featured result has to be displayed.",
    "7-1": "Priority in which the featured result has to be displayed. \n(Values are currently being given as alphabets, but will be changed to numbers in next build for ease of use).",
    "8-1": "This is to activate the featured result while creating.\nWhen value is **true** the featured result will be activated while creating.\nWhen value is  **false** the featured result will be deactivated while creating.",
    "9-1": "For Keyword Match the value is **keyword**\nFor Phrase Match the value is **phrase**\nFor Exact Match the value is **exact**",
    "11-1": "The list of keywords for the featured results.",
    "12-1": "The keywords URL for the featured results.",
    "13-1": "The type of featured result, whether **TEXT** or **GRAPHIC**.",
    "14-1": "Description of the featured result.",
    "15-1": "If the featured result is a graphic featured result then the image URL has to be given in this field.",
    "16-1": "Whether to use start and end dates for the featured results.",
    "17-1": "If keywords are to be taken as phrase then the value has to be entered as **true**.",
    "18-1": "The list of collections separated by comma for which the featured results are to be displayed.",
    "10-1": "Whether it is words or string or keywords URL.\nThe value can be **STRING **for keywords and **URL** for keywords URL.",
    "10-0": "keywordsFieldType"
  },
  "cols": 2,
  "rows": 19
}
[/block]

\#**Delete a Featured Result**
\##Index URL
<https://localhost:8443/rest/v2/api/ads/delete>

\##Method
POST

\##Media Type
application/json

\##Headers
content-type : application/json
accept: application/json

\##Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==

\##Document Syntax

[block:code]
{
  "codes": [
    {
      "code": "{\n \"apikey\": \"5615BEF054EB6CE7E3ECCF1DBBEC2524\", \n \"uid\": \"13\"\n}\t",
      "language": "json"
    }
  ]
}
[/block]

\##Document Description

[block:parameters]
{
  "data": {
    "0-0": "apikey",
    "1-0": "uid",
    "0-1": "API key accessible in the Dashboard->Administration->License. It is also present in the config.xml file.",
    "1-1": "Unique ID for the featured result.\nNote: Each featured result should be given a unique ID.",
    "h-0": "Field",
    "h-1": "Description"
  },
  "cols": 2,
  "rows": 2
}
[/block]

\#**Activate a Featured Result**
\##Index URL
<https://localhost:8443/rest/v2/api/ads/activate>

\##Method
POST

\##Media Type
application/json

\##Headers
content-type : application/json
accept: application/json

\##Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==

\##Document Syntax

[block:code]
{
  "codes": [
    {
      "code": "{\n\"apikey\": \"5615BEF054EB6CE7E3ECCF1DBBEC2524\", \n\"uid\": \"13\",\n\"active\":\"true\"\n}\t",
      "language": "json"
    }
  ]
}
[/block]

\##Document Description

[block:parameters]
{
  "data": {
    "0-0": "apikey",
    "1-0": "uid",
    "2-0": "active",
    "0-1": "API key accessible in the Dashboard->Administration->License. It is also present in the config.xml file.",
    "1-1": "Unique ID for the featured result.\nNote: Each featured result should be given a unique ID.",
    "2-1": "This is to activate the featured result while creating.\nWhen value is **true** the featured result will be activated while creating.\nWhen value is  **false** the featured result will be deactivated while creating.",
    "h-0": "Field",
    "h-1": "Description"
  },
  "cols": 2,
  "rows": 3
}
[/block]

\#**List UIDs of All Featured Results**
This API is to list the UID of featured results based on the collection.
\##Index URL
<https://localhost:8443/rest/v2/api/ads/list>

\##Method
POST

\##Media Type
application/json

\##Headers
content-type : application/json
accept: application/json

\##Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==

\##Document Syntax

[block:code]
{
  "codes": [
    {
      "code": "{\n\"apikey\":\"C6D418861BAD66A46A7CC96B70CEADF9\",\n\"collection\":\"1\",\n\"limit\":\"1\"\n}",
      "language": "json"
    }
  ]
}
[/block]

\##Document Description

[block:parameters]
{
  "data": {
    "0-0": "apikey",
    "1-0": "collection",
    "0-1": "API key accessible in the Dashboard->Administration->License. It is also present in the config.xml file.",
    "1-1": "Collection id for which UIDs of available featured results are to be fetched.",
    "2-0": "limit",
    "2-1": "The number of featured results that can be fetched. This is a mandatory field.",
    "h-0": "Fields",
    "h-1": "Description"
  },
  "cols": 2,
  "rows": 3
}
[/block]

\#**Delete All Featured Results**
Kindly note that all featured results would be deleted on using this API. Back up of featured results would be available at ../webapps/ROOT on using this delete all featured results API.
\##Index URL
<https://localhost:8443/rest/v2/api/ads/clear>

\##Method
POST

\##Media Type
application/json

\##Headers
content-type : application/json
accept: application/json

\##Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==

\##Document Syntax

[block:code]
{
  "codes": [
    {
      "code": "{\n\"apikey\":\"AD22EDE4515784C4C9433C72745183BA\"\n}",
      "language": "json",
      "name": "JSON"
    }
  ]
}
[/block]

\##Document Description

[block:parameters]
{
  "data": {
    "0-0": "apikey",
    "0-1": "API key accessible in the Dashboard->Administration->License. It is also present in the config.xml file.",
    "h-0": "Fields",
    "h-1": "Description"
  },
  "cols": 2,
  "rows": 1
}
[/block]