WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Sergiy Dzysyak v1.18

REST API for Relevanssi

The plugin provides a REST API endpoint for the Relevanssi search plugin.

REST API for Relevanssi

The facts

Rating
5★ from 3
Active installs
200+
Price
Free
Last updated
14 May 2023
Added
Sep 2018
Requires WP
4.6
Tested up to
WP 6.2.11
Requires PHP
5.6
Downloads
7,283

Our analysis

AI-assisted

The REST API for Relevanssi is a WordPress plugin that provides a simple REST API for the Relevanssi search engine. It allows you to perform searches through posts of various types, with options for pagination and filtering by taxonomy. The plugin is designed for multilingual websites, supporting both WPML and Polylang, though it has not been extensively tested for these features.

This plugin is suitable for developers or site owners who want to enhance their WordPress site's search capabilities using the Relevanssi plugin. It offers various endpoints for querying posts, filtering results, and ordering them based on specific criteria.

Best for: This plugin suits developers looking to implement advanced search features on WordPress sites using Relevanssi.

What it does well

  • Provides a REST API for Relevanssi search functionality
  • Supports pagination and taxonomy filters
  • Compatible with multilingual websites using WPML and Polylang
  • Allows ordering by meta_key, meta_value, and more

Where it falls short

  • Requires the Relevanssi plugin to be installed
  • Some features may not be fully tested or supported

Verdict

The REST API for Relevanssi offers useful functionality for enhancing search capabilities in WordPress, particularly for multilingual sites. However, its reliance on the Relevanssi plugin and potential feature limitations should be considered.

From the developer

Sergiy Dzysyak's own description of REST API for Relevanssi, lightly tidied.

This plugin provides 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.

Key features

  • Search through posts of a certain type. By default all types.
  • Results in pagination and optional.
  • Sets X-WP-Total header with a total number of records, the same way as the default search API does.
  • Sets X-WP-TotalPages header with a total number of pages, the same way as the default search API does.
  • Multilingual websites support. Both WPML and Polylang are supported, but not tested well, so let me know if you will find any problems.
  • Taxonomy filters are supported now. Some features may be missed, so feel free to report them.
  • Ordering option added. It is also possible to order by meta_key/meta_value/meta_value_num.

Brief usage examples

  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=query
  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=query&per_page=5
  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=query&per_page=5&page=2

Define post type:

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

Filter by taxonomy/taxonomies:

  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=test&tax_query[0][taxonomy]=category&tax_query[0][field]=id&tax_query[0][terms]=3
  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=test&tax_query[relation]=AND&tax_query[0][taxonomy]=category&tax_query[0][field]=id&tax_query[0][terms]=3&tax_query[1][taxonomy]=category&tax_query[1][field]=id&tax_query[1][terms]=2

Exclude category via taxonomies:

  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=test&tax_query[0][taxonomy]=category&tax_query[0][field]=id&tax_query[0][terms]=3&tax_query[0][operator]=NOT IN

For multilingual websites (WPML & Polylang):

  • https://[your domain]/wp-json/relevanssi/v1/search?keyword=query&lng=en

    • Results in order:

    https://[your domain]/wp-json/relevanssi/v1/search?keyword=test&type=post&orderby=modified&order=DESC

    Demo website

    Read the full description on the official page →

Tagged as

Alternatives

Other plugins for integrating services.

LocoAI

LocoAI

89

LocoAI - Auto Translate For Loco Translate is a powerful tool for developers looking to quickly translate thei...

Free 70k+ installs 4.9★ (637)
Uncanny Automator

The AI + Automation plugin for WordPress. Automate workflows across all your plugins and apps, add an AI agent...

Free 40k+ installs 4.9★ (156)
Open User Map

Create custom interactive maps with free Leaflet-based styles, no Google Maps API key, frontend marker submiss...

Free 10k+ installs 5★ (67)
Activity Log

Monitor every change on your WordPress site — who did what, when, and where it came from — for a complete audi...

Free 200k+ installs 4.3★ (74)
Reviews Feed

No API key required. Display Yelp and Google reviews for any business in a clean, customizable feed on your si...

Free 100k+ installs 4.4★ (34)
Bit integrations

Contact Form, Google Sheet, MailChimp, Brevo, Webhook, Zoho CRM Automation and Integration plugin that Connect...

Free 20k+ installs 4.9★ (160)