# Algolia

The **Algolia Node** in Stack AI allows you to search your Algolia index using natural language or semantic queries. This integration is ideal for retrieving relevant data, documents, or records from your Algolia-powered search infrastructure directly within your AI workflows.

***

## How to use it?

Add the Algolia node to your Stack AI workflow to execute search queries against your Algolia index. Connect an input node or LLM node to provide the search query, and use the results in downstream nodes for further processing or display.

***

## Example of Usage

Suppose you want to search for documentation related to "API authentication" in your Algolia index. You would connect an input node (where the user types their query) to the Algolia node, and the Algolia node will return the most relevant results.

***

## Available Actions

### 1. Database Query (Algolia Search)

**Description:**\
Executes a search query against your Algolia index and returns matching results.

***

#### Inputs

| Name  | Type   | Required | Description                                            | Example                                                                             |
| ----- | ------ | -------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| Query | String | Yes      | The search query to execute against the Algolia index. | "how to implement authentication" ,, "database optimization" ,, "api documentation" |

Showing 1-1 of 1 items

**Example Input:**

```json
{
  "query": "api documentation"
}
```

***

#### Configurations

There are no additional configuration parameters required for the Algolia Database Query action. All you need is the search query input.

***

#### Outputs

| Name    | Type   | Required | Description                                     | Example                                           |
| ------- | ------ | -------- | ----------------------------------------------- | ------------------------------------------------- |
| Results | String | Yes      | The search results from Algolia in JSON format. | '\[{"title": "API Docs", "url": "https\://..."}]' |

Showing 1-1 of 1 items

**Example Output:**

```json
{
  "results": [
    {
      "title": "API Docs",
      "url": "https://docs.example.com/api"
    },
    {
      "title": "Authentication Guide",
      "url": "https://docs.example.com/auth"
    }
  ]
}

```

***

## Summary Table

| Action Name    | Required Inputs | Configurations | Outputs                |
| -------------- | --------------- | -------------- | ---------------------- |
| Database Query | Query (string)  | None           | Results (string, JSON) |


---

# 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://docs.stackai.com/workflow-builder/apps/algolia.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.
