# Tavily Alternative – AI Search Engine for LLMs & Agents (`trysmartapi/tavily-alternative-ai-search`) Actor

Tavily-compatible AI search engine for RAG, agents and LLM apps. Ranked results with relevance scores, an optional answer, raw page content and extract, the same response as Tavily, cheaper.

- **URL**: https://apify.com/trysmartapi/tavily-alternative-ai-search.md
- **Developed by:** [Smart API](https://apify.com/trysmartapi) (community)
- **Categories:** AI, Developer tools
- **Security:** Limited permissions
- **Stats:** 100 total users, 99 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.99 / 1,000 tavily-equivalent credits

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Tavily Alternative – AI Search Engine for LLMs & Agents

> **Tavily-compatible AI web search for RAG and AI agents at $3.99 per 1,000 credits, half of Tavily's own price. Ranked results, relevance scores, an optional LLM answer and full page content, with no Tavily account needed.**

This **Tavily alternative** is a search engine built for **LLMs, RAG pipelines and AI agents**. Each query returns **ranked, cleaned results with relevance scores**, and optionally a **ready-made answer** and the **full page content**, in **the same response format as Tavily's `/search` and `/extract` APIs**.

- ✅ **$3.99 per 1,000 credits.** Tavily charges $7.50–$8.00.
- ✅ **Tavily response format**: `answer`, `results[]` with `url`, `title`, `content`, `score` and `raw_content`.
- ✅ **Search and Extract** in one Actor.
- ✅ **Tavily options**: `search_depth`, `topic` (general, news, finance), `max_results`, `include_answer`, `include_raw_content`, `time_range` and domain filters.
- ✅ **No charge for failures.** Failed queries and URLs come back as `#error` rows and are not charged.
- ✅ **Works with LangChain, LlamaIndex, CrewAI, n8n and Make** through the Apify integrations or API.

***

### How much cheaper is it?

Price per 1,000 credits (1 credit = 1 basic search), as published on 2026-10-30:

| Option | Per 1,000 credits |
|---|---|
| **This Actor** | **$3.99** |
| Tavily pay-as-you-go | $8.00 |
| Tavily Project plan ($30 / 4,000 credits) | $7.50 |
| AI Search (Apify Store) | $22.00 per 1,000 runs |

Sources: [tavily.com/pricing](https://www.tavily.com/pricing), [Tavily API credits](https://docs.tavily.com/documentation/api-credits) and the Apify Store, read on 2026-10-30. There's no subscription and no minimum.

#### What counts as a credit (same rules as Tavily)

| Request | Credits |
|---|---|
| Basic search | 1 |
| Advanced search | 2 |
| Extract, basic: every 5 successful URLs | 1 |
| Extract, advanced: every 5 successful URLs | 2 |
| `include_answer`, `include_raw_content`, `topic`, `time_range` | no extra charge |

***

### Quick start

1. Keep **Search** selected and type one question or query per line.
2. Optionally turn on **Include an answer** or **Include page content**.
3. Click **Start**. Each query becomes one row in the **Output** tab.

For **Extract**, switch the task to Extract and paste URLs.

#### Examples

```json
{ "mode": "search", "queries": ["what is retrieval augmented generation"], "include_answer": "basic", "max_results": 5 }
```

```json
{ "mode": "search", "queries": ["nvidia earnings"], "topic": "news", "time_range": "week", "search_depth": "advanced" }
```

```json
{ "mode": "extract", "urls": ["https://en.wikipedia.org/wiki/Large_language_model"], "extract_depth": "basic" }
```

#### Input reference

| Field | Description |
|---|---|
| `mode` | `search` (default) or `extract` |
| `queries` | Search: one query per item |
| `urls` | Extract: one URL per item, sent in batches of 20 |
| `search_depth` | `basic` (1 credit) or `advanced` (2 credits) |
| `topic` | `general`, `news` or `finance` |
| `max_results` | 1–20 results per query (default 5) |
| `include_answer` | `false`, `basic` or `advanced` |
| `include_raw_content` | Add the cleaned full page content to each result |
| `time_range` | `day`, `week`, `month` or `year` |
| `include_domains` / `exclude_domains` | Domain filters |
| `extract_depth` | `basic` or `advanced` |
| `extraParams` | Any other Tavily search parameter, e.g. `{"country": "united states"}` |

***

### Output

**Search** gives one row per query, in Tavily's layout plus `query` and `requestId`:

```json
{
    "query": "what is retrieval augmented generation",
    "answer": "Retrieval augmented generation (RAG) combines a search step with an LLM…",
    "results": [
        {
            "url": "https://example.com/rag-explained",
            "title": "RAG explained",
            "content": "Retrieval-augmented generation is a technique…",
            "score": 0.92
        }
    ],
    "response_time": 1.2,
    "requestId": "6721c0e5b3f1a2c4d5e6f708"
}
```

**Extract** gives one row per URL with `url` and `raw_content` (plus `images` when available).

What differs from Tavily: Tavily's own `request_id` and `usage` fields are not included. Use `requestId` instead.

***

### Migrating from Tavily

Your request body maps one to one. Instead of

```bash
curl -X POST https://api.tavily.com/search -H "Authorization: Bearer tvly-YOUR_KEY" \
  -d '{"query": "rag", "search_depth": "advanced", "include_answer": true}'
```

run the Actor with `{"queries": ["rag"], "search_depth": "advanced", "include_answer": "basic"}`.

#### Python (LangChain / agents)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

def web_search(query: str) -> list[dict]:
    run = client.actor("trysmartapi/tavily-alternative-ai-search").call(
        run_input={"queries": [query], "max_results": 5, "include_answer": "basic"}
    )
    item = next(client.dataset(run["defaultDatasetId"]).iterate_items())
    return item["results"]
```

#### JavaScript

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('trysmartapi/tavily-alternative-ai-search').call({ queries: ['what is rag'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].results);
```

#### One HTTP call

```bash
curl -X POST "https://api.apify.com/v2/acts/trysmartapi~tavily-alternative-ai-search/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"queries": ["what is rag"], "include_answer": "basic"}'
```

***

### Errors, retries and what you pay for

- **Temporary problems** (busy service, timeouts, rate limits) are retried automatically with backoff.
- **A query or URL that fails** becomes an `#error` row, and the rest of the run continues.
- **You pay only for successful searches and extracted URLs.**
- **Maximum charge per run:** if you set one in Apify, it is respected and the run stops cleanly when reached.
- **Run status** summarises the outcome. The full summary is saved as `OUTPUT` in the key-value store.

### FAQ

**Is this the official Tavily Actor?**
No. It is an independent alternative with a Tavily-compatible request and response format.

**Do I need a Tavily API key?**
No.

**Is the answer free?**
Yes. `include_answer` and `include_raw_content` cost nothing extra, as with Tavily.

***

*Not affiliated with Tavily; the name is used only to describe compatibility.*

# Actor input Schema

## `mode` (type: `string`):

Search uses **Search queries**; extract uses **URLs**.

## `queries` (type: `array`):

For search. One question or query per line.

## `urls` (type: `array`):

For extract. One URL per line (sent in batches of 20).

## `search_depth` (type: `string`):

Same as Tavily search_depth.

## `topic` (type: `string`):

Search category.

## `max_results` (type: `integer`):

Results per query (1–20). Does not change the price.

## `include_answer` (type: `string`):

Adds an AI-generated answer to each query, as Tavily include_answer. No extra charge.

## `include_raw_content` (type: `boolean`):

Adds the cleaned full content of each result (raw_content). No extra charge.

## `time_range` (type: `string`):

Only results from this period.

## `include_domains` (type: `array`):

e.g. arxiv.org

## `exclude_domains` (type: `array`):

e.g. pinterest.com

## `extract_depth` (type: `string`):

Same as Tavily extract_depth.

## `extraParams` (type: `object`):

Any other Tavily search parameter, e.g. {"country": "united states", "include_images": true}.

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "latest developments in retrieval augmented generation"
  ],
  "search_depth": "basic",
  "topic": "general",
  "max_results": 5,
  "include_answer": "false",
  "include_raw_content": false,
  "extract_depth": "basic"
}
```

# Actor output Schema

## `results` (type: `string`):

One row per query with Tavily's response (answer, ranked results with scores, optional raw content), or one row per extracted URL. Failures are rows with #error: true and are not charged. Export as JSON, CSV, Excel or XML.

## `runSummary` (type: `string`):

succeeded, failed and unprocessed item counts, stoppedReason (null, budget, capacity or fatal) and charged events.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "search",
    "queries": [
        "latest developments in retrieval augmented generation"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("trysmartapi/tavily-alternative-ai-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "search",
    "queries": ["latest developments in retrieval augmented generation"],
}

# Run the Actor and wait for it to finish
run = client.actor("trysmartapi/tavily-alternative-ai-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "search",
  "queries": [
    "latest developments in retrieval augmented generation"
  ]
}' |
apify call trysmartapi/tavily-alternative-ai-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,trysmartapi/tavily-alternative-ai-search"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/NwzhdtuXBgWd9FygN/builds/R9KKKPJAB3tFdx1cV/openapi.json
