# Playwright MCP Actor (`aluminum_jam/playwright-mcp-actor`) Actor

The Playwright MCP Actor integrates the robust browser automation capabilities of Playwright with the Model Context Protocol (MCP), enabling AI agents and language models to perform web scraping, testing, and automation tasks through a standardized interface.

- **URL**: https://apify.com/aluminum\_jam/playwright-mcp-actor.md
- **Developed by:** [anuj upadhyay](https://apify.com/aluminum_jam) (community)
- **Categories:** AI, Automation, Developer tools
- **Stats:** 53 total users, 7 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 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?

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

## 🎭 Playwright MCP Actor

<div align="center">

#### Your AI Assistant's Gateway to the Web

**Give Claude, ChatGPT, or any AI the power to browse, scrape, and automate the web for you.**

[![Try Free](https://img.shields.io/badge/🚀_Try_Free-Apify-blue?style=for-the-badge)](https://apify.com/aluminum_jam/playwright-mcp-actor)
[![View Examples](https://img.shields.io/badge/📖_Examples-Jump_to-green?style=for-the-badge)](#-real-world-use-cases)
[![Get Help](https://img.shields.io/badge/💬_Get_Help-GitHub-orange?style=for-the-badge)](https://github.com/anuj123upadhyay/playwright-mcp-actor/issues)

</div>

***

### 🤔 What is This?

**In Plain English:** This tool lets you ask an AI (like Claude or ChatGPT) to do things on websites for you. Want to find 50 coffee shops in Austin? Just ask. Need to scrape product prices from Amazon? One request. Want to fill out a contact form? Done.

**No coding. No browser extensions. No complicated setup.**

You describe what you want, your AI uses this tool to do it, and you get clean data back — ready to use.

***

### 💡 How Does It Work?

```
┌─────────────────┐     ┌─────────────────────┐     ┌──────────────────┐
│   You ask AI:   │ ──▶ │  Playwright MCP     │ ──▶ │  You get data:   │
│  "Find coffee   │     │  Actor opens a      │     │  Names, phones,  │
│   shops in      │     │  browser and        │     │  addresses —     │
│   Austin TX"    │     │  does the work      │     │  as CSV/Excel    │
└─────────────────┘     └─────────────────────┘     └──────────────────┘
```

**That's it.** The AI handles the technical parts. You just ask for what you need.

***

### ⚡ What Can You Do With It?

| Task | What You Get | Time | Cost |
|------|--------------|------|------|
| 🔍 **Google Search** | Top 50 results with titles, URLs, descriptions | ~10 sec | ~$0.01 |
| 🛒 **Amazon Products** | Names, prices, ratings, review counts | ~15 sec | ~$0.02 |
| 👤 **LinkedIn Profiles** | Name, title, company, bio, connections | ~12 sec | ~$0.02 |
| 📍 **Local Businesses** | Business info from Google Maps | ~20 sec | ~$0.02 |
| 🐦 **Twitter/X Posts** | Recent tweets from any public profile | ~15 sec | ~$0.02 |
| 📝 **Form Filling** | Auto-fill and submit web forms | ~20 sec | ~$0.02 |
| 📸 **Screenshots** | Full-page or element screenshots | ~8 sec | ~$0.01 |

**Export Options:** JSON • CSV • Excel — Use it in spreadsheets, CRMs, or your own apps.

***

### 👥 Who Is This For?

| If you're a... | You can use this to... |
|----------------|------------------------|
| **Marketer** | Research competitors, track SEO rankings, monitor brand mentions |
| **Sales Professional** | Build prospect lists from LinkedIn, find leads on Google Maps |
| **Researcher** | Collect data from any website, automate repetitive tasks |
| **Business Owner** | Monitor competitor prices, track reviews, automate form submissions |
| **Developer** | Add powerful browser automation to your apps via API |
| **Content Creator** | Track trends, gather inspiration, monitor engagement |

***

### 🚀 Get Started in 3 Steps

#### Step 1: Go to the Actor

👉 **[Open Playwright MCP Actor on Apify](https://apify.com/aluminum_jam/playwright-mcp-actor)**

#### Step 2: Pick a Template (or Create Your Own)

Choose what you want to do from the dropdown, fill in the details, and click **Run**.

#### Step 3: Get Your Data

Download your results as JSON, CSV, or Excel. Done!

***

### 📋 Ready-to-Use Templates

Choose a template that fits your needs. Just fill in the parameters and run!

#### 🔍 Google Search Results

> Perfect for SEO research, competitor analysis, and market research.

```json
{
  "template": "google_search",
  "template_params": {
    "search_query": "best project management tools",
    "max_results": 20
  }
}
```

**You'll get:** Title, URL, description, and position for each result.

***

#### 🛒 Amazon Product Research

> Great for price monitoring, product research, and market analysis.

```json
{
  "template": "amazon_product_search",
  "template_params": {
    "product_name": "wireless headphones",
    "max_results": 15
  }
}
```

**You'll get:** Product names, prices, ratings, and review counts.

***

#### 👤 LinkedIn Profile

> Ideal for sales prospecting and professional research.

```json
{
  "template": "linkedin_profile",
  "template_params": {
    "profile_url": "https://linkedin.com/in/satyanadella"
  }
}
```

**You'll get:** Name, title, company, bio, and professional details.

***

#### 📍 Local Business Finder

> Perfect for lead generation and local market research.

```json
{
  "template": "google_maps_business",
  "template_params": {
    "search_query": "coffee shops in Austin TX",
    "max_results": 30
  }
}
```

**You'll get:** Business names, addresses, phone numbers, ratings, and hours.

***

#### 🐦 Twitter/X Timeline

> Track influencers, monitor trends, and gather social insights.

```json
{
  "template": "twitter_scrape",
  "template_params": {
    "username": "elonmusk",
    "max_tweets": 50
  }
}
```

**You'll get:** Tweet text, dates, engagement metrics, and media links.

***

### 🎬 Real-World Use Cases

#### 📈 Case Study: SEO Research

> **Goal:** "Show me who's ranking for 'best CRM software'"

```json
{
  "template": "google_search",
  "template_params": {
    "search_query": "best CRM software",
    "max_results": 50
  },
  "export_format": "csv"
}
```

**Result:** A spreadsheet with 50 rows — each containing title, URL, meta description, and ranking position.

***

#### 💰 Case Study: Price Monitoring

> **Goal:** "Track laptop prices on Amazon"

```json
{
  "template": "amazon_product_search",
  "template_params": {
    "product_name": "MacBook Pro M3",
    "max_results": 20
  },
  "export_format": "excel"
}
```

**Result:** An Excel file with product names, current prices, ratings, and review counts — perfect for comparison.

***

#### 🎯 Case Study: Lead Generation

> **Goal:** "Find coffee shops in Chicago for my sales outreach"

```json
{
  "template": "google_maps_business",
  "template_params": {
    "search_query": "coffee shops in Chicago",
    "max_results": 50
  }
}
```

**Result:** A list of 50 businesses with names, addresses, phone numbers, ratings, and hours — ready for your CRM.

***

### 💰 Pricing

**Pay only for what you use. No subscriptions required.**

This Actor runs on [Apify's platform](https://apify.com/pricing) with usage-based pricing:

| Task Type | Estimated Cost | Run Time |
|-----------|----------------|----------|
| Google search (20 results) | ~$0.01 | ~10 sec |
| Amazon product search | ~$0.02 | ~15 sec |
| LinkedIn profile | ~$0.02 | ~12 sec |
| Google Maps (30 businesses) | ~$0.02 | ~20 sec |
| Screenshot | ~$0.01 | ~8 sec |

> **Tip:** New Apify accounts get $5 free credit — enough for 200+ runs!

***

### ⚙️ Settings Explained

Don't worry — the defaults work great for most tasks. Here's what you can customize:

| Setting | What It Does | Default | When to Change |
|---------|--------------|---------|----------------|
| **Template** | Pre-built workflow | None | Pick based on your task |
| **Export Format** | Data output format | JSON | Use CSV/Excel for spreadsheets |
| **Stealth Mode** | Avoid bot detection | Off | Turn on for social media sites |
| **Max Retries** | Retry failed actions | 2 | Increase for flaky sites |
| **Delay** | Wait between actions | 0ms | Add 500-1000ms to avoid rate limits |

***

### 🛡️ Troubleshooting

Running into issues? Here are quick fixes:

| Problem | Solution |
|---------|----------|
| 🚫 **Getting blocked** | Enable **Stealth Mode** in settings |
| ⏱️ **Timeout errors** | Increase **Page Load Timeout** to 60000ms |
| 🔄 **Rate limited** | Add **Delay Between Actions** (500-1000ms) |
| 📍 **Element not found** | Check if the website changed, try different selectors |
| 📊 **Incomplete results** | Enable **Proxy** settings for better success rates |

**Still stuck?** [Open an issue](https://github.com/anuj123upadhyay/playwright-mcp-actor/issues) or [email me](mailto:anuju760@gmail.com)!

***

### 💡 Tips for Best Results

1. **🎯 Start with templates** — They're tested and optimized
2. **📊 Use CSV/Excel export** — Easier to work with than raw JSON
3. **🛡️ Enable stealth mode** — Essential for social media and e-commerce
4. **⚖️ Be reasonable** — Only scrape what you need
5. **⏸️ Add delays** — Prevents rate limiting and blocks
6. **🔄 Check your results** — Verify the first few runs before scaling

***

### 📊 Why Choose This Actor?

| Feature | Playwright MCP Actor | Other Tools |
|---------|----------------------|-------------|
| **Ready-to-use templates** | ✅ 5 included | ❌ Build from scratch |
| **AI-native (MCP Protocol)** | ✅ Works with Claude, ChatGPT | ❌ Manual coding required |
| **Anti-detection** | ✅ 12 stealth techniques | ⚠️ Basic or none |
| **Auto-retry on failure** | ✅ Exponential backoff | ❌ Fails immediately |
| **Multiple export formats** | ✅ JSON, CSV, Excel | ⚠️ JSON only |
| **Pay-per-use pricing** | ✅ ~$0.01-0.02/task | ❌ Monthly subscriptions |

***

### 🤔 Frequently Asked Questions

<details>
<summary><strong>What is MCP?</strong></summary>

MCP (Model Context Protocol) is a standard that allows AI assistants like Claude to use external tools. Think of it like giving your AI a set of hands to interact with websites. This Actor is built specifically to work with MCP-enabled AI systems.

</details>

<details>
<summary><strong>Do I need to know how to code?</strong></summary>

**Nope!** Just pick a template, fill in what you're looking for, and run it. The templates handle all the technical work. If you do know code, you can create custom automations using the Actions feature.

</details>

<details>
<summary><strong>Is this legal?</strong></summary>

Web scraping is generally legal for publicly available information. However, always respect websites' Terms of Service and robots.txt files. Don't scrape personal data without consent, and use the data responsibly.

</details>

<details>
<summary><strong>How is this different from Apify's other scrapers?</strong></summary>

This Actor is designed to work with AI assistants via MCP. It's more flexible than specialized scrapers — you can automate almost any web task, not just scraping. It's like having a general-purpose browser you can control with plain English.

</details>

<details>
<summary><strong>Can I schedule regular runs?</strong></summary>

Yes! Apify supports scheduled runs. You can set up daily, weekly, or custom schedules directly from the Apify Console.

</details>

***

<details>
<summary><h2>🔬 Advanced: Custom Actions (For Developers)</h2></summary>

Need something the templates don't cover? You can build custom automations using the **Actions** system.

#### How Custom Actions Work

Actions are step-by-step instructions that tell the browser what to do. Each action is a simple object with a `type` and optional parameters.

#### Example: Custom Workflow

```json
{
  "browser_type": "chromium",
  "headless": true,
  "stealth_mode": true,
  "actions": [
    {"type": "navigate", "value": "https://example.com/"},
    {"type": "fill", "selector": "#search", "value": "my query"},
    {"type": "click", "selector": "button[type='submit']"},
    {"type": "wait_for_element", "selector": ".results"},
    {"type": "extract_text", "selector": ".results"},
    {"type": "screenshot"}
  ]
}
```

#### Complete Action Reference (20+ Actions)

**🔗 Navigation:**
| Action | Description | Example |
|--------|-------------|---------|
| `navigate` | Go to a URL | `{"type": "navigate", "value": "https://example.com/"}` |
| `go_back` | Browser back button | `{"type": "go_back"}` |
| `go_forward` | Browser forward button | `{"type": "go_forward"}` |
| `reload` | Refresh the page | `{"type": "reload"}` |
| `get_url` | Get current URL | `{"type": "get_url"}` |
| `get_title` | Get page title | `{"type": "get_title"}` |

**🖱️ Interactions:**
| Action | Description | Example |
|--------|-------------|---------|
| `click` | Click an element | `{"type": "click", "selector": ".button"}` |
| `fill` | Fill an input field | `{"type": "fill", "selector": "#email", "value": "test@example.com"}` |
| `type` | Type character by character | `{"type": "type", "selector": "#search", "value": "hello"}` |
| `select` | Choose from dropdown | `{"type": "select", "selector": "#country", "value": "USA"}` |
| `check` | Check a checkbox | `{"type": "check", "selector": "#agree"}` |
| `uncheck` | Uncheck a checkbox | `{"type": "uncheck", "selector": "#subscribe"}` |
| `hover` | Mouse hover | `{"type": "hover", "selector": ".menu-item"}` |
| `press_key` | Press keyboard key | `{"type": "press_key", "value": "Enter"}` |

**📤 Data Extraction:**
| Action | Description | Example |
|--------|-------------|---------|
| `extract_text` | Get text content | `{"type": "extract_text", "selector": ".results"}` |
| `extract_attributes` | Get HTML attributes | `{"type": "extract_attributes", "selector": "a", "value": "href"}` |
| `get_html` | Get raw HTML | `{"type": "get_html", "selector": ".content"}` |
| `screenshot` | Take a screenshot | `{"type": "screenshot"}` |
| `evaluate` | Run JavaScript | `{"type": "evaluate", "value": "document.title"}` |

**⏳ Waiting & Scrolling:**
| Action | Description | Example |
|--------|-------------|---------|
| `wait` | Wait milliseconds | `{"type": "wait", "value": "2000"}` |
| `wait_for_element` | Wait for element | `{"type": "wait_for_element", "selector": ".loaded"}` |
| `scroll` | Scroll the page | `{"type": "scroll", "value": "500"}` |

#### Advanced Configuration

| Setting | Type | Default | Description |
|---------|------|---------|-------------|
| `browser_type` | string | `chromium` | Browser engine: `chromium`, `firefox`, or `webkit` |
| `headless` | boolean | `true` | Run without visible browser window |
| `stealth_mode` | boolean | `false` | Enable 12 anti-detection techniques |
| `max_retries` | integer | `2` | Retry count for failed actions |
| `continue_on_error` | boolean | `false` | Keep running if an action fails |
| `delay_between_actions` | integer | `0` | Pause between steps (milliseconds) |
| `page_load_timeout` | integer | `30000` | Max wait for page loads (milliseconds) |
| `viewport_width` | integer | `1920` | Browser window width |
| `viewport_height` | integer | `1080` | Browser window height |

#### Stealth Mode Techniques

When enabled, the Actor applies 12 anti-detection methods:

- ✅ WebDriver property removal
- ✅ Browser fingerprint spoofing
- ✅ User-agent rotation
- ✅ WebGL/Canvas protection
- ✅ Timezone matching
- ✅ Language consistency
- ✅ Plugin/MimeType masking
- ✅ Chrome runtime mocking
- ✅ Permission API spoofing
- ✅ Hardware concurrency normalization
- ✅ Platform consistency
- ✅ Screen resolution matching

#### REST API Integration

Call the Actor programmatically from any application:

```bash
curl -X POST "https://api.apify.com/v2/acts/aluminum_jam~playwright-mcp-actor/runs" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "google_search",
    "template_params": {
      "search_query": "AI news",
      "max_results": 10
    }
  }'
```

#### Platform Integrations

This Actor works seamlessly with:

- **Zapier** — Automate workflows with 5,000+ apps
- **Make.com** — Build complex automation scenarios
- **Google Sheets** — Export data directly to spreadsheets
- **Webhooks** — Trigger actions in your own systems
- **Any REST API client** — Full API access for developers

</details>

***

### 📝 Changelog

**v1.1.0** — March 2026

- 🛡️ Enhanced stealth mode with 12 anti-detection techniques
- 🔄 Smart retry logic with exponential backoff
- ⏱️ Configurable delays between actions
- 🛑 Graceful error handling and recovery

**v1.0.0** — December 2025

- ✨ Initial release
- 🎯 5 ready-to-use templates
- 🔧 20+ browser actions
- 📊 Multi-format export (JSON, CSV, Excel)

***

### 🤝 Support & Contact

Need help? I'm here for you:

| Channel | Link |
|---------|------|
| 🐛 **Report Issues** | [GitHub Issues](https://github.com/anuj123upadhyay/playwright-mcp-actor/issues) |
| 💬 **Community** | [Apify Discord](https://discord.gg/apify) |
| 📧 **Email** | <anuju760@gmail.com> |
| 🐦 **Twitter/X** | [@anuj123upadhyay](https://x.com/anuj123upadhyay) |

***

<div align="center">

### 🚀 Ready to Get Started?

**Give your AI the power to browse the web.**

[![Try Playwright MCP Actor Free](https://img.shields.io/badge/🚀_Try_Free_on_Apify-Start_Now-blue?style=for-the-badge\&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cGF0aCBkPSJNMTUgMjJWMThjMC0zLTIuNS01LTcuNS01SDR2LTNMNC45OSAzLjk5QTkgOSAwIDAgMSAyMCA3LjVjMCA1LTMuNSA5LjUtOC41IDEwLjVaIi8+PC9zdmc+)](https://apify.com/aluminum_jam/playwright-mcp-actor)

***

**⭐ If this Actor helped you, please star it on [GitHub](https://github.com/anuj123upadhyay/playwright-mcp-actor)!**

Made with ❤️ by [Anuj Upadhyay](https://github.com/anuj123upadhyay)

</div>

# Actor input Schema

## `browser_type` (type: `string`):

Browser to use for automation (chromium, firefox, or webkit)

## `headless` (type: `boolean`):

Run browser in headless mode (without UI). Faster and uses less resources.

## `stealth_mode` (type: `boolean`):

Enable advanced anti-detection features to avoid bot detection. Recommended for social media and e-commerce sites.

## `proxy` (type: `object`):

Configure proxy settings for requests. Use proxies to avoid rate limits and geo-restrictions.

## `template` (type: `string`):

Use a pre-built automation template. Templates provide optimized workflows for common use cases.

## `template_params` (type: `object`):

Parameters for the selected template. Each template has its own required parameters.

## `actions` (type: `array`):

Array of browser automation actions to execute sequentially. Required if not using a template.

## `export_format` (type: `string`):

Format to export extracted data. JSON is best for integrations, CSV/Excel for spreadsheets.

## `delay_between_actions` (type: `integer`):

Milliseconds to wait between each action. Helps avoid rate limits and detection. 0 = no delay.

## `max_retries` (type: `integer`):

Number of times to retry a failed action before giving up. Uses exponential backoff.

## `continue_on_error` (type: `boolean`):

If enabled, continues executing remaining actions even if one fails. Failed actions are logged.

## `max_actions_per_run` (type: `integer`):

Maximum number of actions to execute. Prevents runaway automation. 0 = unlimited.

## `page_load_timeout` (type: `integer`):

Maximum time to wait for pages to load. Increase for slow sites.

## `viewport_width` (type: `integer`):

Browser viewport width in pixels

## `viewport_height` (type: `integer`):

Browser viewport height in pixels

## `user_agent` (type: `string`):

Custom User-Agent string. Leave empty for auto-rotation in stealth mode.

## Actor input object example

```json
{
  "browser_type": "chromium",
  "headless": true,
  "stealth_mode": false,
  "template_params": {
    "search_query": "your search term",
    "max_results": 10
  },
  "actions": [
    {
      "type": "navigate",
      "value": "https://example.com/"
    },
    {
      "type": "screenshot"
    }
  ],
  "export_format": "json",
  "delay_between_actions": 0,
  "max_retries": 2,
  "continue_on_error": false,
  "max_actions_per_run": 100,
  "page_load_timeout": 30000,
  "viewport_width": 1920,
  "viewport_height": 1080
}
```

# Actor output Schema

## `overview` (type: `string`):

Summary statistics of the automation run

## `allActions` (type: `string`):

Complete list of all executed actions with details

## `successful` (type: `string`):

Only successfully executed actions

## `failed` (type: `string`):

Failed actions with error details

## `screenshots` (type: `string`):

Captured screenshots from browser automation

## `exports` (type: `string`):

CSV and Excel exports of extracted data

# 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 = {
    "template_params": {
        "search_query": "your search term",
        "max_results": 10
    },
    "actions": [
        {
            "type": "navigate",
            "value": "https://example.com/"
        },
        {
            "type": "screenshot"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aluminum_jam/playwright-mcp-actor").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 = {
    "template_params": {
        "search_query": "your search term",
        "max_results": 10,
    },
    "actions": [
        {
            "type": "navigate",
            "value": "https://example.com/",
        },
        { "type": "screenshot" },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("aluminum_jam/playwright-mcp-actor").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 '{
  "template_params": {
    "search_query": "your search term",
    "max_results": 10
  },
  "actions": [
    {
      "type": "navigate",
      "value": "https://example.com/"
    },
    {
      "type": "screenshot"
    }
  ]
}' |
apify call aluminum_jam/playwright-mcp-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,aluminum_jam/playwright-mcp-actor"
        }
    }
}

```

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/58l9LOz4G3z37hpl0/builds/VQGadP3MGVbHP0aTR/openapi.json
