# Wordpress Search Action

This action will use the standard Wordpress search API to search for different terms and display the results as chat text or as a carousel.

![](/files/-LhLp4T1sF1i15vawodj)

### Settings

The action uses the following settings:

| Setting           | Description                                                                  | [Parsed](/actions-and-operations/dynamic-parsing.md) |
| ----------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------- |
| Base URL          | The base url of your Wordpress website. Like <https://www.mysite.com>.       | :white\_check\_mark:                                 |
| Consumer Key      | If required by your Wordpress configuration, paste here the consumer key.    | :white\_check\_mark:                                 |
| Consumer Secret   | If required by your Wordpress configuration, paste here the consumer secret. | :white\_check\_mark:                                 |
| Search Terms      | The terms you want to use to search your website                             | :white\_check\_mark:                                 |
| No Results Text   | The text you wish to display whenever the search yields no results           | :white\_check\_mark:                                 |
| Max Results Count | The maximum number of items to be returned by the search                     | :white\_check\_mark:                                 |
| Display Mode      | The action used by Xenioo to render the search results.                      | :no\_entry:                                          |

### Remarks

By default a Wordpress website may not have standard REST API enabled for searching. If you use this action on a website without REST API, it will fail.

Depending on your Wordpress version REST API enabling steps may vary. [This guide can help you](https://developer.wordpress.org/rest-api/) in setting up and configure your Wordpress website for search.

### Trigger

This action does not trigger any event.

### Variables

This action produces the following variables:

| Variable          | Description                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------------ |
| wp\_search\_count | The total number of items found. The number may be lower but never higher than Max Results Count |

### Availability

Channel specific availability follows the table below:

| Channel          | Availability     |
| ---------------- | ---------------- |
| Facebook         | Fully Available. |
| WhatsApp         | Fully Available. |
| Telegram         | Fully Available. |
| Web              | Fully Available. |
| Alexa            | Fully Available. |
| Google Assistant | Fully Available. |
| Slack            | Fully Available. |
| API              | Fully Available. |

This action can be used only inside interactions and not as child of other actions. This action requires a [Premium Account](/basic-concepts/your-account/upgrading-from-free.md) to be used on a live chatbot.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs10.xenioo.com/actions-and-operations/integration/xenioo.bots.actions.base.integrations.wordpresssearchaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
