Search clients


TODO: Usage of the Interface GraphQL API is not documented yet.


Explorers ability to create fully customised search interfaces is the icing on the cake. By default, Explorer does not expose any web APIs, but rather enable developers to access the interfaces through an internal JavaScript API.

Search apps

There are numerous ways of exposing your search data from Explorer, but they all start with the development of a custom XP application.

The application will use Explorers API, and then offers a solution to exposing the data. Here are the most common approaches:

Server pages

Search interface and results delivered as good old web pages.


Exposes your search interface through a RESTful API of your preferred format and style, to be consumed by any client. This may also be secured as required.


Exposes your search interface through graphQL. Check out Enonic’s GraphQL library for more details. The API may be secured according to your requirements.

API and front-end

Finally, you may combine the above, and have your app deliver both the API and front-end clients through XP as desired.

Using the Explorer Client starter

Here’s a tutorial on how to use the Explorer Client starter

Using the search API

There are numerous ways to return a search result.

Perhaps you want to provide a JSON service to be used with a react frontend, or do a static HTML page by rendering server-side.

Common to all solutions is that you have to call the search api, and perhaps manipulate the result to your liking.

Below is an example of how to invoke the search API in a server-side controller:
import {RESPONSE_TYPE_JSON} from '@enonic/js-utils';
import {makeSchema} from '/lib/explorer/interface/graphql/makeSchema';
import {execute} from '/lib/graphql';

export function get({
}) {
	const context = {
		interfaceName: 'myInterfaceName'
	return {
		contentType: RESPONSE_TYPE_JSON,
		body: JSON.stringify(execute(makeSchema(), query, variables, context))

Site integration

When integrating search in a site, it may be practical to enable editors to select which interface to use in the search.

A custom selector may be a practical solution to this.

Custom selector

Explorer’s API provides a service that can be used by a custom selector in any site application.

TODO: Confirm service is part of library

<input name="interface" type="CustomSelector">
	<occurrences minimum="1" maximum="1"/>

The service can currently only be accessed with any of these roles:

  • Content Manager Administrator (cms.admin)

  • Content Manager App (

  • Content Manager Expert (

  • Administrator (system.admin)

  • Administration Console Login (system.admin.login)