API

API methods

For a head start you can also download a POSTMAN collection of the endpoints (what is POSTMAN?).

Add a page to the index (or re-index a page)

The unique identifier for an indexed page is its URL. If you have a page with a given URL already, it will be updated.

Where {URL} is the absolute URL you want to index.

You can also send the indexable data directly as a JSON.

The body of the POST request must contain a JSON object of the following format:

The fields structuredData, filters, and language are optional.

Remove a page from the index

Where {URL} is the absolute URL you want to index.

Remove multiple pages from the index

Where {URL_PATTERN} is a regular expression. All URLs matching the expression will be removed from the index.

Search

Where

  • {QUERY} is your search query.
  • {FILTER_OPTIONS} (optional) if set to true the API will return possible filters found in the result set.
  • {FILTERS} (optional) is a JSON array of filters. Filters are structured the same way for querying as when indexing. For example, [{"key": "value"},{"votes": {"min":2,"max":256}},{"tags": ["abc","def"]}].
  • {SORT} (optional) The name of the data point by which you want to sort.
  • {ORDER} (optional) The sorting order, either ASC for ascending or DESC for descending.
  • {INCLUDE} (optional) if set to true, the results will contain the content snippet. By default it is false.
  • {HIGHLIGHT} (optional) if set to true, the query terms will be marked up with a . By default the parameter is false.
  • {CONTENT_GROUPS} (optional) if you only want to search within certain content groups, you can specify them in a JSON array here. For example, ["group1","group2"].
  • {OFFSET} (optional) is the number of results to skip from the beginning.
  • {LIMIT} (optional) is the number of results to return within range [1,1000].
  • {LOG} (optional, true|false) whether to log the query or not (default is true).

Search Suggestion

Where

  • {QUERY} is your search query.
  • {LIMIT} (optional) is the number of results to return within range [1,1000].

Log Query

Searches are logged automatically (if {LOG} is true). If you do not use the Site Search 360 Javascript but only the API, you can use this endpoint to also log abandoned search suggestions and selected suggestions.

Where you have to send the following parameters in the POST body:

  • query: The query to log.
  • action: The action, either "select" (search suggestion was selected) or "abandon" (search suggestions started but query not executed).
  • timeToAction (optional): The number of milliseconds before the user abandoned or selected the query.
  • site: Your site id.
  • apiKey: Your API key.

Index Status

This endpoint returns a json with the number of indexed pages.

To check which pages have been indexed, you can use an even more elaborate request.

Where you can use the following query parameters to filter the results:

  • {URL} (optional): The string that should be part of the URL.
  • {CONTENT_TYPE} (optional): The content type you want to filter by, e.g. "HTML" or "PDF".
  • {STATUS} (optional): The index status you want to filter by, e.g. 200 for successfully indexed.
  • {OFFSET} (optional) is the number of results to skip from the beginning.
  • {LIMIT} (optional) is the number of results to return within range [1,100].

This endpoint allows you access to what you see in the index status table under Index Control.

Get frequent queries within a certain time frame

Where

  • {START_TIMESTAMP} is the UNIX timestamp of the begin of the period.
  • {END_TIMESTAMP} is the UNIX timestamp of the end of the period.

Get queries within a certain time frame

Where

  • {START_TIMESTAMP} is the UNIX timestamp of the begin of the period.
  • {END_TIMESTAMP} is the UNIX timestamp of the end of the period.