# Desearch AI Search (`desearch/ai-search`) Actor

allows you to perform AI-powered web searches, gathering relevant information from multiple sources, including web pages, research papers, and social media discussions.

- **URL**: https://apify.com/desearch/ai-search.md
- **Developed by:** [Desearch](https://apify.com/desearch) (community)
- **Categories:** AI, Developer tools, Other
- **Stats:** 102 total users, 0 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

$22.00 / 1,000 runs

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 📢 Desearch AI Search Actor - Apify

**Effortlessly perform AI-powered searches across multiple data sources!**

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue?logo=apify)](https://apify.com)

[![Made with ❤️](https://img.shields.io/badge/Made%20with-%E2%9D%A4-red)](https://desearch.ai)

### 🚀 Overview

This Apify actor empowers you to execute AI-driven searches from [desearch.ai](https://console.desearch.ai/), gathering relevant information from diverse sources such as web pages, research papers (ArXiv), social media discussions (Twitter, Reddit), news platforms (Hacker News), and more. Leverage advanced filtering and tool selection to retrieve precisely the content you need.

### 🛠 Features

✅ **Multi-Source Search**: Search across web pages, academic papers, social media, and other curated sources.\
✅ **Flexible Tool Selection**: Enable or disable search tools like Web Search, ArXiv, Hacker News, Reddit, Wikipedia, YouTube, and Twitter based on your needs.\
✅ **Customizable Parameters**: Configure search type, query prompts, response order, and date filters.\
✅ **Streaming Response Processing**: Handle streaming API responses for efficient processing of large datasets.\
✅ **Secure & Configurable**: Use environment variables for secure API key management and tailor your requests with customizable timeouts.

### 📌 How to Use

1️⃣ **Open the Apify Actor UI**\
2️⃣ **Configure Input Parameters** in the provided schema (e.g., query prompts, search type, enabled tools and date filters)\
3️⃣ **Run the Actor** to execute your search queries\
4️⃣ **Review and Download Results** in JSON format for further analysis

### 📌 Input Parameters

| Parameter         | Type     | Required | Description |
|-------------------|----------|----------|-------------|
| `searchType`      | String   | ❌ No    | Type of search to perform. Options: `"aisearch"`, `"linksearch"`, or `"twittersearch"`. (Default: `"aisearch"`) |
| `prompt`          | Array    | ✅ Yes   | List of search queries. Each query should be a string. |
| `tools`           | Array    | ❌ No    | List of search tools to enable. Options include `"Web Search"`, `"ArXiv Search"`, `"Hacker News Search"`, `"Reddit Search"`, `"Twitter Search"`, `"Wikipedia Search"`, `"Youtube Search"`. |
| `arxivSearch`     | Boolean  | ❌ No    | Enable or disable ArXiv search (default: `true`). |
| `hackerNewsSearch`| Boolean  | ❌ No    | Enable or disable Hacker News search (default: `true`). |
| `redditSearch`    | Boolean  | ❌ No    | Enable or disable Reddit search (default: `true`). |
| `twitterSearch`   | Boolean  | ❌ No    | Enable or disable Twitter search (default: `true`). |
| `wikipediaSearch` | Boolean  | ❌ No    | Enable or disable Wikipedia search (default: `true`). |
| `youTubeSearch`   | Boolean  | ❌ No    | Enable or disable YouTube search (default: `true`). |
| `response_order`  | String   | ❌ No    | Preferred response format. Options: `"LINKS_FIRST"` or `"TEXT_FIRST"` (default: `"LINKS_FIRST"`). |
| `date_filter`     | String   | ❌ No    | Date filter for search results. Options: `"PAST_24_HOURS"`, `"PAST_WEEK"`, `"PAST_MONTH"`, `"PAST_YEAR"`, or `"ALL_TIME"` (default: `"PAST_24_HOURS"`). |
| `streaming`       | Boolean  | ❌ No    | Enable streaming response processing (default: `false`). |

***

### 📥 Expected Output

The actor outputs a **JSON file** containing the results of your search queries. Each result object includes the original prompt and the corresponding search output from the enabled tools. Below are three example output formats based on the search type:

#### 1. AI Search Output Example

This output aggregates results from multiple tools (e.g., Web Search, ArXiv Search):

```json
[
  {
    "prompt": "Latest advancements in AI research",
    "result": {
              "wikipedia_search_results": [
                {
                  "organic_results": [
                    {
                      "title": "Example Title",
                      "url": "https://example.com/",
                      "link": "https://example.com/link",
                      "snippet": "This is an example snippet from the search result.",
                      "summary_description": "This is a summary description of the search result."
                    }
                  ]
                }
              ],
              "youtube_search_results": [
                {
                  "organic_results": [
                    {
                      "title": "Example Title",
                      "url": "https://example.com/",
                      "link": "https://example.com/link",
                      "snippet": "This is an example snippet from the search result.",
                      "summary_description": "This is a summary description of the search result."
                    }
                  ]
                }
              ],
              "arxiv_search_results": [
                {
                  "organic_results": [
                    {
                      "title": "Example Title",
                      "url": "https://example.com/",
                      "link": "https://example.com/link",
                      "snippet": "This is an example snippet from the search result.",
                      "summary_description": "This is a summary description of the search result."
                    }
                  ]
                }
              ],
              "reddit_search_results": [
                {
                  "organic_results": [
                    {
                      "title": "Example Title",
                      "url": "https://example.com/",
                      "link": "https://example.com/link",
                      "snippet": "This is an example snippet from the search result.",
                      "summary_description": "This is a summary description of the search result."
                    }
                  ]
                }
              ],
              "hacker_news_search_results": [
                {
                  "organic_results": [
                    {
                      "title": "Example Title",
                      "url": "https://example.com/",
                      "link": "https://example.com/link",
                      "snippet": "This is an example snippet from the search result.",
                      "summary_description": "This is a summary description of the search result."
                    }
                  ]
                }
              ],
              "text_chunks": [
                {
                  "twitter_summary": [
                    "<string>"
                  ]
                }
              ],
              "completion_links": [
                "<string>"
              ],
              "search_completion_links": [
                "<string>"
              ],
              "completion": {
                "key_tweets": [
                  {
                    "text": "This is an example tweet text.",
                    "url": "https://twitter.com/example_tweet"
                  }
                ],
                "twitter_summary": "This is an example Twitter summary.",
                "summary": "This is an example summary."
              },
              "miner_link_scores": {}
            }
  }
]
```

#### 2. Link Search Output Example

This output emphasizes detailed link information, including positions, redirects, and display URLs:

```json
[
  {
    "prompt": "Top AI startups in 2025",
    "result": [
              {
                "youtube_search_results": {
                  "organic_results": [
                    {
                      "position": 123,
                      "title": "Example Web Page Title",
                      "link": "https://example.com/",
                      "redirect_link": "https://example.com/redirect",
                      "displayed_link": "https://example.com/displayed",
                      "favicon": "https://example.com/favicon.ico",
                      "date": "17 hours ago",
                      "snippet": "This is an example snippet from the web page.",
                      "snippet_highlighted_words": [
                        "example",
                        "snippet"
                      ],
                      "source": "On Location",
                      "inline": [
                        {
                          "link": "https://example.com/",
                          "title": "Example Web Page Title"
                        }
                      ],
                      "summary_description": "List of bitcoin companies - Wikipedia"
                    }
                  ]
                },
                "hacker_news_search_results": {
                  "organic_results": [
                    {
                      "position": 123,
                      "title": "Example Web Page Title",
                      "link": "https://example.com/",
                      "redirect_link": "https://example.com/redirect",
                      "displayed_link": "https://example.com/displayed",
                      "favicon": "https://example.com/favicon.ico",
                      "date": "17 hours ago",
                      "snippet": "This is an example snippet from the web page.",
                      "snippet_highlighted_words": [
                        "example",
                        "snippet"
                      ],
                      "source": "On Location",
                      "inline": [
                        {
                          "link": "https://example.com/",
                          "title": "Example Web Page Title"
                        }
                      ],
                      "summary_description": "List of bitcoin companies - Wikipedia"
                    }
                  ]
                },
                "reddit_search_results": {
                  "organic_results": [
                    {
                      "position": 123,
                      "title": "Example Web Page Title",
                      "link": "https://example.com/",
                      "redirect_link": "https://example.com/redirect",
                      "displayed_link": "https://example.com/displayed",
                      "favicon": "https://example.com/favicon.ico",
                      "date": "17 hours ago",
                      "snippet": "This is an example snippet from the web page.",
                      "snippet_highlighted_words": [
                        "example",
                        "snippet"
                      ],
                      "source": "On Location",
                      "inline": [
                        {
                          "link": "https://example.com/",
                          "title": "Example Web Page Title"
                        }
                      ],
                      "summary_description": "List of bitcoin companies - Wikipedia"
                    }
                  ]
                },
                "arxiv_search_results": {
                  "organic_results": [
                    {
                      "position": 123,
                      "title": "Example Web Page Title",
                      "link": "https://example.com/",
                      "redirect_link": "https://example.com/redirect",
                      "displayed_link": "https://example.com/displayed",
                      "favicon": "https://example.com/favicon.ico",
                      "date": "17 hours ago",
                      "snippet": "This is an example snippet from the web page.",
                      "snippet_highlighted_words": [
                        "example",
                        "snippet"
                      ],
                      "source": "On Location",
                      "inline": [
                        {
                          "link": "https://example.com/",
                          "title": "Example Web Page Title"
                        }
                      ],
                      "summary_description": "List of bitcoin companies - Wikipedia"
                    }
                  ]
                },
                "wikipedia_search_results": {
                  "organic_results": [
                    {
                      "position": 123,
                      "title": "Example Web Page Title",
                      "link": "https://example.com/",
                      "redirect_link": "https://example.com/redirect",
                      "displayed_link": "https://example.com/displayed",
                      "favicon": "https://example.com/favicon.ico",
                      "date": "17 hours ago",
                      "snippet": "This is an example snippet from the web page.",
                      "snippet_highlighted_words": [
                        "example",
                        "snippet"
                      ],
                      "source": "On Location",
                      "inline": [
                        {
                          "link": "https://example.com/",
                          "title": "Example Web Page Title"
                        }
                      ],
                      "summary_description": "List of bitcoin companies - Wikipedia"
                    }
                  ]
                },
                "search_results": {
                  "organic_results": [
                    {
                      "position": 123,
                      "title": "Example Web Page Title",
                      "link": "https://example.com/",
                      "redirect_link": "https://example.com/redirect",
                      "displayed_link": "https://example.com/displayed",
                      "favicon": "https://example.com/favicon.ico",
                      "date": "17 hours ago",
                      "snippet": "This is an example snippet from the web page.",
                      "snippet_highlighted_words": [
                        "example",
                        "snippet"
                      ],
                      "source": "On Location",
                      "inline": [
                        {
                          "link": "https://example.com/",
                          "title": "Example Web Page Title"
                        }
                      ],
                      "summary_description": "List of bitcoin companies - Wikipedia"
                    }
                  ]
                }
              }
      // ... additional link results if applicable
    ]
  }
]
```

#### 3. Twitter Search Output Example

This output shows a detailed tweet result, including user information and tweet metrics:

```json
[
  {
    "prompt": "Recent tweets on AI innovation",
    "result": [
              {
              "miner_tweets": [
                {
                  "user": {
                    "id": "123456789",
                    "url": "https://twitter.com/example_user",
                    "name": "John Doe",
                    "username": "johndoe",
                    "created_at": "2023-01-01T00:00:00Z",
                    "description": "This is an example user description.",
                    "favourites_count": 100,
                    "followers_count": 1500,
                    "listed_count": 10,
                    "media_count": 50,
                    "profile_image_url": "https://example.com/profile.jpg",
                    "statuses_count": 500,
                    "verified": true,
                    "is_blue_verified": true,
                    "can_dm": true,
                    "can_media_tag": true,
                    "location": "Jamaica"
                  },
                  "id": "987654321",
                  "text": "This is an example tweet.",
                  "reply_count": 10,
                  "retweet_count": 5,
                  "like_count": 100,
                  "view_count": 1000,
                  "quote_count": 2,
                  "impression_count": 1500,
                  "bookmark_count": 3,
                  "url": "https://twitter.com/example_tweet",
                  "created_at": "2023-01-01T00:00:00Z",
                  "media": [],
                  "is_quote_tweet": false,
                  "is_retweet": false,
                  "lang": "en",
                  "conversation_id": "1892717639455109181",
                  "in_reply_to_screen_name": "null",
                  "in_reply_to_status_id": "null",
                  "in_reply_to_user_id": "null",
                  "quoted_status_id": "null",
                  "quote": "null",
                  "entities": {},
                  "summary_description": "This is a summary of the tweet."
                }
              ]
            }
    ]
  }
]
```

Each output type is structured to match the specific requirements of the search query and the enabled tools, allowing you to integrate and process the results according to your project needs.

### 📈 Use Cases

💡 **Research & Development:** Gather the latest scientific research and breakthroughs in AI.\
💡 **Market Analysis:** Monitor trending topics across the web and social media platforms.\
💡 **Competitive Intelligence:** Track competitors and industry news across multiple sources.\
💡 **Content Aggregation:** Combine results from various platforms for comprehensive insights.

### 🚀 Get Started

1️⃣ **Open the Apify Actor UI**\
2️⃣ Configure your input parameters according to your search needs\
3️⃣ **Run the actor** and let it perform the AI-powered search\
4️⃣ **Download and analyze the JSON results** for actionable insights

### 🛠 Support

For questions, issues, or further documentation, please refer to the [Desearch Docs](https://docs.desearch.ai) or contact support.

***

Leverage the power of AI to quickly access the most relevant information from a variety of sources with the Desearch AI Search Actor on Apify!

# Actor input Schema

## `searchType` (type: `string`):

Select the type of search to perform.

## `prompt` (type: `string`):

The search query to be executed by Desearch AI.

## `webSearch` (type: `boolean`):

Enable Web Search

## `hackerNewsSearch` (type: `boolean`):

Enable Hacker News Search

## `redditSearch` (type: `boolean`):

Enable Reddit Search

## `wikipediaSearch` (type: `boolean`):

Enable Wikipedia Search

## `youTubeSearch` (type: `boolean`):

Enable YouTube Search

## `twitterSearch` (type: `boolean`):

Enable Twitter Search

## `arxivSearch` (type: `boolean`):

Enable ArXiv Search

## `date_filter` (type: `string`):

Filter results based on recency (only applicable for 'aisearch').

## Actor input object example

```json
{
  "searchType": "aisearch",
  "prompt": "Latest advancements in AI research",
  "webSearch": true,
  "hackerNewsSearch": true,
  "redditSearch": true,
  "wikipediaSearch": true,
  "youTubeSearch": true,
  "twitterSearch": true,
  "arxivSearch": true,
  "date_filter": "PAST_24_HOURS"
}
```

# 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 = {
    "searchType": "aisearch",
    "prompt": "Latest advancements in AI research"
};

// Run the Actor and wait for it to finish
const run = await client.actor("desearch/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 = {
    "searchType": "aisearch",
    "prompt": "Latest advancements in AI research",
}

# Run the Actor and wait for it to finish
run = client.actor("desearch/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 '{
  "searchType": "aisearch",
  "prompt": "Latest advancements in AI research"
}' |
apify call desearch/ai-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,desearch/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/loaRMZrVkktXkCV14/builds/gYLVHevA1mFjJKufB/openapi.json
