Title: REST API for Relevanssi
Author: Sergiy Dzysyak
Published: <strong>12 de septiembre de 2018</strong>
Last modified: 14 de mayo de 2023

---

Buscar plugins

Este plugin **no se ha probado con las últimas 3 versiones mayores de WordPress**.
Puede que ya no tenga soporte ni lo mantenga nadie, o puede que tenga problemas 
de compatibilidad cuando se usa con las versiones más recientes de WordPress.

![](https://ps.w.org/rest-api-for-relevanssi/assets/icon-256x256.png?rev=2370302)

# REST API for Relevanssi

 Por [Sergiy Dzysyak](https://profiles.wordpress.org/dzysyak/)

[Descargar](https://downloads.wordpress.org/plugin/rest-api-for-relevanssi.zip)

 * [Detalles](https://es.wordpress.org/plugins/rest-api-for-relevanssi/#description)
 * [Valoraciones](https://es.wordpress.org/plugins/rest-api-for-relevanssi/#reviews)
 *  [Instalación](https://es.wordpress.org/plugins/rest-api-for-relevanssi/#installation)
 * [Desarrollo](https://es.wordpress.org/plugins/rest-api-for-relevanssi/#developers)

 [Soporte](https://wordpress.org/support/plugin/rest-api-for-relevanssi/)

## Descripción

This plugin provides simple REST API for the popular search [WordPress](https://wordpress.org/)
search engine – [Relevanssi](https://wordpress.org/plugins/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
 * https://[your domain]/wp-json/relevanssi/v1/search?keyword=test&type=post&orderby
   =modified&order=ASC
 * https://[your domain]/wp-json/relevanssi/v1/search?keyword=test&type=post&meta_key
   =some_key&orderby=meta_value|meta_value_num&order=ASC

**Demo website**

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

_Basic:_
 [http://demo.erlycoder.com/demo1/wp-json/relevanssi/v1/search?keyword=test](http://demo.erlycoder.com/demo1/wp-json/relevanssi/v1/search?keyword=test)

_Order posts by modification time:_
 [http://demo.erlycoder.com/demo1/wp-json/relevanssi/v1/search?keyword=test&type=post&orderby=modified&order=DESC](http://demo.erlycoder.com/demo1/wp-json/relevanssi/v1/search?keyword=test&type=post&orderby=modified&order=DESC)
[http://demo.erlycoder.com/demo1/wp-json/relevanssi/v1/search?keyword=test&type=post&orderby=modified&order=ASC](http://demo.erlycoder.com/demo1/wp-json/relevanssi/v1/search?keyword=test&type=post&orderby=modified&order=ASC)

_Filter posts by taxonomy (one single category):_
 [http://demo.erlycoder.com/demo1/wp-json/relevanssi/v1/search?keyword=test&tax_query[0][taxonomy]=category&tax_query[0][field]=id&tax_query[0][terms]=3](http://demo.erlycoder.com/demo1/wp-json/relevanssi/v1/search?keyword=test&tax_query[0][taxonomy]=category&tax_query[0][field]=id&tax_query[0][terms]=3)

_Filter posts by taxonomy (exclude category):_
 [http://demo.erlycoder.com/demo1/
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](http://demo.erlycoder.
com/demo1/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)

## Instalación

 1. Ensure that [Relevanssi](https://wordpress.org/plugins/relevanssi/) plugin is installed
 2. Sign in to the admin area of your WordPress website.
 3. Go to the “Plugins” section.
 4. Click “Add new” and search for “REST API for Relevanssi”.
 5. Install the plugin.

Alternative way #1

 1. Ensure that [Relevanssi](https://wordpress.org/plugins/relevanssi/) plugin is installed
 2. Download [REST API for Relevanssi](https://wordpress.org/plugins/rest-api-for-relevanssi/)
    plugin from the WordPress plugin diretcory.
 3. Go to Plugins > Add New > Upload and select the ZIP file you just downloaded. Click
    Install Now, and then Activate.
 4. Activate the plugin through the ‘Plugins’ screen in WordPress
 5. Plugin does not require any further configuration

Alternative way #2

 1. Ensure that [Relevanssi](https://wordpress.org/plugins/relevanssi/) plugin is installed
 2. Download [REST API for Relevanssi](https://wordpress.org/plugins/rest-api-for-relevanssi/)
    plugin from the WordPress plugin diretcory.
 3. Upload the plugin files to the `/wp-content/plugins/rest-api-for-relevanssi` directory,
    or install the plugin through the WordPress plugins screen directly.
 4. Activate the plugin through the ‘Plugins’ screen in WordPress
 5. Plugin does not require any further configuration

## FAQ

### Knowledge base

You can find answers and solutions in our [Knowledge base](https://erlycoder.com/knowledgebase_category/relevanssi-rest-api/).

### Can I suggest a feature or report a bug?

Yes, you can submit your request on our [Contact page](https://erlycoder.com/support/).

## Reseñas

![](https://secure.gravatar.com/avatar/832e2fbad7804f57086715e6612130304ce0e41d288ae5da95464278d3ade45e?
s=60&d=retro&r=g)

### 󠀁[Works well](https://wordpress.org/support/topic/works-well-2767/)󠁿

 [Maxime33](https://profiles.wordpress.org/maxime33/) 29 de mayo de 2023

Great plugin, great support!

![](https://secure.gravatar.com/avatar/2eb01c532d88a9e57ae05a2b145a2e5a574a93b0b477c2e11fc37c57d99e47df?
s=60&d=retro&r=g)

### 󠀁[Clean, light and straight to the point](https://wordpress.org/support/topic/clean-light-and-straight-to-the-point/)󠁿

 [Laxus Mcfury](https://profiles.wordpress.org/laxusmcfury/) 16 de abril de 2022
1 respuesta

This plugin helped me a lot with my Rest API based live search, i really appreciate
it!

![](https://secure.gravatar.com/avatar/917592606772e84640ecb9ed7b6285f5bea9dfd8e7043068cbdf410fd6c44966?
s=60&d=retro&r=g)

### 󠀁[Nice and simple plugin](https://wordpress.org/support/topic/nice-and-simple-plugin-22/)󠁿

 [mkhaledche](https://profiles.wordpress.org/mkhaledche/) 8 de septiembre de 2020

Thank you

 [ Leer todas las 3 reseñas ](https://wordpress.org/support/plugin/rest-api-for-relevanssi/reviews/)

## Colaboradores y desarrolladores

«REST API for Relevanssi» es un software de código abierto. Las siguientes personas
han colaborado con este plugin.

Colaboradores

 *   [ Sergiy Dzysyak ](https://profiles.wordpress.org/dzysyak/)

[Traduce «REST API for Relevanssi» a tu idioma.](https://translate.wordpress.org/projects/wp-plugins/rest-api-for-relevanssi)

### ¿Interesado en el desarrollo?

[Revisa el código](https://plugins.trac.wordpress.org/browser/rest-api-for-relevanssi/),
echa un vistazo al [repositorio SVN](https://plugins.svn.wordpress.org/rest-api-for-relevanssi/)
o suscríbete al [registro de desarrollo](https://plugins.trac.wordpress.org/log/rest-api-for-relevanssi/)
por [RSS](https://plugins.trac.wordpress.org/log/rest-api-for-relevanssi/?limit=100&mode=stop_on_copy&format=rss).

## Registro de cambios

#### 1.18

 * Advanced Custom Fields plugin support is improved

#### 1.17

 * Taxonomy index bug fix.

#### 1.16

 * «No content found» error is changed to an empty result. This seems to be the 
   proper response. Feel free to complain via [Contact page](https://erlycoder.com/support/),
   if you do not agree.
 * Error messages are updated for cases where the search keyword is not provided
   or the target language does not exist (for Polylang).
 * WP compatibility update

#### 1.15

 * Error messages fix.

#### 1.14

 * Minor fix in handling post types.
 * WPML & Polylang compatibility fixes.

#### 1.12

 * Minor fix in handling post types.

#### 1.11

 * Fixed issues with type=any parameter.
 * Fixed issues with multitype requests (Example: type=post,page).
 * Default search type is changed to ‘any’. Be careful updating the plugin.

#### 1.10

 * Fixed bug «Call to undefined function is_plugin_active()».

#### 1.9

 * We decided to remove the strict requirement for the Relevanssi plugin to be installed
   before the API plugin. Instead, API will return an error if Relevanssi is not
   installed.

#### 1.8

 * Added «page» and «per_page» parameters. Old ones «page» and «per_page» are still
   supported, but we strongly recommend to to use new ones.

#### 1.7

 * Maintenance release.

#### 1.6

 * Fixed taxonomy requests.
 * One more example added

#### 1.5

 * Multilingual websites support (WPML & Polylang).
 * Taxonomy filters.
 * Search results ordering.

#### 1.0

 * Release

## Meta

 *  Versión **1.18**
 *  Última actualización **hace 3 años**
 *  Instalaciones activas **200+**
 *  Versión de WordPress ** 4.6 o superior **
 *  Probado hasta **6.2.14**
 *  Versión de PHP ** 5.6 o superior **
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/rest-api-for-relevanssi/)
 * Etiquetas:
 * [api](https://es.wordpress.org/plugins/tags/api/)[Relevanssi](https://es.wordpress.org/plugins/tags/relevanssi/)
   [rest-api](https://es.wordpress.org/plugins/tags/rest-api/)[search](https://es.wordpress.org/plugins/tags/search/)
 *  [Vista avanzada](https://es.wordpress.org/plugins/rest-api-for-relevanssi/advanced/)

## Valoraciones

 5 de 5 estrellas.

 *  [  3 valoraciones de 5 estrellas     ](https://wordpress.org/support/plugin/rest-api-for-relevanssi/reviews/?filter=5)
 *  [  0 valoraciones de 4 estrellas     ](https://wordpress.org/support/plugin/rest-api-for-relevanssi/reviews/?filter=4)
 *  [  0 valoraciones de 3 estrellas     ](https://wordpress.org/support/plugin/rest-api-for-relevanssi/reviews/?filter=3)
 *  [  0 valoraciones de 2 estrellas     ](https://wordpress.org/support/plugin/rest-api-for-relevanssi/reviews/?filter=2)
 *  [  0 valoraciones de 1 estrellas     ](https://wordpress.org/support/plugin/rest-api-for-relevanssi/reviews/?filter=1)

[Tu valoración](https://wordpress.org/support/plugin/rest-api-for-relevanssi/reviews/#new-post)

[Ver todas las reseñas](https://wordpress.org/support/plugin/rest-api-for-relevanssi/reviews/)

## Colaboradores

 *   [ Sergiy Dzysyak ](https://profiles.wordpress.org/dzysyak/)

## Soporte

¿Tienes algo que decir? ¿Necesitas ayuda?

 [Ver el foro de soporte](https://wordpress.org/support/plugin/rest-api-for-relevanssi/)