# Web Search (`desearch/web-search`) Actor

This Actor allows users to search for any information over the web. This replicates a typical search engine experience, where users can search for any information they need.

- **URL**: https://apify.com/desearch/web-search.md
- **Developed by:** [Desearch](https://apify.com/desearch) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Full permissions
- **Stats:** 379 total users, 2 monthly users, 100.0% runs succeeded, 13 bookmarks
- **User rating**: 4.22 out of 5 stars

## Pricing

$0.25 / 1,000 results

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

## Desearch Web Search

> 📢 **AI-powered web search from multiple sources – now on Apify!**

[![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

**Desearch Web Search (SERP) - Apify** is an actor that enables you to perform real-time AI-powered web searches. Powered by Desearch's intelligent search engine [Desearch.ai](https://console.desearch.ai/), it retrieves results from various online sources including **news**, **blogs**, **Twitter**, and more — all delivered in a structured JSON format.

***

### 🛠 Features

✅ AI-enhanced **web search**\
✅ Retrieves **titles**, **links**, **snippets**, and **optional dates**\
✅ Supports **pagination** with the `start` parameter\
✅ Optimized for **Apify automation**\
✅ Clean **JSON output** format

***

### 📌 Input Parameters

| Parameter | Type    | Required | Description |
|-----------|---------|----------|-------------|
| `query`   | String  | ✅ Yes    | The search term you want to query (e.g., `"latest AI tools"`) |
| `num`     | Integer | ❌ No     | Number of results to return (default: `100`, max: `100`) |
| `start`   | Integer | ❌ No     | Starting index of results (use for pagination) |

***

### 📤 Output Format

Results are returned as a JSON array like this:

```json
[
  {
    "title": "Common AI Models and When to Use Them? - GeeksforGeeks",
    "snippet": "An AI model is a computational representation or framework that is designed to perform specific tasks or functions by learning from data...",
    "link": "https://www.geeksforgeeks.org/common-ai-models-and-when-to-use-them/",
    "date": null
  },
  {
    "title": "Understanding GPT Models: A Guide - OpenAI Blog",
    "snippet": "GPT models are a type of language model developed by OpenAI that use deep learning to produce human-like text...",
    "link": "https://openai.com/blog/understanding-gpt",
    "date": "2024-12-12"
  }
]
```

***

### 📈 Use Cases

💡 **Market Research:** Discover trends and insights\
💡 **SEO & Content Strategy:** Gather article ideas and keywords\
💡 **Brand Monitoring:** Track mentions of brands or topics\
💡 **Academic Research:** Find articles and sources

***

### 🚀 Get Started

1. Open the **Apify Actor UI**
2. Enter your `query` and other parameters
3. Run the actor
4. Download results from the dataset in **structured JSON format**

***

### 🛠 Support

For documentation and help, visit [📘 Desearch Docs](https://docs.desearch.ai/guides/capabilities/web-search)\
For issues, open a ticket on [GitHub](https://github.com/your-username/desearch-web-search/issues)

***

### 🧠 Powered By

- [Desearch AI Web Search](https://desearch.ai)
- [Apify SDK](https://sdk.apify.com)
- [Node.js](https://nodejs.org)

# Actor input Schema

## `query` (type: `string`):

The search query to be executed by Datura AI.

## `num` (type: `integer`):

The number of search results to retrieve.

## `start` (type: `integer`):

The starting index for the search results.

## Actor input object example

```json
{
  "query": "Latest advancements in AI research",
  "num": 100,
  "start": 1
}
```

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

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

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

```

## MCP server setup

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