Rest API for Relevanssi

FREE Plugin - no suport service

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

Description

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

As far as this plugin provides API for 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 the posts of certain type. By default all types.
  • Results pagination and optional.
  • Sets X-WP-Total header with total number of records, same way as default search api does.
  • Sets X-WP-TotalPages header with total number of pages, same way as default search api does.
Rest API for Relevanssi

Features

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

Installation

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

  1. Ensure that 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. 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 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