# tools.search

Canonical URL: https://developers.iagenify.com/sdk/workflows/steps/tools-search/
Language: en

`type: "tools.search"`

A SearXNG web search inside a chain. Titles, URLs and snippets come from the configured index; upstream availability limits the number of results.

Status: 1 credit · query required · cached for a day

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `query` | string | required | What to look for. Usually a template. |
| `action` | object | search | Choose `search`, `keyword_research`, `site_discovery`, `seo_audit`, or `competitor_gap`. |
| `maxResults` | integer | 10 | Requested ceiling up to 10000; the index may return fewer. |
| `page` | integer | 1 | SearXNG result page, starting at 1. |
| `recencyDays` | integer |  | Only recent material. |

```javascript
{ id: "find", type: "tools.search", config: {
    query: "{{input.topic}} release notes", recencyDays: 7, maxResults: 5 } }
```

## Output {#output}

```javascript
{{steps.find.output.results}}        // [{ title, url, snippet, score }]
{{steps.find.output.action}}              // "search"
{{steps.find.output.creditsUsed}}
```

## No result is a success, not a failure {#empty}

> **An empty list does not fail the step**
>
> Nothing is charged, and the chain continues with an empty array. A step after it that assumes a first result will fail instead — put a condition on results between them.

```javascript
{ id: "found", type: "condition", config: {
    left: "{{steps.find.output.results}}", operator: "empty" } }
```

## What usually follows {#then}

[tools.fetch](/sdk/workflows/steps/tools-fetch) on one of the URLs, then a model step on what it read.

- [tools.fetch](/sdk/workflows/steps/tools-fetch): Opening a result.
- [api.tools.search()](/sdk/ref/tools/search): The full surface.
- [Workflow steps](/sdk/workflows/steps): The 23 types.

```python
{"id": "find", "type": "tools.search", "config": {
    "query": "{{input.topic}} release notes", "recencyDays": 7, "maxResults": 5}}
```

```python
"{{steps.find.output.results}}"        # [{"title", "url", "snippet", "engine", "score"}]
"{{steps.find.output.enginesUsed}}"
"{{steps.find.output.creditsUsed}}"
```

```python
{"id": "found", "type": "condition", "config": {
    "left": "{{steps.find.output.results}}", "operator": "empty"}}
```
