# Web Search Results (with optional page content) (`vivid_astronaut/web-search-results`) Actor

Run web searches and get structured results (rank, title, URL, snippet) — optionally with the full page content of each result as clean, LLM-ready Markdown. Built for AI agents and research pipelines.

- **URL**: https://apify.com/vivid\_astronaut/web-search-results.md
- **Developed by:** [BRAINIALL Team](https://apify.com/vivid_astronaut) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 search 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/platform/actors/running/actors-in-store#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

## Web Search Results (with optional page content) — by Brainiall

Run web searches programmatically and get **structured, ready-to-use results**: rank, title, URL and snippet for every hit. Flip one switch and the Actor also fetches each result page and returns its full content as **clean, LLM-ready Markdown** — search and content extraction in a single run.

### What it does

- **Web search** — submit one or more queries, get up to 25 ranked results each.
- **Structured output** — every result is one dataset item: `query`, `rank`, `title`, `url`, `snippet`.
- **Optional page content** — with `fetchPageContent` enabled, each result item also carries the page's full Markdown, ready for RAG chunking or agent consumption. No second tool needed.

Powered by the **Brainiall Web engine** ([api.brainiall.com](https://app.brainiall.com)) — a production web-intelligence service built for AI workloads.

### Who it's for

- **AI research agents** — give your agent real search plus real page content in one call, instead of stitching a SERP tool and a scraper together.
- **RAG pipelines** — turn a topic into fresh, clean Markdown documents automatically.
- **Market & content research** — track what ranks for your queries and what those pages actually say.
- **Lead and source discovery** — find and qualify pages at scale.

### Compliance-first by design

This Actor inherits the ethics posture of the Brainiall Web engine: **robots.txt is honored** when fetching page content, bot-detection is never bypassed, and internal/private addresses are never fetched. Clean answers for your compliance team.

### Input

```json
{
    "queries": [
        "best vector databases 2026",
        "retrieval augmented generation best practices"
    ],
    "maxResultsPerQuery": 10,
    "fetchPageContent": true
}
```

| Field | Description |
|-------|-------------|
| `queries` | Search queries to run (each result = one dataset item). |
| `maxResultsPerQuery` | Up to 25 results per query. |
| `fetchPageContent` | Also fetch each result page as clean Markdown (charged per page). |

### Output

```json
{
    "query": "best vector databases 2026",
    "rank": 1,
    "title": "Best Vector Databases in 2026: Complete Comparison Guide",
    "url": "https://example.com/articles/best-vector-databases",
    "snippet": "Compare the best vector databases in 2026: features, performance, pricing...",
    "markdown": "# Best Vector Databases in 2026\n\n..."
}
```

Export as JSON, CSV or Excel, or consume via the Apify API — ready for LangChain, LlamaIndex or any custom pipeline.

### Pricing

Pay per event, no subscriptions:

- **Search result** — each ranked result delivered.
- **Page converted** — each result page fetched as Markdown (only when `fetchPageContent` is on).

Failed queries and unfetchable pages are **never** charged.

### Tips

- Keep `fetchPageContent` off for cheap link discovery; turn it on when your pipeline needs the actual content.
- Batch related queries in one run — they execute concurrently.
- Deduplicate by `url` when queries overlap.

***

Built and maintained by [Brainiall](https://www.brainiall.com) — production AI APIs for speech, documents, vision and the web.

# Actor input Schema

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

One or more search queries to run. Each result becomes one dataset item.

## `maxResultsPerQuery` (type: `integer`):

Maximum search results returned for each query (hard cap 25).

## `fetchPageContent` (type: `boolean`):

Also fetch each result page and include its full content as clean, LLM-ready Markdown (charged separately per page). Perfect for research agents that need the actual content, not just links.

## Actor input object example

```json
{
  "queries": [
    "best vector databases 2026"
  ],
  "maxResultsPerQuery": 10,
  "fetchPageContent": false
}
```

# 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 = {
    "queries": [
        "best vector databases 2026"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vivid_astronaut/web-search-results").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 = { "queries": ["best vector databases 2026"] }

# Run the Actor and wait for it to finish
run = client.actor("vivid_astronaut/web-search-results").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "queries": [
    "best vector databases 2026"
  ]
}' |
apify call vivid_astronaut/web-search-results --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=vivid_astronaut/web-search-results",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/k2TCJ1rfGl6gI56qO/builds/ACaokxC5GRwqebj4F/openapi.json
