> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Search Web

- Component: `appmixer.tavily.core.FindSearchResults`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.tavily 1.0.2](https://connectors.appmixer.com/connector/appmixer.tavily/1.0.2.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.tavily/1.0.2/component/appmixer.tavily.core.FindSearchResults>

Run a real-time web search with Tavily and return the matching results. Returns a maximum of 20 results per call.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Query (`query`) | text | The search query to run. Maximum 400 characters. |
| Search Depth (`searchDepth`) | select | **Basic** costs 1 API credit per search, **Advanced** costs 2 but retrieves more relevant content. |
| Topic (`topic`) | select | The category of the search. **News** returns recent articles with a published date, **Finance** targets financial sources. |
| Max Results (`maxResults`) | number | Maximum number of search results to return, between 1 and 20. |
| Time Range (`timeRange`) | select | Only return results published within this time range. Leave empty for no time filter. |
| Start Date (`startDate`) | date-time | Only return results published on or after this date. |
| End Date (`endDate`) | date-time | Only return results published on or before this date. |
| Include Domains (`includeDomains`) | text | Comma separated list of domains to restrict the search to, e.g. `wikipedia.org, bbc.co.uk`. Maximum 300 domains. |
| Exclude Domains (`excludeDomains`) | text | Comma separated list of domains to exclude from the search. Maximum 150 domains. |
| Include Raw Content (`includeRawContent`) | select | Also return the full cleaned page content of each result, in the chosen format. |
| Include Favicon (`includeFavicon`) | toggle | Also return the favicon URL of each result. |
| Country (`country`) | text | Boost results from a specific country, e.g. `united states`. Only applies when Topic is **General**. |
| Output Type (`outputType`) | select | Choose whether you want to receive the result set as one complete list, or first item only or one item at a time or stream the items to a file. |

## Output ports

### Port `out`

Variables are loaded dynamically from `/component/appmixer/tavily/core/FindSearchResults?outPort=out&ignoreAuth=true`.

### Port `notFound`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.tavily.core.FindSearchResults",
  "label": "Search Web",
  "description": "Run a real-time web search with Tavily and return the matching results. Returns a maximum of 20 results per call.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:tavily"
  },
  "quota": {
    "manager": "appmixer:tavily",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 400
          },
          "searchDepth": {
            "type": "string"
          },
          "topic": {
            "type": "string"
          },
          "maxResults": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20
          },
          "timeRange": {
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date"
          },
          "includeDomains": {
            "type": "string"
          },
          "excludeDomains": {
            "type": "string"
          },
          "includeRawContent": {
            "type": "string"
          },
          "includeFavicon": {
            "type": "boolean"
          },
          "country": {
            "type": "string"
          },
          "outputType": {
            "type": "string"
          }
        },
        "required": [
          "query"
        ]
      },
      "inspector": {
        "inputs": {
          "query": {
            "type": "text",
            "index": 1,
            "label": "Query",
            "tooltip": "The search query to run. Maximum 400 characters."
          },
          "searchDepth": {
            "type": "select",
            "index": 2,
            "label": "Search Depth",
            "defaultValue": "basic",
            "tooltip": "<b>Basic</b> costs 1 API credit per search, <b>Advanced</b> costs 2 but retrieves more relevant content.",
            "options": [
              {
                "label": "Basic",
                "value": "basic"
              },
              {
                "label": "Advanced",
                "value": "advanced"
              }
            ]
          },
          "topic": {
            "type": "select",
            "index": 3,
            "label": "Topic",
            "defaultValue": "general",
            "tooltip": "The category of the search. <b>News</b> returns recent articles with a published date, <b>Finance</b> targets financial sources.",
            "options": [
              {
                "label": "General",
                "value": "general"
              },
              {
                "label": "News",
                "value": "news"
              },
              {
                "label": "Finance",
                "value": "finance"
              }
            ]
          },
          "maxResults": {
            "type": "number",
            "index": 4,
            "label": "Max Results",
            "defaultValue": 5,
            "tooltip": "Maximum number of search results to return, between 1 and 20."
          },
          "timeRange": {
            "type": "select",
            "index": 5,
            "label": "Time Range",
            "tooltip": "Only return results published within this time range. Leave empty for no time filter.",
            "options": [
              {
                "label": "Past day",
                "value": "day"
              },
              {
                "label": "Past week",
                "value": "week"
              },
              {
                "label": "Past month",
                "value": "month"
              },
              {
                "label": "Past year",
                "value": "year"
              }
            ]
          },
          "startDate": {
            "type": "date-time",
            "index": 6,
            "label": "Start Date",
            "config": {
              "enableTime": false
            },
            "tooltip": "Only return results published on or after this date."
          },
          "endDate": {
            "type": "date-time",
            "index": 7,
            "label": "End Date",
            "config": {
              "enableTime": false
            },
            "tooltip": "Only return results published on or before this date."
          },
          "includeDomains": {
            "type": "text",
            "index": 8,
            "label": "Include Domains",
            "tooltip": "Comma separated list of domains to restrict the search to, e.g. <code>wikipedia.org, bbc.co.uk</code>. Maximum 300 domains."
          },
          "excludeDomains": {
            "type": "text",
            "index": 9,
            "label": "Exclude Domains",
            "tooltip": "Comma separated list of domains to exclude from the search. Maximum 150 domains."
          },
          "includeRawContent": {
            "type": "select",
            "index": 10,
            "label": "Include Raw Content",
            "tooltip": "Also return the full cleaned page content of each result, in the chosen format.",
            "options": [
              {
                "label": "No",
                "value": ""
              },
              {
                "label": "Markdown",
                "value": "markdown"
              },
              {
                "label": "Plain text",
                "value": "text"
              }
            ]
          },
          "includeFavicon": {
            "type": "toggle",
            "index": 11,
            "label": "Include Favicon",
            "tooltip": "Also return the favicon URL of each result."
          },
          "country": {
            "type": "text",
            "index": 12,
            "label": "Country",
            "tooltip": "Boost results from a specific country, e.g. <code>united states</code>. Only applies when Topic is <b>General</b>."
          },
          "outputType": {
            "type": "select",
            "label": "Output Type",
            "index": 13,
            "defaultValue": "array",
            "tooltip": "Choose whether you want to receive the result set as one complete list, or first item only or one item at a time or stream the items to a file.",
            "options": [
              {
                "label": "First Item Only",
                "value": "first"
              },
              {
                "label": "All items at once",
                "value": "array"
              },
              {
                "label": "One item at a time",
                "value": "object"
              },
              {
                "label": "Store to CSV file",
                "value": "file"
              }
            ]
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "source": {
        "url": "/component/appmixer/tavily/core/FindSearchResults?outPort=out&ignoreAuth=true",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/outputType": "inputs/in/outputType",
            "in/query": "dummy"
          }
        }
      }
    },
    {
      "name": "notFound"
    }
  ],
  "icon": "(data URI omitted)"
}
```
