# Web Search API for AI Agents: Results & Markdown, $1/1K (`laptime/web-search`) Actor

$1 per 1,000 searches, empty searches free. Results in under a second per query (median, 30 Nov 2026). No API key. Bing web results with title, URL, snippet, position and date, Bing News and Wikipedia filling in, top pages as Markdown. Search tool for AI agents, MCP, RAG, SEO.

- **URL**: https://apify.com/laptime/web-search.md
- **Developed by:** [Laptime](https://apify.com/laptime) (community)
- **Categories:** AI, Agents, Developer tools
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.65 / 1,000 searches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/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

<p><strong>From Laptime.</strong> We benchmark our scrapers on Apify and date the results, and an automated check runs this Actor's example input every morning.</p>

> **Update, 30 November 2026:** first version. Web search results as JSON for AI agents and apps, with free status rows for queries that find nothing.

### Why choose Web Search?

<ul>
<li><strong>It is a web search API priced for agents that search all day.</strong> 1,000 searches cost $1, and a search that finds nothing is free. On the Apify Free plan that is a fifth of the price of the leading web search Actor we checked (30 Nov 2026).</li>
<li><strong>Every result has a real URL, a title and a snippet.</strong> 94% of our 34 test queries returned 5 or more results that match the whole query (median of three runs on Apify, 30 Nov 2026).</li>
<li><strong>It answers in seconds and can read the pages too.</strong> One query took 0.9 seconds inside the run on 30 Nov 2026, and with Read top pages the best results come back as clean Markdown in the same call.</li>
</ul>

### Try it with one query

[![How to use Web Search without coding: 1. Try for free 2. Type a search + Start 3. Ranked results with real URLs 4. Export the Results view to Excel](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-web-search-steps.jpg?v=2f834810)](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-web-search-steps.jpg?v=2f834810)

No code needed: click **Try for free**, keep the example input, click **Start**, then export to Excel. Or paste this into the **JSON** tab of the input:

```json
{
  "query": "openai api pricing"
}
```

That returns the top 10 web results for the query, each with its position, title, URL, snippet, site and date when the engine shows one. Type your own question or keywords in **Search query**, or add more in **More queries**.

**Apify free plan:** the $5 of monthly credit covers about 5,000 searches with this Actor. No card needed.

### Pick the right tool for AI-ready text

#### Using an AI assistant?

Paste this into ChatGPT, Claude, Cursor or any AI agent, then say what you want. It gives the assistant what it needs to run this Actor with your Apify account: inputs, examples, prices and a check of the results.

```text
Help me get data with the Apify Actor laptime/web-search ("Web Search API for AI Agents" by Laptime). $1 per 1,000 searches, empty searches free. Results in under a second per query (median, 30 Nov 2026). No API key. Bing web results with title, URL, snippet, position and date, Bing News and Wikipedia filling in, top pages as Markdown. Search tool for AI agents, MCP, RAG, SEO. Full docs (every input field, pricing): https://apify.com/laptime/web-search.md; the essentials are below. If I have not said what I want yet, ask me in one question. Before the first run, show me the input and the estimated cost.
Run it: with Apify MCP tools (https://mcp.apify.com), call-actor "laptime/web-search" with the input, then get-dataset-items with the run's dataset ID. Otherwise, with my Apify token (https://console.apify.com/settings/integrations; keep it in an environment variable, not in a URL or file): POST https://api.apify.com/v2/acts/laptime~web-search/run-sync-get-dataset-items, header "Authorization: Bearer $APIFY_TOKEN", JSON body = the input; it returns the rows as a JSON array and waits up to 300 s (longer runs: POST /v2/acts/laptime~web-search/runs, poll the run, then GET /v2/datasets/{defaultDatasetId}/items). No token yet: a free Apify account includes $5 of usage a month, no card.
Input (JSON; other fields in the docs): query: What to search for, as you would type it into a search engine.
Example (the input the Store form opens with): {"query":"openai api pricing"}
Cost: pay per result, no start fee (Free-plan prices; paid Apify plans pay less): Search $1 per 1,000, Page read $1 per 1,000. To cap a run's charge, add ?maxTotalChargeUsd=<dollars> to the API URL (MCP: callOptions.maxTotalChargeUsd).
Output: Main fields: query, position, title, url, snippet, siteName, date, domain, status, reason.
After the run: tell me how many rows came back and what they cost, then show the first 5 rows as a table (query, position, title, url, snippet, siteName). If nothing came back, read the run's statusMessage (API: GET /v2/acts/laptime~web-search/runs/last; MCP: get-actor-run) and suggest one change to the input.
```

### What can Web Search do?

- **It searches the web and returns ranked results as JSON.** Each result is one row with position, title, URL, domain, snippet, site name, date and the words the engine highlighted.
- **It tells you where each result came from.** Results come from Bing's web index; when Bing returns few results that match the whole query, Bing News and Wikipedia's search fill in, and every row's `engine` says which one it was.
- **It keeps only results that match your query.** A result has to mention most of the query's words in its title, snippet or URL, so a search for "climate change effects on coral reefs" never returns pages that are only about "climate".
- **It names the queries that found nothing, for free.** Such a query gets one row with `status: "no_results"` and a `reason`, is named in the run's status message, and is not charged.
- **It reads the top pages for you.** With **Read top pages** set to 3, the first three results also get the page's main content as Markdown, with menus, footers and cookie banners left out.
- **It searches many queries in one run.** Queries in **More queries** run in parallel with the same settings, and every row says which query it belongs to.
- **It filters by country, language and domain.** Search as a user in Germany, leave out `pinterest.com`, or keep only results from `wikipedia.org` and `gov` among the results the engine returns.
- **It answers HTTP requests directly for agents.** One GET or POST to its server returns the results as JSON, without starting a run each time (see Use it as an API).
- **It takes inputs written for Apify's Web Search and RAG Web Browser.** `query`, `maxResults`, `countryCode`, `languageCode`, `allowedDomains` and `blockedDomains` work as they are.

### How to search the web with an API

#### Give an AI agent a search tool

```json
{
  "query": "latest AI agent payment protocols",
  "maxResults": 5
}
```

Five results with title, URL and snippet, ready for the model to read. One search costs $0.001.

#### Search and read the top pages for RAG

```json
{
  "query": "what is retrieval augmented generation",
  "maxResults": 10,
  "readPages": 3
}
```

Ten results, and the first three come with their main content as Markdown (view **Pages**). That costs one search and three pages read: $0.004.

#### Track many queries at once

```json
{
  "query": "best noise cancelling headphones",
  "queries": ["best budget mechanical keyboard", "best open source vector database"],
  "maxResults": 20
}
```

Up to 20 results for each of the three queries, each row tagged with its query. Results 11-20 are a second results page, so a query with 20 results costs two searches.

#### Leave some websites out

```json
{
  "query": "best noise cancelling headphones",
  "blockedDomains": ["rtings.com", "nytimes.com"]
}
```

Results without those two websites and their subdomains (8 results on 30 Nov 2026). `allowedDomains` works the other way round; it keeps matching results from the engine's top results, so a narrow list can leave only one or two.

### Input parameters

Nothing is required except a query. **Results per query** applies to each query separately.

| Parameter | Type | Default | What it does |
|---|---|---|---|
| `query` | string | prefill: `openai api pricing` | What to search for. Operators work: `site:`, `"exact phrase"`, `-word` |
| `maxResults` | integer | `10` | Results per query, 1-100; every 10 results is one search |
| `readPages` | integer | `0` | Also read the top N results (0-10) and add their Markdown |
| `queries` | array | `[]` | More queries, searched in parallel with the same settings |
| `countryCode` | string | `US` | Search as a user in this country (two-letter code) |
| `languageCode` | string | `en` | Interface language; favours pages in that language |
| `allowedDomains` | array | `[]` | Keep only results from these domains and their subdomains, up to 10 |
| `blockedDomains` | array | `[]` | Leave out results from these domains, up to 10 |
| `outputFormats` | array | `["markdown"]` | For pages read: `markdown`, `text`, `html` |
| `telemetry` | boolean | `true` | Anonymous error reports (see FAQ) |

Input names from other search Actors work too: `provider` (results always come from Bing, Bing News and Wikipedia), `location`, `timeRange`, `dateFrom` and `dateTo` (accepted, but results are not filtered by date: the run log says so), `num`, `maxPagesPerQuery`, `q`, `searchQuery`, `keywords`, `country`, `gl`, `language`, `hl`, `includeDomains`, `excludeDomains`, and RAG Web Browser's `maxResults` with `scrapingTool` (read as pages to read).

### Output

One row per result, in rank order per query, plus a free status row for a query that found nothing. Views: **Results** and **Pages**.

[![Web Search output: one row per result with query, position, title, URL, snippet, site and date](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-web-search-output.jpg?v=d863f1d9)](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-web-search-output.jpg?v=d863f1d9)

| Group | Fields |
|---|---|
| Result | `query`, `position`, `title`, `url`, `domain`, `snippet`, `siteName`, `displayedUrl`, `date`, `emphasizedKeywords`, `engine` |
| Search | `status`, `reason`, `resultsPage`, `countryCode`, `languageCode`, `searchedAt`, `checkUrl` |
| Page read | `readStatus`, `readError`, `pageTitle`, `pageDescription`, `pageLanguage`, `publishedAt`, `wordCount`, `markdown`, `text`, `html` |

#### Example result (shortened)

```json
{
  "query": "openai api pricing",
  "status": "ok",
  "engine": "bing",
  "position": 1,
  "title": "Pricing | OpenAI API",
  "url": "https://developers.openai.com/api/docs/pricing",
  "domain": "developers.openai.com",
  "snippet": "File search tool call pricing applies to the Responses API only. Container pricing…",
  "resultsPage": 1,
  "countryCode": "US",
  "languageCode": "en",
  "readStatus": null,
  "markdown": null
}
```

#### Example status row

```json
{
  "query": "how to file taxes in germany as a freelancer",
  "status": "no_results",
  "reason": "No results matched this query this time. Try fewer or other words, or run it again later. Not charged.",
  "url": null
}
```

#### Export to Excel or CSV

Open the run's **Export** button and pick a view before you download: the dialog starts on **All fields**, which adds empty page columns to every result row. **Results** gives one clean row per result. Choose JSON when you read pages, so the Markdown stays in one piece.

### Benchmarks

Measured on Apify on a set of 34 queries (`tools/benchmarks/web-search/bench34.json`): questions, products, code, news, Dutch and Japanese queries. Time is measured inside the run.

| Task | Web Search | Next best we checked | Date |
|---|---|---|---|
| Queries with 5 or more results matching the whole query, with real URLs | **94%** (median of 3 runs; 85% to 97%) | | 30 Nov 2026 |
| Time per query, median | **0.26 s** | | 30 Nov 2026 |
| Price per 1,000 searches, Apify Free plan | **$1.00** | $5.00 (apify/web-search) | 30 Nov 2026 |
| Price per 1,000 searches, Bronze / Silver / Gold | **$0.90 / $0.80 / $0.65** | $1.50 / $1.25 / $1.00 (apify/web-search) | 30 Nov 2026 |

Prices are list prices from the Actors' pricing on 30 Nov 2026; apify/web-search also charges a small start fee per run.

### How much does it cost to search the web?

Pay per event. There is no start fee, and searches that find nothing are free.

| Event | Price |
|---|---|
| Search (one results page of up to 10 results) | $1.00 per 1,000 |
| Page read (Read top pages) | $1.00 per 1,000 |

Higher Apify plans pay less: $0.90 (Bronze), $0.80 (Silver), $0.65 (Gold and up) per 1,000 of each.

| Job | Cost |
|---|---|
| The example input (10 results) | $0.001 |
| 1,000 agent searches of 5 results each | $1.00 |
| 100 queries with 20 results each | $0.20 |
| 1 query with 10 results and the top 3 pages read | $0.004 |

Never charged: queries with no matching result (they get a status row instead), pages that fail to load or have no readable text. The run's maximum cost in the Console caps a run.

### Use it as an API (real-time)

Web Search also answers HTTP requests directly: send one query, get the results as JSON in the same response, with no run to start and no dataset to fetch. That makes it a search tool an agent can call mid-conversation. The **Server** tab lists every parameter and lets you send a request from the browser.

Send your [Apify API token](https://console.apify.com/settings/integrations) in the `Authorization` header (or as `?token=` when you can't set headers):

```bash
curl "https://laptime--web-search.apify.actor/?query=openai+api+pricing&maxResults=5" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>"
```

POST takes the same fields as a JSON body, so lists are real arrays. This one also reads the top 2 pages as Markdown:

```js
const res = await fetch('https://laptime--web-search.apify.actor/', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.APIFY_TOKEN}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ query: 'what is retrieval augmented generation', maxResults: 5, readPages: 2, blockedDomains: ['pinterest.com'] }),
});
const { search, results } = await res.json();
for (const r of results) console.log(r.position, r.title, r.url, r.markdown?.length ?? '');
```

The answer is `{ "query", "search", "results" }`, the shape Apify's Web Search returns, so code written for it keeps working:

```json
{
  "query": "openai api pricing",
  "search": { "provider": "bing", "status": "ok", "reason": null, "durationSecs": 0.82, "countryCode": "US", "languageCode": "en", "resultsPages": 1, "pagesRead": 0, "warnings": [] },
  "results": [
    { "position": 1, "title": "Pricing | OpenAI API", "url": "https://developers.openai.com/api/docs/pricing", "domain": "developers.openai.com", "snippet": "Pricing information for the OpenAI platform. ...", "engine": "duckduckgo", "date": null, "markdown": null }
  ]
}
```

- **A warm server answers in about a quarter of a second.** The median was 0.23 seconds per query over 10 requests sent from an Apify run on 1 Dec 2026. The first request after a quiet spell waits for the server to start, 3.4 to 4.7 seconds in the same test.
- **You pay only per search.** The server runs on our side, so there is no compute charge on top: $1 per 1,000 searches (less on higher Apify plans), plus $1 per 1,000 pages read when you ask for Markdown.
- **A search that finds nothing is free.** `results` is then empty and `search.status` is `no_results` or `filtered_out`, with a `reason` that says what to change.
- **Errors are short and never charged.** They come back as `{ "code", "error" }` with HTTP 400 (no query, bad JSON) or 502 (every search route refused; retry).
- **Each request is one query.** For many queries at once, or a schedule, start a run with **More queries** instead: it searches them in parallel and saves the rows to a dataset.

### Integrations

Save your input as a task, schedule it, and send the rows to Google Sheets, Make, n8n, Zapier or Slack. New to schedules? Apify's one-minute video shows how:

https://www.youtube.com/watch?v=1jI7WcVQmwM

- **LangChain and LlamaIndex:** the Apify dataset loader reads `url` and `snippet` (or `markdown` with Read top pages) from each row.
- **n8n, Make, Zapier:** the Apify node or app, "Run an Actor and get dataset", Actor `laptime/web-search`.
- **Real-time API:** `GET https://laptime--web-search.apify.actor/?query=openai+api+pricing` with your Apify token; details in Use it as an API above and on the **Server** tab.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("laptime/web-search").call(run_input={
    "query": "what is retrieval augmented generation",
    "maxResults": 5,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["position"], row["title"], row["url"])
```

#### One HTTP call

```bash
curl -X POST "https://api.apify.com/v2/acts/laptime~web-search/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>&view=results" \
  -H "Content-Type: application/json" \
  -d '{"query": "docker compose environment variables", "maxResults": 5}'
```

#### Claude, ChatGPT, Cursor and other MCP clients

Add `https://mcp.apify.com?tools=laptime/web-search` as an MCP server, then ask: "Search the web for the latest AI agent payment protocols and summarise the top five sources with their links."

### Switch from another web search Actor

Inputs written for these Actors work as they are:

- **apify/web-search:** `query`, `maxResults`, `countryCode`, `languageCode`, `allowedDomains`, `blockedDomains`; `provider` is accepted (results come from Bing, Bing News and Wikipedia); `location`, `dateFrom` and `dateTo` are accepted but not applied.
- **apify/rag-web-browser:** `query`, `maxResults` (read as the number of pages to read, as there), `outputFormats`; `scrapingTool` and the timeouts are ignored.

| apify/web-search field | Web Search field |
|---|---|
| `results[].position`, `url`, `title`, `snippet`, `domain`, `date`, `siteName`, `displayedUrl`, `emphasizedKeywords` | the same names, one row per result |
| `search.provider` | `engine` per row |
| `search.checkUrl` | `checkUrl` |

### FAQ

#### Do I need a search engine account or an API key?

No. You only need an Apify account. The Actor reads public search results, logged out.

#### Which search engine does it use?

Bing's web index first. When Bing returns fewer than 5 results that match the whole query, Bing News and Wikipedia's search fill in, and each row's `engine` field says where it came from. The results are not Google's, so rankings differ from what you see on google.com.

#### Is it reliable?

An automated check runs the example input every morning. A results page whose results don't match the query is fetched again from another IP. A query that still finds nothing gets a status row with the reason, is named in the run's status message, and costs nothing.

#### Why did a query return fewer results than I asked for?

Results that don't mention most of your query's words are left out, so a narrow query can return fewer than 10. Try fewer or simpler words, or run it again later; in our test set about 3 in 100 queries found nothing (30 Nov 2026).

#### Is it legal to scrape search results?

Collecting public search results is generally allowed, but personal data and the search engine's terms need care. Apify explains the rules in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

#### Does it send any data back?

Only anonymous error reports, so we hear about a broken search the day it breaks. A report has the Actor's name and build, the step that failed, the error type and HTTP status, and counts. It never has your input, your results, URLs or your Apify account. Untick **Anonymous error reports** (`telemetry: false`) to turn it off.

### More Laptime scrapers

- [Video Transcript Scraper](https://apify.com/laptime/video-transcript-scraper): transcripts of YouTube, TikTok, Instagram, Facebook and X videos, for the same AI pipelines.
- [Reddit Scraper](https://apify.com/laptime/reddit-scraper): posts, full comment threads, search and monitoring, with RAG-ready formats.

### Support

Found a bug, or missing a field? Open an issue and we'll answer within a day. Fixes and new fields are listed on the **Changelog** tab.

If it saved you time, a short review on the Actor page helps other people find it.

*Web Search is an independent tool. It is not affiliated with or endorsed by Microsoft (Bing), the Wikimedia Foundation, Google or Apify's own Web Search.*

# Changelog

This Actor's version history is a separate document: https://apify.com/laptime/web-search/changelog.md

# Actor input Schema

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

What to search for, as you would type it into a search engine. Operators work: site:, "exact phrase", -word, filetype:pdf. Example: best open source vector database.

## `maxResults` (type: `integer`):

Most organic results per query, 1-100. Results come 10 per page: up to 10 costs one search, 11-20 two, and so on. Default 10.

## `readPages` (type: `integer`):

Also open the top N results and add each page's main content as clean Markdown (menus, footers and cookie banners removed) to its row. 0 = results only. Each page read is one page event. Default 0.

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

Optional. More queries to search in the same run, one per line. Each is searched separately (in parallel) with the same settings, and every row says which query it came from.

## `countryCode` (type: `string`):

Search as if you were in this country, as a two-letter code: US (default), GB, DE, FR, NL, ES, IT, CA, AU, IN, BR, MX, JP, PL, SE, BE, CH, AT, IE, SG. It sets the search market, which changes the ranking and local results.

## `languageCode` (type: `string`):

Search language code: en (default), de, fr, nl, es, it, pt, pt-BR, ja, zh-CN, pl, sv, da, no, fi, cs, tr, ko, ar, hi. It favours pages in that language (it doesn't translate or strictly filter).

## `allowedDomains` (type: `array`):

Optional, up to 10. Keep only results from these domains and their subdomains: wikipedia.org also covers en.wikipedia.org, gov covers every .gov site. Applied to the results the engine returns, so a short list can leave few results.

## `blockedDomains` (type: `array`):

Optional, up to 10. Results from these domains and their subdomains are left out, e.g. pinterest.com.

## `outputFormats` (type: `array`):

For pages read with Read top pages, any of: markdown (default; keeps headings, lists, tables, links and code), text (the same without formatting), html (the cleaned main content).

## `telemetry` (type: `boolean`):

Sends the Actor's author an anonymous report when a run hits an error (error type, failing step, HTTP status, counts). Never your input, results, URLs or account. Untick to turn it off.

## Actor input object example

```json
{
  "query": "openai api pricing",
  "maxResults": 10,
  "readPages": 0,
  "countryCode": "US",
  "languageCode": "en",
  "outputFormats": [
    "markdown"
  ],
  "telemetry": true
}
```

# Actor output Schema

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

Query, position, title, URL, snippet, site name and date per result.

## `pages` (type: `string`):

The top results you asked to read, with their Markdown.

## `all` (type: `string`):

Every field of every row.

## `runStats` (type: `string`):

RUN_STATS: queries, results, pages read, search requests, latency, problems per query.

# 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": "openai api pricing"
};

// Run the Actor and wait for it to finish
const run = await client.actor("laptime/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": "openai api pricing" }

# Run the Actor and wait for it to finish
run = client.actor("laptime/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": "openai api pricing"
}' |
apify call laptime/web-search --silent --output-dataset

```

## MCP server setup

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