# Ai Web Scraper - Extract Data With Ease (`eloquent_mountain/ai-web-scraper-extract-data-with-ease`) Actor

Ai Web Scraper enables scraping for everyone, including non-techies! It uses Google's Gemini LLM to scrape websites with natural language commands. It dynamically extracts data, no selector input needed, handles dynamic content and cookie consent, avoids bot detection, outputs JSON or other formats.

- **URL**: https://apify.com/eloquent_mountain/ai-web-scraper-extract-data-with-ease.md
- **Developed by:** [Paco](https://apify.com/eloquent_mountain) (community)
- **Categories:** AI, Automation, Agents
- **Features:** Limited permissions
- **Stats:** 1,547 total users, 5 monthly users, 93.1% runs succeeded, 33 bookmarks
- **User rating**: 1.02 out of 5 stars

## Pricing

from $10.00 / 1,000 vision call to llms

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

### AI Web Scraper

This AI Web Scraper is a powerful and flexible tool that uses the power of Large Language Models (LLMs), specifically Google's Gemini, to intelligently extract data from web pages. Unlike traditional scrapers that rely on pre-defined selectors, this actor lets you specify *what* data you need in natural language, and it automatically adapts to extract it.

**🚀 Performance Optimized**: This version includes significant performance improvements including concurrent processing, intelligent content growth detection, memory optimization, and batch data processing for faster and more reliable scraping.

***DISCLAIMER!!*** :  The goal of this scraper is to make it possible for everyone (also non- techies) to scrape. It is still quite experimental since it relies on certain vision capabilities, meaning results can be sometimes inconsistent or not entirely what you'd expect.

### What Does This Actor Do?

This actor automates the process of web scraping by combining browser automation with AI-powered element identification. Here’s a breakdown of its key capabilities:

- **Dynamic Data Extraction:** You **BRIEFLY** specify the items you want to scrape **separated by commas** in natural language (**e.g., "product name, product price"**) and the actor intelligently identifies and extracts those values from the web page.
- **Intelligent Element Identification:** Leveraging Google's Gemini LLM, it analyzes web page screenshots to pinpoint the location of relevant elements and labels them, even if the website's structure is unfamiliar.
- **Pagination Support:** Automatically detects and clicks "next page" and "load more" controls, so you can scrape multi-page listings in a single run (`max_pages`). On "load more" pages, only the newly loaded content is analyzed — no double LLM costs.
- **Link Following (Crawl Mode):** Point the actor at a category/listing page and it will identify the links to the individual detail pages matching your instructions, visit each one, and extract the data there (`follow_links`).
- **Custom Output Schema:** Optionally define the exact output columns (names, types, descriptions) with `output_fields` for stable, predictable columns across runs — ideal for spreadsheet and API integrations.
- **RAG Chunking Mode:** Switch `output_mode` to `chunks` to turn the actor into a drop-in RAG loader: it reads each page's clean text, preserves the heading structure, and emits **one dataset row per embeddable chunk** (`url`, `chunkIndex`, `headingPath`, `text`, `tokenCount`, page `meta`). Sized to your embedding model with `chunk_size`/`chunk_overlap`, boundaries respect headings and sentences, and it feeds straight into **LangChain**, **LlamaIndex**, and vector databases (Pinecone, Weaviate, Qdrant, pgvector, Chroma, …). No vision/LLM calls, so it is fast and cheap.
- **Proxy Support:** Full support for Apify Proxy (datacenter and residential) and custom proxies via the standard `proxyConfiguration` input, unlocking sites that block datacenter traffic.
- **Performance Optimized Scrolling:** Uses intelligent content growth detection instead of fixed delays, making scrolling faster and more reliable while respecting timeout safeguards.
- **Concurrent Processing:** Processes multiple screenshots simultaneously with controlled concurrency to maximize speed while respecting API rate limits.
- **Memory Efficient:** Automatically clears screenshots from memory after processing to prevent memory accumulation during large scraping jobs.
- **Batch Data Processing:** Saves data in optimized batches instead of individual items, reducing API overhead and improving performance.
- **Robust Error Handling:** Includes comprehensive error handling, timeouts, and resource cleanup to ensure reliable operation.
- **Flexible Data Structure:** The actor returns the data in a structured JSON format, with labels derived from the user's instructions or the bounding boxes provided by Gemini itself, making it easy to use in your own applications, reports, or spreadsheets.
- **Avoids Bot Detection:** Takes several measures to avoid bot detection (using realistic user-agents and headless browser settings).

### How to Use the AI Web Scraper

Using this actor is straightforward:

1. **Create an Apify Account:** Start with a free Apify account using your email.
2. **Open the Smart Web Data Extractor:** Go to the actor page.
3. **Provide Instructions and URLs:** Input your desired instructions **e.g., product name, product price** and one or more target URLs.
4. **Run the Actor:** Click the "Start" button and wait for the data to be extracted.
5. **Download Your Data:** Retrieve the scraped data in JSON format.

### Input

To start scraping data, the actor accepts the following input parameters:

#### Core Parameters

- `start_urls`: An array of one or more URLs of the web pages you want to scrape
- `instructions`: A list of items you wish to scrape, separated by commas. **e.g., "product name, product price"**

#### Output Schema (Optional)

- `output_fields`: Define the exact output columns instead of letting the AI derive them from your instructions. Guarantees stable column names across runs, lets you specify types for clean CSV/spreadsheet exports, and saves one LLM call per run. Example:

```json
"output_fields": [
    { "name": "title", "type": "string", "description": "the product title" },
    { "name": "price", "type": "number", "description": "numeric price without currency symbol" },
    { "name": "in_stock", "type": "boolean", "description": "whether the product is in stock" }
]
```

Supported types: `string`, `number`, `integer`, `boolean` (default: `string`). Only `name` is required.

#### RAG Chunking Mode (Optional)

- `output_mode`: `items` (default) runs the vision extractor described above. Set it to `chunks` to produce **one dataset row per embeddable chunk** instead — the shape RAG pipelines expect. In chunks mode the actor reads the readable text of each page directly (no screenshots, no vision/LLM calls), so it is markedly faster and cheaper.
- `chunk_size`: target size of each chunk in tokens (default: `512`). Match this to your embedding model's context window. Token counts are approximate (no model-specific tokenizer is bundled).
- `chunk_overlap`: approximate tokens of trailing context carried into the next chunk (default: `64`) to preserve continuity across boundaries. Must be smaller than `chunk_size`.

Chunk boundaries respect the page's heading and paragraph structure and never cut mid-sentence. Each row carries the parent `url`, the running `chunkIndex`, the `headingPath` (the chain of headings above the chunk, for citation), the chunk `text`, an approximate `tokenCount`, a `contentHash` (identical chunks are de-duplicated across pages), and the page `meta` block (title, description, canonical URL, language, Open Graph fields).

This makes the actor directly droppable into **LangChain** / **LlamaIndex** document loaders and vector-database ingestion (Pinecone, Weaviate, Qdrant, pgvector, Chroma, …): point it at a site, and get back chunks ready to embed. `follow_links`, `max_pages`, `has_infinite_scroll`, and `proxyConfiguration` all work in chunks mode too. Example:

```json
{
    "start_urls": ["https://docs.example.com/guide"],
    "output_mode": "chunks",
    "chunk_size": 512,
    "chunk_overlap": 64,
    "follow_links": true,
    "max_followed_links": 50
}
```

#### Pagination (Optional)

- `max_pages`: Maximum number of pages to process per start URL (default: 1 = pagination disabled). The actor clicks the "next page" or "load more" control between pages. On "load more" pages only the newly appended content is analyzed, so you don't pay twice for the same items.
- `pagination_selector`: CSS selector of the pagination control. Leave empty for auto-detection (`rel=next` links, common button texts in English/Dutch, AI fallback).

#### Link Following / Crawl Mode (Optional)

- `follow_links`: Treat the start URLs as listing/category pages. The AI picks the links that lead to detail pages matching your instructions (e.g. individual product pages), visits each one, and extracts the data there instead of from the listing. Combine with `max_pages` to gather links across multiple listing pages first.
- `max_followed_links`: Maximum number of detail pages to visit per start URL (default: 10). Each visited detail page generates its own vision API calls.

#### Proxy (Optional)

- `proxyConfiguration`: Standard Apify proxy input. Use Apify Proxy (datacenter or residential) or your own proxies to access sites that block datacenter traffic.

#### Performance Parameters (Optional)

- `max_concurrent_screenshots`: Maximum number of screenshots to process simultaneously (default: 4)
- `screenshot_timeout`: Timeout in seconds for each screenshot analysis (default: 60)

#### Scrolling Options

- `has_infinite_scroll`: Enable intelligent infinite scrolling with content growth detection
- `above_fold_only`: Only capture content visible without scrolling

#### Other Options

- `save_screenshots`: Save screenshots to key-value store for debugging
- `handle_cookie_consent`: Automatically detect and click cookie consent buttons (default: true). Disable to speed up runs on pages without consent banners.
- `gemini_model`: Which Gemini model to use for extraction (default: `gemini-3.1-flash-lite`, the fastest and cheapest option). Choose `gemini-2.5-flash` or `gemini-2.5-pro` for harder pages.
- `device_type`: Choose between "desktop" or "mobile" viewport simulation
- `mobile_device_model`: Specific mobile device to emulate when using mobile device type

Here’s an example of an input configuration in JSON format:

```json
{
    "instructions": "Product name, Product price, SKU number, Product Dimensions",
    "start_urls": [
        "https://www.boontoon.com/metal-wall-hanging-of-lord-ganesha-divinity-and-elegance-bh-0848",
		"https://www.boontoon.com/circular-yellow-bag-with-floral-print-and-elephant-design-rja-0036",
		"https://www.ledlichtdiscounter.nl/1-fase-rail-connector-i-vorm-zwart.html"
    ],
    "max_concurrent_screenshots": 6,
    "screenshot_timeout": 60,
    "has_infinite_scroll": false,
    "above_fold_only": false,
    "device_type": "desktop"
}
```

And here is an example of a crawl-mode run: it opens a category page, follows up to 20 product links (gathering them across up to 3 listing pages), and extracts fixed columns from each product page through Apify Proxy:

```json
{
    "instructions": "Get the product title, the price and whether it is in stock",
    "start_urls": ["https://www.example-shop.com/category/rugs"],
    "follow_links": true,
    "max_followed_links": 20,
    "max_pages": 3,
    "output_fields": [
        { "name": "title", "type": "string" },
        { "name": "price", "type": "number", "description": "numeric price without currency symbol" },
        { "name": "in_stock", "type": "boolean" }
    ],
    "proxyConfiguration": { "useApifyProxy": true }
}
```

### Output

The output from this Actor is stored in a dataset. You can view this data in the Apify UI or download it in JSON, CSV or other formats.
Here is the example corresponding to the input example provided above:

```json
{
  "url": "https://www.boontoon.com/metal-wall-hanging-of-lord-ganesha-divinity-and-elegance-bh-0848",
  "data": {
    "Product name": "Metal Wall Hanging Of Lord Ganesha- Divinity And Elegance",
    "Product price": "₹ 470.00 /piece",
    "SKU number": "0",
    "Product Dimensions": "0"
  }
},
{
  "url": "https://www.boontoon.com/circular-yellow-bag-with-floral-print-and-elephant-design-rja-0036",
  "data": {
    "Product name": "Circular Yellow Bag With Floral Print And Elephant Design",
    "Product price": "₹ 350.00 /piece",
    "SKU number": "0",
    "Product Dimensions": "0"
  }
},
{
  "url": "https://www.ledlichtdiscounter.nl/1-fase-rail-connector-i-vorm-zwart.html",
  "data": {
    "Product name": "1-Fase rail connector - I-vorm - Zwart",
    "Product price": "€ 1,95",
    "SKU number": "PLX849640"
  }
}


```

In `chunks` output mode the dataset instead contains one row per embeddable chunk (see the **RAG chunks** dataset view):

```json
{
  "url": "https://docs.example.com/guide",
  "chunkIndex": 3,
  "headingPath": ["Getting Started", "Installation"],
  "text": "Installation\n\nRun `pip install example` to add the package. On first run it downloads the model weights...",
  "tokenCount": 118,
  "contentHash": "9f2c1e...c4",
  "meta": {
    "title": "Installation — Example Docs",
    "description": "How to install and configure Example.",
    "canonicalUrl": "https://docs.example.com/guide",
    "language": "en",
    "ogTitle": "Installation",
    "ogType": "article",
    "ogImage": "https://docs.example.com/og.png",
    "siteName": "Example Docs"
  }
}
```

Each row embeds cleanly on its own, and `headingPath` + `url` give you citations back to the source. Feed the dataset straight into a **LangChain**/**LlamaIndex** loader or a vector-DB ingestion job.

### How Can I Use the Data Extracted with AI Web Scraper?

- **Market Research:** Extract product information, pricing, and customer reviews for competitive analysis.
- **Content Aggregation:** Collect data for news aggregation, research, or blog content.
- **Financial Analysis:** Gather financial metrics and performance data from various financial websites.
- **E-commerce Intelligence:** Extract and monitor product and pricing information from online stores.
- **Lead Generation:** Collect relevant information for potential business opportunities.

### How Does the AI Web Scraper Work?

The AI Web Scraper combines advanced browser automation with Google's Gemini LLM to offer a cutting-edge solution for web scraping. This actor operates in multiple stages to ensure efficient, accurate, and flexible data extraction.

##### 1. **Input Configuration**

- **User Instructions:** The scraper accepts natural language instructions describing the data to extract, such as "product name, price, and dimensions."
- **Start URLs:** A list of URLs serves as the input target for scraping.

##### 2. **AI-Powered Element Detection**

- **Screenshot Analysis:** When provided multiple URLs of the same domain, only the first page is used to detect the elements. Consecutive URLs use CSS Selectors, preventing high LLM costs. The scraper takes a screenshot of the web page and uses the Gemini LLM to identify bounding boxes around relevant elements. This enables dynamic and adaptive data extraction without requiring hardcoded selectors.
- **Bounding Box Parsing:** The bounding box coordinates returned by the AI model are mapped to the DOM structure of the web page.

##### 3. **Intelligent Content Growth Detection**

- Instead of using fixed delays, the scraper waits for actual content growth after scrolling operations.
- Uses event-driven waits with timeout safeguards (max 3 seconds) to ensure optimal performance.
- Detects when pages have finished loading new content before proceeding with screenshot capture.

##### 4. **Selector Extraction**

- For each matched DOM element, the scraper generates a CSS selector and extracts its corresponding HTML content. This enables robust and reusable data extraction across similar pages.

##### 5. **Data Extraction**

- The scraper retrieves text or attributes (e.g., innerHTML, text) from elements identified by the selectors, ensuring the collected data aligns precisely with user instructions.

##### 6. **Output Formatting**

- Extracted data is structured in JSON format. Each record contains the URL of the scraped page and the extracted data, making it easy to integrate into various applications.

##### 7. **Domain Optimization**

- To enhance efficiency, the scraper caches selectors for domains it has processed. Subsequent pages from the same domain reuse these selectors, reducing the need for repeated AI analysis.

##### Key Features:

- **AI-Driven Flexibility:** Removes the need for predefined selectors by leveraging AI to dynamically identify elements.
- **Performance Optimized:** Concurrent processing, intelligent scrolling, and memory management for faster operation.
- **Robust Error Handling:** Comprehensive timeout handling, resource cleanup, and graceful error recovery.
- **Batch Processing:** Efficient data saving in batches to reduce API overhead and improve performance.
- **Memory Efficient:** Automatic cleanup of screenshots and resources to prevent memory accumulation.
- **Configurable Concurrency:** Adjustable concurrent processing limits to balance speed and API rate limits.
- **Bot Detection Avoidance:** Implements strategies like custom user agents and headless browsing to minimize detection.
- **Structured Outputs:** Outputs are clean and easy to use in JSON, CSV, or other formats.

##### Advantages of This Approach:

- **User-Friendly:** Natural language instructions make it accessible to non-technical users.
- **Highly Adaptable:** Capable of handling unknown or dynamically loaded page structures.
- **Performance Optimized:** Concurrent processing, intelligent waits, and memory management for faster operation.
- **Reliable:** Comprehensive error handling and timeout management ensure consistent operation.
- **Scalable:** Configurable concurrency and batch processing handle large scraping jobs efficiently.

### Integrations

This Actor integrates with other Apify platform components and other external services:

- **Webhooks:** Automatically notify you when the scraping is complete or send the data to another application.
- **API:** Control the Actor programmatically using the Apify API.
- **Cloud Services:** Use Apify integrations to automatically store the data in services like Google Sheets, Google Drive, Slack, and others.

### Scrape Any Web Data You Need with This Dynamic Scraper

This AI Web Scraper is your one-stop solution for scraping any data you need. Whether it's a product name, a price, a news headline, or a financial metric, this actor adapts to extract it by analyzing the context of your instructions.

### Not What You Need? Build Your Own!

If this actor doesn't exactly meet your needs, you can use one of the scraper templates available in Python, JavaScript, and TypeScript to get started or check out our open-source library [Crawlee](https://github.com/apify/crawlee).

You can also request a custom scraping solution from us.

### Your Feedback

Your feedback is valuable to us. If you have any suggestions or find a bug, please create an issue on the Actor's Issues tab in the Apify Console.

### FAQ

#### How much does AI Web Scraper cost?

This actor uses Apify's Pay-per-result pricing model. Apify also provides you with free monthly usage credits.

#### How can I use AI Web Scraper with the Apify API?

You can access the Apify API programmatically via RESTful HTTP endpoints or SDKs (apify-client NPM package for JavaScript, apify-client PyPI package for Python) to run, manage, and get the data out of any actor.

#### Is it legal to scrape data using the AI Web Scraper?

This actor only extracts data that is publicly available. Please ensure that you comply with the terms and conditions of websites you scrape, and you are responsible for ensuring your compliance with data privacy regulations such as GDPR.

# Actor input Schema

## `start_urls` (type: `array`):

Provide one or more URLs

## `instructions` (type: `string`):

Desired items to scrape in natural language. Example: 'product description and product price'. Required for the default 'items' output mode; ignored by 'chunks' mode except when following links, where it guides which links to follow.

## `output_mode` (type: `string`):

How results are shaped. 'items' (default) uses vision + Gemini to extract the fields you describe. 'chunks' turns the actor into a RAG loader: it reads each page's clean text and emits one dataset row per embeddable chunk (url, chunkIndex, headingPath, text, tokenCount, meta) — ready for LangChain / LlamaIndex and vector-DB ingestion. Chunks mode makes no vision/LLM calls, so it is fast and cheap.

## `chunk_size` (type: `integer`):

Target size of each chunk in tokens (only used in 'chunks' output mode). Token counts are approximate. Match this to your embedding model's context window.

## `chunk_overlap` (type: `integer`):

Approximate number of tokens of trailing context carried into the next chunk (only used in 'chunks' output mode). Overlap preserves continuity across chunk boundaries for better retrieval. Must be smaller than the chunk size.

## `output_fields` (type: `array`):

Define the exact output columns instead of letting the AI derive them from the instructions. Guarantees stable column names across runs and saves one LLM call. Array of objects, e.g. \[{"name": "price", "type": "number", "description": "numeric price without currency symbol"}]. Supported types: string, number, integer, boolean (default: string). Only "name" is required.

## `follow_links` (type: `boolean`):

Treat the start URLs as listing/category pages: the AI selects links that lead to detail pages matching your instructions (e.g. product pages) and extracts the data from each detail page instead of from the listing itself.

## `max_followed_links` (type: `integer`):

Maximum number of detail-page links to follow per start URL (only used when 'Follow links to detail pages' is enabled). Each visited detail page generates its own vision API calls.

## `max_pages` (type: `integer`):

Maximum number of pages to process per start URL by clicking 'next page' / 'load more' controls. Set to 1 to disable pagination. The control is auto-detected, or you can provide a CSS selector below.

## `pagination_selector` (type: `string`):

CSS selector of the 'next page' or 'load more' button/link. Leave empty to let the actor auto-detect it (rel=next links, common button texts, AI fallback).

## `proxyConfiguration` (type: `object`):

Use Apify Proxy or custom proxies to access sites that block datacenter traffic (Cloudflare, Akamai, etc.).

## `has_infinite_scroll` (type: `boolean`):

Enable if the page has infinite scrolling (loads more content as you scroll down)

## `above_fold_only` (type: `boolean`):

Only capture content visible without scrolling (above the fold)

## `save_screenshots` (type: `boolean`):

Save screenshots to key-value store for debugging purposes

## `handle_cookie_consent` (type: `boolean`):

Automatically detect and click cookie consent buttons. Disable to skip this step and speed up runs on pages without consent banners.

## `gemini_model` (type: `string`):

Gemini model used for extraction. Flash-Lite is the fastest and cheapest, Flash is more capable, Pro is the most capable but slowest and most expensive.

## `device_type` (type: `string`):

Choose viewport simulation type

## `mobile_device_model` (type: `string`):

Specific mobile device to emulate (only used when device type is mobile)

## `custom_viewport_width` (type: `integer`):

Custom viewport width in pixels (only used when mobile device model is 'Custom')

## `custom_viewport_height` (type: `integer`):

Custom viewport height in pixels (only used when mobile device model is 'Custom')

## `max_concurrent_screenshots` (type: `integer`):

Maximum number of screenshots to process simultaneously (higher values = faster but more resource intensive)

## `screenshot_timeout` (type: `integer`):

Timeout in seconds for each screenshot analysis (increase if screenshots are complex)

## Actor input object example

```json
{
  "start_urls": [
    "https://www.ikea.com/nl/nl/p/onsevig-vloerkleed-laagpolig-veelkleurig-60497078/",
    "https://www.ikea.com/nl/nl/p/vedbak-vloerkleed-laagpolig-lichtgrijs-40528900/"
  ],
  "instructions": "Give me the product price and product title",
  "output_mode": "items",
  "chunk_size": 512,
  "chunk_overlap": 64,
  "output_fields": [],
  "follow_links": false,
  "max_followed_links": 10,
  "max_pages": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "has_infinite_scroll": false,
  "above_fold_only": false,
  "save_screenshots": false,
  "handle_cookie_consent": true,
  "gemini_model": "gemini-3.1-flash-lite",
  "device_type": "desktop",
  "mobile_device_model": "iPhone 15",
  "custom_viewport_width": 393,
  "custom_viewport_height": 852,
  "max_concurrent_screenshots": 4,
  "screenshot_timeout": 60
}
```

# 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 = {
    "start_urls": [
        "https://www.ikea.com/nl/nl/p/onsevig-vloerkleed-laagpolig-veelkleurig-60497078/",
        "https://www.ikea.com/nl/nl/p/vedbak-vloerkleed-laagpolig-lichtgrijs-40528900/"
    ],
    "instructions": "Give me the product price and product title",
    "output_fields": [],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("eloquent_mountain/ai-web-scraper-extract-data-with-ease").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 = {
    "start_urls": [
        "https://www.ikea.com/nl/nl/p/onsevig-vloerkleed-laagpolig-veelkleurig-60497078/",
        "https://www.ikea.com/nl/nl/p/vedbak-vloerkleed-laagpolig-lichtgrijs-40528900/",
    ],
    "instructions": "Give me the product price and product title",
    "output_fields": [],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("eloquent_mountain/ai-web-scraper-extract-data-with-ease").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 '{
  "start_urls": [
    "https://www.ikea.com/nl/nl/p/onsevig-vloerkleed-laagpolig-veelkleurig-60497078/",
    "https://www.ikea.com/nl/nl/p/vedbak-vloerkleed-laagpolig-lichtgrijs-40528900/"
  ],
  "instructions": "Give me the product price and product title",
  "output_fields": [],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call eloquent_mountain/ai-web-scraper-extract-data-with-ease --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eloquent_mountain/ai-web-scraper-extract-data-with-ease"
        }
    }
}
```

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/nQ9afWemXjyb5fOLv/builds/VoUe5PEx2880yElNG/openapi.json
