Rest API for Relevanssi

FREE Plugin

This plugin provides a simple REST API for the popular search WordPress search engine – Relevanssi.

SKU: rest-api-for-relevanssi Category: Tags: , , ,

Description

A lot of WordPress websites are using Relevanssi as a search engine that improves standard built-in searches. A far as websites may be quite complicated, consist of several independent parts REST API allows implementation of such interaction.  This plugin provides a simple REST API for the popular search WordPress search engine – Relevanssi.

As far as this plugin provides API for the Relevanssi plugin, it should be installed.

Plugin available for download from WordPress plugin directory or can be installed via standard WordPress plugin installation interface.

Key Features

  • Search through posts of a certain type. By default all types.
  • Results pagination and optional.
  • Sets X-WP-Total header with a total number of records, the same way as default search API does.
  • Sets X-WP-TotalPages header with a total number of pages, the same way as default search API does.
Rest API for Relevanssi

Features

  • Search through posts of a certain type. By default all types.
  • Results pagination and optional.
  • Sets X-WP-Total header with a total number of records, the same way as default search API does.
  • Sets X-WP-TotalPages header with a total number of pages, the same way as default search API does.
Rest API for Relevanssi

Installation

The easiest and fastest way to install the plugin is to do this from the WordPress site plugin management interface. Alternatively one can follow the steps:

  1. Ensure that the Relevanssi plugin is installed
  2. Upload the plugin files to the /wp-content/plugins/relevanssi-rest-api directory, or install the plugin through the WordPress plugins screen directly.
  3. Activate the plugin through the ‘Plugins’ screen in WordPress
  4. The plugin does not require any further configuration
Rest API for Relevanssi

Usage

  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=query
  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=query&posts_per_page=5
  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=query&posts_per_page=5&paged=2
  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=query&posts_per_page=5&paged=2&type=post

Demo website:

You can try the plugin on our demo website http://demo.erlycoder.com/demo1/. For example, you can try the following request:

http://demo.erlycoder.com/demo1/wp-json/relevanssi/v1/search?keyword=test

Rest API for Relevanssi