# Search

Use this module when you need to allow the user to search for items or simply return multiple items.

## Components

### Communication

For additional information, see our [communication](/custom-apps-documentation/component-blocks/api.md) documentation.

#### Pagination

If API supports pagination, you can implement it by using the [pagination directive](/custom-apps-documentation/component-blocks/api/pagination.md).

### Static Parameters

You can use [static parameters](/custom-apps-documentation/component-blocks/parameters.md) inside the search module without any restrictions.

### Mappable Parameters

You can use [mappable parameters](/custom-apps-documentation/component-blocks/mappable-parameters.md) inside the search module without any restrictions.

### Interface

Unlike the action module, the search module can [return multiple bundles at once](/custom-apps-documentation/component-blocks/interface.md).

### Samples

To help the users with setting up your module, provide [samples](/custom-apps-documentation/component-blocks/samples.md).

### ​Scope​

When using an OAuth type of connection, use the [scope](/custom-apps-documentation/component-blocks/scope.md) to define scopes required by this module.

### Available IML variables <a href="#available-iml-variables" id="available-iml-variables"></a>

These IML variables are available for you to use everywhere in this module:

<table><thead><tr><th width="209.5555419921875" valign="top">Variable</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>now</code></td><td valign="top">Current date and time</td></tr><tr><td valign="top"><code>environment</code></td><td valign="top">TBD</td></tr><tr><td valign="top"><code>temp</code></td><td valign="top">Contains custom variables created via the <code>temp</code> directive.</td></tr><tr><td valign="top"><code>parameters</code></td><td valign="top">Contains the module’s input parameters.</td></tr><tr><td valign="top"><code>connection</code></td><td valign="top">Contains the connection’s data collection.</td></tr><tr><td valign="top"><code>common</code></td><td valign="top">Contains the app’s common data collection.</td></tr><tr><td valign="top"><code>data</code></td><td valign="top">Contains the module’s data collection.</td></tr><tr><td valign="top"><code>scenario</code></td><td valign="top">TBD</td></tr><tr><td valign="top"><code>metadata.expect</code></td><td valign="top">Contains the module’s raw parameters array in the way you have specified it in the configuration.</td></tr><tr><td valign="top"><code>metadata.interface</code></td><td valign="top">Contains module’s raw interface array in the way you have specified it in the configuration.</td></tr></tbody></table>

Additional variables available for the response object:

<table><thead><tr><th width="140.20355224609375" valign="top">Variable</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>output</code></td><td valign="top">When using the <code>wrapper</code> directive, the <code>output</code> variable represents the result of the <code>output</code>directive.</td></tr><tr><td valign="top"><code>limit</code></td><td valign="top">When using a limit, the process of retrieving items will stop once the requested number of items has been obtained or if a page doesn't contain any items. Additionally, the module will return only the exact number of items that was specified.</td></tr><tr><td valign="top"><code>iterate</code></td><td valign="top">Iterates the array in the response into items.</td></tr></tbody></table>

Additional variables available after using the `iterate` directive, i.e. in `wrapper` or `pagination` directives:

<table><thead><tr><th width="225.66668701171875" valign="top">Variable</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>iterate.container.first</code></td><td valign="top">Represents the first item of the array you iterated.</td></tr><tr><td valign="top"><code>iterate.container.last</code></td><td valign="top">Represents the last item of the array you iterated.</td></tr></tbody></table>

Additional variables available for pagination and response objects:

<table><thead><tr><th width="149.46307373046875" valign="top">Variable</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>body</code></td><td valign="top">Contains the body that was retrieved from the last request.</td></tr><tr><td valign="top"><code>headers</code></td><td valign="top">Contains the response headers that were retrieved from the last request.</td></tr><tr><td valign="top"><code>items</code></td><td valign="top">When iterating this variable represents the current item that is being iterated.</td></tr></tbody></table>

## Example

{% tabs %}
{% tab title="Appearance" %}

<div align="left"><figure><img src="/files/dJGDYjtAhc1D0ReMrEMD" alt="" width="545"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Communication" %}

```json
{

	"url": "/api/users",
	"qs": {
		"search": "{{parameters.search}}"
		},
	"method": "GET",
	"response": {
		"output": "{{item}}",
		"iterate": "{{body.users}}",
		"limit": "{{parameters.limit}}"
	}
}
```

{% endtab %}

{% tab title="Static parameters" %}

```json
[]
```

{% endtab %}

{% tab title="Mappable parameters" %}

```json
[
	{
		"name": "search",
		"type": "text",
		"label": "Search",
		"required": true
	},
	{
		"name": "limit",
		"type": "uinteger",
		"label": "Limit",
		"help": "Maximum number of results to return and work with during one execution cycle.",
		"default": 10
	}
]
```

{% endtab %}

{% tab title="Interface" %}

```json
[
	{
		"name": "id",
		"type": "uinteger",
		"label": "User ID"
	},
	{
		"name": "email",
		"type": "email",
		"label": "Email address"
	},
	{
		"name": "name",
		"type": "text",
		"label": "Name"
	},
	{
		"name": "created",
		"type": "date",
		"label": "Date created"
	}
]
```

{% endtab %}

{% tab title="Samples" %}

```json
{
	"id": 1,
	"email": "johndoe@email.com",
	"name": "John Doe",
	"created": "2018-01-01T12:00:00.000Z"
}
```

{% endtab %}
{% endtabs %}


---

# 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://developers.make.com/custom-apps-documentation/app-components/modules/search.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.
