Sign up (with export icon)

Web search

Show the table of contents

This page covers the websearch_* options, which connect CKEditor AI On-Premises to a web search endpoint you run. You need it only if you enable web search for conversations or Document Processing.

Note

CKEditor AI On-Premises does not include a web search tool. You provide the tool, run it, and connect it through the endpoint below.

To connect your web search endpoint, set these options:

  • websearch_enabled – must be set to true.
  • websearch_endpoint – the URL of your gateway. The service sends the search requests to this URL.
  • websearch_request_timeout – request timeout in milliseconds (optional, default: 30000).
  • websearch_headers – headers the service sends with every web search request (optional). In the configuration file, the value is a JSON object or a key1:value1,key2:value2 string. As an environment variable, the value must be the string form.
{
	"websearch_enabled": true,
	"websearch_endpoint": "[WEBSEARCH_ENDPOINT]",
	"websearch_request_timeout": 30000,
	"websearch_headers": {
		"Authorization": "Bearer [WEBSEARCH_TOKEN]"
	}
}
Copy code

Request format

Copy link

Your endpoint must accept POST requests with this JSON body:

{
  "query": "search query string"
}
Copy code

Where:

  • query (required) – the search query string.

Response format

Copy link

Your endpoint must return this response:

{
  "results": [
	{
	  "url": "https://example.com/article",
	  "text": "A snippet or excerpt of the content",
	  "title": "Article Title",
	  "author": "Author Name",
	  "publishedAt": "2024-12-12T10:30:00Z",
	  "favicon": "https://example.com/favicon.ico"
	}
  ]
}
Copy code

Where:

  • results (required) – an array of web search results.

Each result object contains:

  • url (required) – the URL of the search result.
  • text (required) – a snippet or excerpt of the content.
  • title (optional) – the title of the search result.
  • author (optional) – the author of the content.
  • publishedAt (optional) – the publication date and time of the content in ISO 8601 format.
  • favicon (optional) – the URL of the favicon for the website.

Next steps

Copy link