Semantic-Org/Semantic-UI · error

No search endpoint was specified

Error message

No search endpoint was specified

What it means

The noEndpoint string lives in search.js settings.error but search.js itself never calls module.error(error.noEndpoint). Endpoint configuration is delegated to the Semantic UI api module via $module.api(apiSettings) with action 'search' (search.js:335-361). When apiSettings has no url/action-url, the api module (not search) is what surfaces the missing-endpoint condition. So in this module the string is effectively unused documentation of that scenario.

Source

Thrown at src/definitions/modules/search.js:1302

  onResultsOpen  : function(){},
  onResultsClose : function(){},

  className: {
    animating : 'animating',
    active    : 'active',
    empty     : 'empty',
    focus     : 'focus',
    hidden    : 'hidden',
    loading   : 'loading',
    results   : 'results',
    pressed   : 'down'
  },

  error : {
    source          : 'Cannot search. No source used, and Semantic API module was not included',
    noResults       : 'Your search returned no results',
    logging         : 'Error in debug logging, exiting.',
    noEndpoint      : 'No search endpoint was specified',
    noTemplate      : 'A valid template name was not specified.',
    oldSearchSyntax : 'searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.',
    serverError     : 'There was an issue querying the server.',
    maxResults      : 'Results must be an array to use maxResults setting',
    method          : 'The method you called is not defined.'
  },

  metadata: {
    cache   : 'cache',
    results : 'results',
    result  : 'result'
  },

  regExp: {
    escape     : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
    beginsWith : '(?:\s|^)'
  },

View on GitHub (pinned to 597843ab84)

Solutions

  1. Provide apiSettings.url (e.g. '/api/search?q={query}') so the api module has an endpoint.
  2. Register the 'search' action URL via $.fn.api.settings.api.search = '/api/search?q={query}'.
  3. Verify $.fn.api is loaded and that the resolved URL is non-empty before triggering a remote query.

Example fix

// before
$('.ui.search').search({ apiSettings: { action: 'search' } }); // no url -> api reports missing endpoint

// after
$('.ui.search').search({
  type: 'standard',
  apiSettings: { url: '/api/search?q={query}' }
});
Defensive patterns

Strategy: validation

Validate before calling

// Validate an endpoint resolves before enabling remote search
var url = (cfg.apiSettings && cfg.apiSettings.url) || ($.fn.api && $.fn.api.settings && $.fn.api.settings.api && $.fn.api.settings.api.search);
if (!url) throw new Error('Search has no api endpoint url configured.');
$('.ui.search').search(cfg);

Prevention

When it happens

Trigger: Remote search is enabled ($.fn.api is present) but apiSettings.url and any action-url mapping are missing; the search module calls $module.api({action:'search', urlData:{query:q}}) with no resolvable endpoint, and the api layer reports the missing endpoint rather than search.js logging noEndpoint.

Common situations: Passing apiSettings without a url; relying on a default action URL that was never registered with $.fn.api.settings.api; typos in the url template; assuming search reads settings.url directly (it does not — it goes through api).

Related errors


AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13). Data as JSON: /api/errors/9f9dc71e51a72c9d. Report an issue: GitHub.