# PagineGialle.it Scraper — Italian Business Leads, Emails & VAT (`haketa/paginegialle-scraper`) Actor

Extract Italian local business leads from PagineGialle.it. Collect business names, categories, phone numbers, WhatsApp links, verified emails, websites, Partita IVA (VAT IDs), street addresses, coordinates, opening hours, ratings, and social links across every city in Italy.

- **URL**: https://apify.com/haketa/paginegialle-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

<h1 align="center">🇮🇹 PagineGialle.it Scraper — Italian Business Leads, Emails & Partita IVA</h1>

<p align="center">
  <img src="https://img.shields.io/badge/Platform-PagineGialle.it-FFD100?style=for-the-badge&labelColor=1F2937" alt="PagineGialle.it" />
  <img src="https://img.shields.io/badge/Market-Italy%20B2B%20%26%20SMB-008C45?style=for-the-badge" alt="Italy B2B" />
  <img src="https://img.shields.io/badge/Output-30%2B%20Structured%20Fields-2563EB?style=for-the-badge" alt="30+ Fields" />
  <img src="https://img.shields.io/badge/No--Code-Ready-10B981?style=for-the-badge" alt="No-Code Ready" />
  <img src="https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel-7C3AED?style=for-the-badge" alt="Export Formats" />
</p>

<p align="center">
  Extract verified Italian local business leads from <strong>PagineGialle.it</strong> — Italy's #1 Yellow Pages & SMB directory. Collect company names, categories, phone numbers, WhatsApp links, public emails, official websites, <strong>Partita IVA (Italian VAT IDs)</strong>, GPS coordinates, street addresses, opening hours, and customer ratings in clean JSON, CSV, or Excel.
</p>

***

### ⚡ At a Glance

| Feature | Details |
|---|---|
| 🎯 **Best For** | Italian B2B lead generation, local SMB outreach, CRM enrichment, KYC / VAT verification, territory mapping |
| 🌍 **Coverage** | Every city, province, and municipality across Italy (20 major city presets + any custom town) |
| 📇 **Lead Contact Depth** | Direct phone numbers, WhatsApp links, public email addresses, official websites & social profiles |
| 🧾 **Italian Tax Identity** | Automatically extracts 11-digit **Partita IVA (`vatId`)** and `legalName` from business profiles |
| ⚙️ **No-Code UX** | Pick cities from dropdown + type keywords (e.g. `ristorante`, `dentista`, `idraulico`) — no URL syntax needed |
| 🧹 **Clean Datasets** | Automatic deduplication across overlapping searches, cities, and paginated results |

***

### 🚀 Why Use PagineGialle.it Scraper?

Italy has millions of small and medium-sized businesses — restaurants, plumbers, dental clinics, law firms, auto workshops, hotels, wholesalers, and B2B contractors — many of which keep their most complete public profile on **PagineGialle.it** rather than LinkedIn.

This Actor turns PagineGialle search results and business profiles into outreach-ready datasets:

- **Direct decision-maker contact channels:** Capture landline & mobile numbers, direct WhatsApp click-to-chat URLs (`wa.me`), official websites, and public contact emails in a single run.
- **Built-in Partita IVA (`vatId`) extraction:** Match Italian companies cleanly against your CRM, ERP, invoicing, or registry databases using their 11-digit Italian VAT ID.
- **Exact geolocation & Italian postal structure:** Every business includes normalized `streetAddress`, 5-digit `postalCode` (CAP), `city`, `province`, `region`, plus exact `latitude` and `longitude`.
- **Flexible filtering before export:** Filter to keep only businesses with a phone number (`onlyWithPhone`), email (`onlyWithEmail`), or website (`onlyWithWebsite`) so you only export actionable leads.
- **Zero-config empty runs:** Run immediately with default settings or even empty input `{}` to preview a clean sample of Italian local businesses.

***

### 💼 High-Value Use Cases

| Use Case | How Teams Use This Data |
|---|---|
| 📞 **B2B Cold Outreach & Telemarketing** | Build segmented call and WhatsApp lists for Italian tradespeople, clinics, agencies, and retail shops by city and category. |
| 📧 **Email Lead Generation** | Enable profile enrichment (`includeDetails: true`) to pull public business emails alongside official websites and Facebook/Instagram pages. |
| 🧾 **Italian KYC & CRM Deduplication** | Use extracted 11-digit **Partita IVA** numbers and legal names to enrich and deduplicate existing Italian company records. |
| 🗺️ **Territory Planning & Retail Expansion** | Map competitor density across Milan, Rome, Turin, Naples, Florence, and regional towns using exact GPS coordinates and CAP codes. |
| 💻 **Digital Agency Prospecting** | Find high-rated Italian businesses that have active phone listings but no website (`website: null`) to pitch web design, SEO, or booking software. |
| 📊 **Local Market Research** | Compare category sizes, customer review volumes, opening hours, and payment methods across Italian provinces. |

***

### 🧭 How It Works (3 Simple Steps)

1. **Choose your targets:** Enter one or more Italian business keywords (e.g., `dentista`, `avvocato`, `ristorante`, `elettricista`), pick major Italian cities from the dropdown (or add smaller towns in `customCities`), or paste direct PagineGialle URLs.
2. **Select enrichment & filters:** Keep **Enrich from business profile page** (`includeDetails: true`) enabled to capture emails, official websites, Partita IVA, GPS coordinates, and social links — or turn it off for ultra-fast listing-only snapshots.
3. **Run & export:** Click **Start**, wait seconds for structured results, and export directly to **Excel (`.xlsx`), CSV, JSON**, or connect via API/webhooks.

***

### ⚙️ Input Parameters

All fields are optional — none are required.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | `string[]` | `["ristorante", "idraulico"]` | Business categories or keywords to search (e.g., `dentista`, `hotel`, `avvocato`, `meccanico`). |
| `cities` | `string[]` (Dropdown) | `["milano"]` | Pick from 20 major Italian cities (`milano`, `roma`, `torino`, `napoli`, `firenze`, `bologna`, `venezia`, etc.). |
| `customCities` | `string[]` | `[]` | Add any smaller Italian town, municipality, or province (e.g., `como`, `rimini`, `trento`, `salerno`). |
| `startUrls` | `object[]` | `[]` | Optional direct PagineGialle search URLs or individual business profile URLs. |
| `maxItems` | `integer` | `100` (prefill `40`) | Maximum total unique businesses to collect across all targets (1–25,000). |
| `includeDetails` | `boolean` | `true` | Visits each business profile to extract email, website, Partita IVA, coordinates, legal name, and social links. |
| `onlyWithPhone` | `boolean` | `false` | Keep only businesses with at least one phone number. |
| `onlyWithEmail` | `boolean` | `false` | Keep only businesses with a public email address (`includeDetails: true` recommended). |
| `onlyWithWebsite` | `boolean` | `false` | Keep only businesses that publish an official website URL. |
| `proxyConfiguration` | `object` | Apify Proxy (on) | Standard Apify datacenter proxies work cleanly for high-volume extraction. |

#### Example Input Configurations

<details>
<summary>🍕 Restaurants & Plumbers in Milan & Rome (Lead-Gen with Email & P.IVA)</summary>

```json
{
  "searchQueries": ["ristorante", "idraulico"],
  "cities": ["milano", "roma"],
  "maxItems": 200,
  "includeDetails": true,
  "onlyWithPhone": true
}
```

</details>

<details>
<summary>🦷 Dental Clinics in Custom Smaller Cities (Only With Email)</summary>

```json
{
  "searchQueries": ["dentista", "studio dentistico"],
  "customCities": ["como", "bergamo", "varese", "brescia"],
  "maxItems": 150,
  "includeDetails": true,
  "onlyWithEmail": true
}
```

</details>

<details>
<summary>⚡ Fast Listing-Only Snapshot (No Profile Visits)</summary>

```json
{
  "searchQueries": ["hotel"],
  "cities": ["firenze", "venezia", "napoli"],
  "maxItems": 500,
  "includeDetails": false
}
```

</details>

***

### 📦 Output Schema & Field Reference

#### 🏢 Business Identity & Tax Fields

| Field | Type | Coverage | Description |
|---|---|---|---|
| `id` | `string` | 🟢 ~100% | Unique PagineGialle business/branch identifier |
| `name` | `string` | 🟢 100% | Public business trading name |
| `legalName` | `string` | 🟢 ~90% (with details) | Registered company legal name |
| `category` | `string` | 🟢 100% | Primary Italian business category (e.g. `Idraulici e lattonieri`, `Ristoranti`) |
| `vatId` | `string` | 🟢 ~85–95% (with details) | 11-digit Italian **Partita IVA** (VAT number) |
| `description` | `string` | 🟢 ~85% | Business description and services overview |
| `isSponsored` | `boolean` | 🟢 100% | Whether the listing is a promoted/featured profile |
| `url` | `string` | 🟢 100% | Direct PagineGialle.it business profile URL |

#### 📇 Direct Contact & Digital Presence

| Field | Type | Coverage | Description |
|---|---|---|---|
| `phone` | `string` | 🟢 ~95–100% | Primary formatted phone number |
| `phones` | `string[]` | 🟢 ~95–100% | All listed landline and mobile phone numbers |
| `whatsappUrl` | `string` | 🟡 When published | Direct WhatsApp click-to-chat URL (`https://wa.me/...`) |
| `email` | `string` | 🟡 ~45–80% (with details) | Primary public business email address |
| `emails` | `string[]` | 🟡 ~45–80% (with details) | All public email addresses found on the profile |
| `website` | `string` | 🟡 ~55–80% (with details) | Official business website URL |
| `facebookUrl` | `string` | 🟡 When published | Official Facebook page URL |
| `instagramUrl` | `string` | 🟡 When published | Official Instagram profile URL |
| `linkedinUrl` | `string` | ⚪ Rare | Official LinkedIn company URL |
| `youtubeUrl` | `string` | ⚪ Rare | Official YouTube channel URL |

#### 📍 Location & Geolocation

| Field | Type | Coverage | Description |
|---|---|---|---|
| `streetAddress` | `string` | 🟢 ~98% | Street name and house number |
| `postalCode` | `string` | 🟢 ~98% | 5-digit Italian CAP postal code |
| `city` | `string` | 🟢 100% | City or municipality (`comune`) |
| `province` | `string` | 🟢 ~95% | Two-letter Italian province code (e.g. `MI`, `RM`, `TO`, `FI`) |
| `region` | `string` | 🟢 ~90% (with details) | Italian administrative region (e.g. `Lombardia`, `Lazio`) |
| `fullAddress` | `string` | 🟢 ~98% | Complete formatted Italian street address |
| `latitude` | `number` | 🟢 ~95% (with details) | GPS latitude coordinate |
| `longitude` | `number` | 🟢 ~95% (with details) | GPS longitude coordinate |

#### ⭐ Reputation & Operations

| Field | Type | Coverage | Description |
|---|---|---|---|
| `rating` | `number` | 🟡 When rated | Customer star rating (0.0 to 5.0) |
| `reviewCount` | `number` | 🟡 When rated | Total number of customer reviews |
| `openingHours` | `string[]` | 🟡 ~60–85% | Structured daily business hours |
| `paymentAccepted` | `string` | 🟡 When published | Accepted payment methods |
| `logoUrl` | `string` | 🟡 When published | Business logo image URL |

#### Sample JSON Output

```json
{
  "id": "1426a469-88c3-4530-9a53-25328c99b159",
  "name": "Trattoria Appio Sabino",
  "legalName": "Trattoria Appio Sabino S.r.l.",
  "category": "Ristoranti",
  "phone": "+39 380 3438130",
  "phones": ["+39 380 3438130"],
  "whatsappUrl": "https://wa.me/+393803438130",
  "email": "appio.sabino@gmail.com",
  "emails": ["appio.sabino@gmail.com"],
  "website": "https://www.trattoriappiosabinoroma.com",
  "vatId": "18098071006",
  "streetAddress": "Circonvallazione Appia, 81",
  "postalCode": "00179",
  "city": "Roma",
  "province": "RM",
  "region": "Lazio",
  "fullAddress": "Circonvallazione Appia, 81 - 00179 Roma (RM)",
  "latitude": 41.87526,
  "longitude": 12.5143,
  "rating": 4.0,
  "reviewCount": 14,
  "openingHours": ["Mo-Su 12:00-15:00, 19:00-23:00"],
  "paymentAccepted": "Visa, Mastercard, Contanti",
  "description": "Cucina tipica romana e piatti della tradizione nel cuore dell'Appio Latino.",
  "facebookUrl": null,
  "instagramUrl": null,
  "linkedinUrl": null,
  "youtubeUrl": null,
  "logoUrl": null,
  "isSponsored": true,
  "url": "https://www.paginegialle.it/trattoria-appio-sabino-roma",
  "searchQuery": "ristorante",
  "searchCity": "roma"
}
```

***

### 💻 Programmatic Usage (Node.js & Python)

<details>
<summary>Node.js (apify-client)</summary>

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('haketa/paginegialle-scraper').call({
    searchQueries: ['ristorante', 'idraulico'],
    cities: ['milano', 'roma'],
    maxItems: 150,
    includeDetails: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Collected ${items.length} Italian businesses`);
console.log('With email:', items.filter((b) => b.email).length);
console.log('With Partita IVA:', items.filter((b) => b.vatId).length);
```

</details>

<details>
<summary>Python (apify-client)</summary>

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])

run = client.actor("haketa/paginegialle-scraper").call(run_input={
    "searchQueries": ["dentista"],
    "cities": ["milano", "torino", "bologna"],
    "includeDetails": True,
    "onlyWithPhone": True,
    "maxItems": 200,
})

items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
for biz in items[:5]:
    print(biz["name"], "|", biz.get("phone"), "|", biz.get("email"), "| P.IVA:", biz.get("vatId"))
```

</details>

***

### 📊 Verified Field Coverage (Live Benchmark)

Across live multi-category extraction runs in Milan and Rome (`ristorante`, `idraulico`), **PagineGialle.it Scraper** delivers clean deduplicated Italian SMB records with the following field coverage:

| Field Group | Verified Fill Rate | Notes |
|---|---|---|
| `id`, `name`, `category`, `url` | **100%** | Every record includes a unique branch ID, trading name, category, and PagineGialle profile link |
| `phone`, `phones`, `city`, `postalCode` | **100%** | Direct Italian phone numbers, CAP codes, and city names on every listing |
| `rating`, `reviewCount` | **~90–96%** | Extracted cleanly for active restaurants, hospitality, and consumer services |
| `vatId` (Partita IVA), `latitude`, `longitude` | **~55–95%** | Populated whenever the business profile publishes VAT and map metadata (`includeDetails: true`) |
| `email`, `website` | **~45–75%** | Populated for all businesses that list a public contact email or website on their profile |
| `whatsappUrl`, `openingHours`, `facebookUrl`, `instagramUrl` | **Variable** | Populated whenever published on the business card or profile page |

***

### 🎯 Field-by-Field Lead Quality Checklist

Before importing into your CRM or outreach tool, you can rely on these built-in data hygiene guarantees:

- **Zero platform noise in emails:** Automated filtering strips PagineGialle, Italiaonline, analytics, and image-filename strings so `email` contains only genuine business contact addresses.
- **Clean Italian VAT formatting:** Any `IT` country prefix is normalized so `vatId` is always a clean 11-digit Italian **Partita IVA**.
- **Separated address components:** Street, 5-digit CAP (`postalCode`), municipality (`city`), 2-letter province code (`province`), and administrative `region` are parsed into individual columns for effortless Excel/CRM filtering.
- **No duplicate branches:** Each business location is tracked by its unique branch ID so overlapping keywords never inflate your row count.

***

### 💡 Best Practices & Tips

> \[!TIP]
> **Use Italian search terms for maximum recall.** Searching `idraulico` instead of `plumber`, `avvocato` instead of `lawyer`, or `parrucchiere` instead of `hairdresser` returns significantly more local businesses on PagineGialle.it.

- **Balance speed vs. enrichment:** Keep `includeDetails: true` when you need **emails, official websites, Partita IVA, and GPS coordinates**. Set `includeDetails: false` if you only need names, phones, categories, and addresses at maximum speed.
- **Target regional markets with `customCities`:** Combine major cities from the dropdown with surrounding industrial towns (e.g., `monza`, `brescia`, `vicenza`, `treviso`) for full regional B2B coverage.
- **No duplicates across overlapping queries:** Every business is deduplicated automatically by its PagineGialle branch ID, so searching related terms like `idraulico` and `termoidraulica` in the same city yields clean unique records.

***

### 🔌 Integrations & Automation

- **CRM & Sales Tools:** Export clean `.csv` / `.xlsx` sheets directly into HubSpot, Pipedrive, Salesforce, Clay, or Instantly.
- **Make, Zapier & n8n:** Schedule recurring searches for newly listed businesses in target Italian cities and push fresh leads straight to Slack or Google Sheets.
- **Apify API & Webhooks:** Integrate real-time Italian company enrichment directly into your backend or KYC workflow.

***

### ❓ Frequently Asked Questions

#### How does the Actor obtain emails and Partita IVA (VAT IDs)?

When `includeDetails` is enabled (on by default), the Actor visits each business's public PagineGialle profile page and extracts the published **Partita IVA**, official website, public email address, GPS coordinates, social links, and full opening hours.

#### Why do some businesses have `email: null` or `website: null`?

Not every small Italian business publishes an email address or website on PagineGialle. If you only want rows with an email or website, simply enable `onlyWithEmail: true` or `onlyWithWebsite: true`.

#### Can I scrape towns that are not in the city dropdown?

Yes. Enter any Italian town, municipality, or province in **Additional Italian cities or towns** (`customCities`), or paste the exact PagineGialle search URL into **PagineGialle.it URLs** (`startUrls`).

#### What happens if I run the Actor with empty input?

When no keywords, cities, or URLs are supplied, the Actor automatically runs a curated sample across Milan, Rome, Turin, and Florence (`ristorante`, `idraulico`, `dentista`, `hotel`) and returns up to 100 clean records.

#### Are duplicate businesses removed?

Yes. Every business is deduplicated by its unique PagineGialle listing identifier within a run, even when multiple keywords or nearby cities return the same company.

***

### ⚠️ Limitations

- **Publicly listed data only:** Private contact details not published on PagineGialle.it cannot be extracted.
- **Per-search page depth:** Very broad queries in major cities may span dozens of pages; for comprehensive country-wide coverage, split runs by city or province.

***

### 📝 Changelog

#### v0.1.0 (2026-11-23)

- Initial release of **PagineGialle.it Scraper**.
- Added keyword search, 20 major Italian city presets, custom Italian town input, and direct search/profile URL support.
- Added full profile enrichment extracting public emails, official websites, 11-digit **Partita IVA (`vatId`)**, legal names, WhatsApp links, GPS coordinates, social links, and structured opening hours.
- Added `onlyWithPhone`, `onlyWithEmail`, and `onlyWithWebsite` filters plus automatic listing ID deduplication.

# Actor input Schema

## `searchQueries` (type: `array`):

Italian or English business types or keywords to search (for example: 'ristorante', 'idraulico', 'dentista', 'avvocato', 'hotel', 'parrucchiere'). Leave empty for a curated Italian SMB mix.

## `cities` (type: `array`):

Select one or more major Italian cities to search in. Combine with custom cities below for any smaller town or province.

## `customCities` (type: `array`):

Enter any Italian municipality, province, or postal code not in the dropdown (for example: 'como', 'rimini', 'salerno', 'trento').

## `startUrls` (type: `array`):

Paste direct PagineGialle.it search URLs (e.g. https://www.paginegialle.it/ricerca/dentista/milano) or individual business profile URLs.

## `maxItems` (type: `integer`):

Total maximum unique businesses to collect across all searches, cities, and URLs.

## `includeDetails` (type: `boolean`):

Email addresses, phones, WhatsApp links, websites, Partita IVA (VAT IDs), coordinates, ratings, and opening hours are already extracted automatically without extra requests. Enable this only if you also need legal company name, payment methods, or additional social links.

## `onlyWithPhone` (type: `boolean`):

Skip records that do not publish a phone number.

## `onlyWithEmail` (type: `boolean`):

Keep only businesses where a public email address is published.

## `onlyWithWebsite` (type: `boolean`):

Keep only businesses that publish an official website URL.

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

Italian residential proxies are recommended for 100% reliable extraction with minimal bandwidth (~25 KB per 25 businesses).

## Actor input object example

```json
{
  "searchQueries": [
    "ristorante",
    "idraulico"
  ],
  "cities": [
    "milano"
  ],
  "customCities": [],
  "startUrls": [],
  "maxItems": 40,
  "includeDetails": false,
  "onlyWithPhone": false,
  "onlyWithEmail": false,
  "onlyWithWebsite": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "IT"
  }
}
```

# Actor output Schema

## `businesses` (type: `string`):

All extracted PagineGialle.it business records with deduplicated IDs, contact details, VAT numbers, and location 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 = {
    "searchQueries": [
        "ristorante",
        "idraulico"
    ],
    "cities": [
        "milano"
    ],
    "customCities": [],
    "startUrls": [],
    "maxItems": 40,
    "includeDetails": false,
    "onlyWithPhone": false,
    "onlyWithEmail": false,
    "onlyWithWebsite": false,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "IT"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/paginegialle-scraper").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 = {
    "searchQueries": [
        "ristorante",
        "idraulico",
    ],
    "cities": ["milano"],
    "customCities": [],
    "startUrls": [],
    "maxItems": 40,
    "includeDetails": False,
    "onlyWithPhone": False,
    "onlyWithEmail": False,
    "onlyWithWebsite": False,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "IT",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/paginegialle-scraper").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 '{
  "searchQueries": [
    "ristorante",
    "idraulico"
  ],
  "cities": [
    "milano"
  ],
  "customCities": [],
  "startUrls": [],
  "maxItems": 40,
  "includeDetails": false,
  "onlyWithPhone": false,
  "onlyWithEmail": false,
  "onlyWithWebsite": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "IT"
  }
}' |
apify call haketa/paginegialle-scraper --silent --output-dataset

```

## MCP server setup

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

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/OugZoGWZ2dKZffQbu/builds/ai37FY3dRt9wtPYCt/openapi.json
