# PagineGialle Scraper (`memo23/paginegialle-scraper`) Actor

Scrape paginegialle.it (Italian Yellow Pages): name, phone, email when listed, website, address, P.IVA, hours, rating. Keyword + city or a PagineGialle search/profile URL. HTTP only, no browser. JSON or CSV out. $5 per 1,000 listings.

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

## Pricing

from $5.00 / 1,000 listings

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

## PagineGialle Scraper

<p align="center"><img src="https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/logo-paginegialle.png" alt="PagineGialle Scraper logo" width="160" /></p>

Turn a PagineGialle search into structured Italian business rows: name, phone, email when listed, website, address, P.IVA, hours, rating, and profile link.

Keyword + city, or a paginegialle.it URL. JSON or CSV out.

This is **paginegialle.it** (Italiaonline). It is not [PagineBianche](https://www.paginebianche.it) (people), [PagesJaunes.fr](https://apify.com/memo23/pagesjaunes-scraper-cheerio), [Gelbe Seiten](https://apify.com/memo23/gelbeseiten-scraper), or [Yellow Pages US](https://apify.com/memo23/yellow-pages-us-scraper).

### Why Use This Scraper?

- Phone and address on the search card
- Profile pass for email, website, P.IVA, codice fiscale, weekday hours, reviews, and coordinates
- 25 businesses per page via `/p-2`, `/p-3`, …
- HTTP only. No browser

### Overview

Built for sales teams, agencies, and researchers who need Italian **business** leads from PagineGialle.

Every start type becomes **one dataset row per listing**. A keyword search and a `/{slug}` profile emit the same flat shape. Rows are de-duplicated by PagineGialle sede id.

### Supported Inputs

#### Search terms and locations

| Field | Example |
| --- | --- |
| `searchTerms` | `["ristoranti"]`, `["idraulico", "avvocato"]` |
| `locations` | `["Roma"]`, `["Milano"]`, `["Napoli"]` |

Every term is searched in every location. A term with no location is skipped.

#### URL types

| URL type | Pattern | Example |
| --- | --- | --- |
| Search | `/ricerca/{what}/{where}` | `https://www.paginegialle.it/ricerca/ristoranti/Roma` |
| Search page | `/ricerca/{what}/{where}/p-N` | `https://www.paginegialle.it/ricerca/ristoranti/Roma/p-2` |
| Profile | `/{slug}` | `https://www.paginegialle.it/ristorante-alla-rampa-roma` |

Search URLs paginate automatically (25 businesses per page). `?page=` is ignored by the site — use `/p-N`.

**Unsupported:** paginebianche.it people lookup, tuttocitta.it, pgcasa.it.

### Use Cases

| Audience | What they take from a run |
| --- | --- |
| Sales and outreach | Phone + website + email (when listed) by trade and city |
| Agencies | Cross-joined term × city lists in one dataset |
| Local SEO | Category, rating, and the PagineGialle profile URL |
| Researchers | P.IVA, hours, and coordinates for a trade in a city |

### How It Works

1. Cross-join `searchTerms` × `locations`, plus any paginegialle.it URLs.
2. Fetch the search page (25 businesses per page).
3. Page with `/p-N` in parallel, stopping at `maxItems` or `maxPages`.
4. Read name, phone, address, and category from the search card.
5. Optionally open the profile for email, website, P.IVA, hours, and reviews.
6. De-duplicate by sede id and push one row per business.

<p align="center"><img src="https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-paginegialle.png" alt="How the PagineGialle scraper turns a search into business rows" width="800" /></p>

### Input Configuration

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `searchTerms` | array | one of the start types | What you would type into PagineGialle |
| `locations` | array | with `searchTerms` | Italian city / comune |
| `startUrls` | array | one of the start types | Search or profile URL |
| `maxItems` | integer | no | Default 50. Free users capped at 50. |
| `scrapeDetails` | boolean | no | Default true. Email, P.IVA, hours, reviews. |
| `maxPages` | integer | no | Default 20. |
| `maxConcurrency` | integer | no | Default 5. |
| `proxy` | object | no | Default is Apify residential. Turn off only on a home IP. |

#### Example input

```json
{
  "searchTerms": ["ristoranti"],
  "locations": ["Roma"],
  "maxItems": 50
}
```

### Output Overview

One flat row per business. Contact and address fields sit at the top level. `searchTerm` tells you which input produced the row. Email is present only when PagineGialle publishes one on the profile.

### Output Samples

Search: ristoranti in Roma, with profile enrich.

```json
{
  "listingId": "70BBC0F8-BB8D-CC69-E050-020A3E7406FA",
  "name": "Alla Rampa",
  "phone": "06 6782621",
  "email": "info@allarampa.com",
  "website": "https://www.ristoranteallarampa.it/",
  "vatId": "01617361009",
  "taxId": "06785720589",
  "street": "Piazza Mignanelli, 18",
  "postalCode": "00187",
  "city": "Roma",
  "region": "Lazio",
  "latitude": 41.9053,
  "longitude": 12.4834,
  "hours": ["Mo 12:00 - 23:59"],
  "pagineGialleUrl": "https://www.paginegialle.it/ristorante-alla-rampa-roma"
}
```

### Key Output Fields

**Identity:** `listingId`, `slug`, `name`, `pagineGialleUrl`, `isPremium`

**Contact:** `phone`, `phones`, `fax`, `email`, `website`, `social`

**Place:** `address`, `street`, `postalCode`, `city`, `region`, `country`, `latitude`, `longitude`

**Company:** `vatId`, `taxId`, `paymentMethods`

**Directory:** `category`, `categories`, `rating`, `reviewCount`, `hours`, `description`, `images`, `logo`, `reviews`

**Provenance:** `searchTerm`, `scrapedAt`

### Pricing

| Event | When | Rate |
| --- | --- | --- |
| Actor start | Once per run, per GB of memory | $0.005 |
| Listing | Each unique business in the dataset | $0.005 ($5 / 1k) |
| Contact phone | Row has a phone | $0.002 |
| Contact email | Row has an email | $0.05 |

Phone and email are billed only when PagineGialle publishes that field. A miss is free. Email lives on the profile, so leave `scrapeDetails` on if you want inboxes.

### FAQ

**Will every row have an email?** No. Phone is common. Inbox is only on some profiles. Phone and email are billed as extra events only when the field is present.

**What does scrapeDetails add?** Email, website, P.IVA, codice fiscale, weekday hours, reviews, and coordinates. Phone and address are already on the search card.

**Do I need a proxy?** On Apify, yes — a residential proxy is the default because PagineGialle's WAF blocks many datacenter IPs. Local runs from a home IP can turn it off.

**Does it scrape PagineBianche?** No. Business listings on paginegialle.it only.

### Support

- Issues: [Actor Issues](https://console.apify.com/actors/Mt0M81lOcDuIPEv9h/issues)
- Author site: <https://muhamed-didovic.github.io/>
- Email: <muhamed.didovic@gmail.com>

### Additional Services

Bulk regione sweeps, scheduled refreshes, or a private API wrapper: <muhamed.didovic@gmail.com>

### Explore More Scrapers

Directory cousins: [local.ch](https://apify.com/memo23/local-ch-scraper), [Gelbe Seiten](https://apify.com/memo23/gelbeseiten-scraper), [Yellow Pages US](https://apify.com/memo23/yellow-pages-us-scraper), [Yellow Pages Canada](https://apify.com/memo23/yellowpages-ca-scraper), [Canada411](https://apify.com/memo23/canada411-scraper), and [PagesJaunes.fr](https://apify.com/memo23/pagesjaunes-scraper-cheerio). More actors on [memo23](https://apify.com/memo23) and [didovic](https://apify.com/didovic).

### 🤖 For AI Agents & LLM Apps

Compact reference for AI agents calling this actor via the [Apify MCP server](https://mcp.apify.com) or the Apify API (actor: `memo23/paginegialle-scraper`).

**Purpose:** Extract PagineGialle.it business listings (name, phone, email when listed, website, P.IVA, split address, hours) by keyword + city or URL.

**Minimal input:**

```json
{
  "searchTerms": ["ristoranti"],
  "locations": ["Roma"],
  "maxItems": 10
}
```

**Output:** one dataset row per business — `listingId`, `slug`, `name`, `phone`, `phones`, `fax`, `email`, `website`, `vatId`, `taxId`, `social`, `address`, `street`, `postalCode`, `city`, `region`, `country`, `latitude`, `longitude`, `category`, `categories`, `rating`, `reviewCount`, `hours`, `description`, `images`, `logo`, `reviews`, `paymentMethods`, `isPremium`, `pagineGialleUrl`, `searchTerm`, `scrapedAt`.

**Behaviors an agent should know:**

- Always set `maxItems`. Free users are capped at 50.
- `searchTerms` needs at least one entry in `locations`.
- `startUrls` work on their own (paginegialle.it only).
- Email is often empty and lives on the profile. Keep `scrapeDetails` true if you need it.
- Each listing is $0.005. A phone on the row is $0.002. An email is $0.05. Start is $0.005 per GB.
- Italy business directory only. Not PagineBianche.
- Cloud runs need the default residential proxy.

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Italiaonline S.p.A., PagineGialle, or Seat Pagine Gialle. All trademarks mentioned are the property of their respective owners.

The scraper reads publicly listed Italian business data from paginegialle.it. Users are responsible for ensuring their use complies with PagineGialle Terms of Service, applicable data-protection law (GDPR / Codice Privacy), and any contractual obligations of their own organization.

### SEO Keywords

paginegialle scraper, pagine gialle scraper, scrape paginegialle.it, Italian yellow pages scraper, paginegialle API, Italian business listings scraper, Italy phone email scraper, Roma leads scraper, Apify paginegialle, Italian restaurant leads, Milano business scraper, local SEO Italy data, paginegialle email scraper, Italian directory scraper

# Actor input Schema

## `searchTerms` (type: `array`):

What you would type into PagineGialle, e.g. <b>ristoranti</b>, <b>idraulico</b>, <b>avvocato</b>. One row per term. Every term is searched in every city below.

## `locations` (type: `array`):

Italian city or comune, e.g. <b>Roma</b>, <b>Milano</b>, <b>Napoli</b>.

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

Stop after this many unique businesses across the whole run. Free plan is capped at 50.

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

Examples: <code>https://www.paginegialle.it/ricerca/ristoranti/Roma</code> or <code>https://www.paginegialle.it/ristorante-alla-rampa-roma</code>.

## `scrapeDetails` (type: `boolean`):

Opens the profile for email, website, P.IVA, codice fiscale, weekday hours, reviews, and coordinates. Phone and address are already on the search card. Turn off to skip the extra events for email.

## `maxPages` (type: `integer`):

Each page is 25 businesses. Use /p-2, /p-3, …

## `maxConcurrency` (type: `integer`):

How many pages and profiles to load at the same time.

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

On by default. PagineGialle's WAF blocks many datacenter IPs; a residential proxy is how cloud runs get listings.

## Actor input object example

```json
{
  "searchTerms": [
    "ristoranti"
  ],
  "locations": [
    "Roma"
  ],
  "maxItems": 50,
  "scrapeDetails": true,
  "maxPages": 20,
  "maxConcurrency": 5,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "searchTerms": [
        "ristoranti"
    ],
    "locations": [
        "Roma"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/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 = {
    "searchTerms": ["ristoranti"],
    "locations": ["Roma"],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/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 '{
  "searchTerms": [
    "ristoranti"
  ],
  "locations": [
    "Roma"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call memo23/paginegialle-scraper --silent --output-dataset

```

## MCP server setup

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