# Páginas Amarillas Spain (Yellow Pages) Business Scraper (`confidential_gnat/paginasamarillas-business-scraper`) Actor

Scrape business listings from Páginas Amarillas Spain (paginasamarillas.es): name, phone numbers, address, postal code, city, website, category, coordinates, logo, description, brands and opening info. Search by activity and city, or paste search, category or business URLs.

- **URL**: https://apify.com/confidential_gnat/paginasamarillas-business-scraper.md
- **Developed by:** [ActorFlow](https://apify.com/confidential_gnat) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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

## Páginas Amarillas Spain (Yellow Pages) Business Scraper

**Scrape business listings from Páginas Amarillas Spain (paginasamarillas.es)**, the Spanish yellow pages, and get **phone numbers**, addresses, postal codes, websites, categories, GPS coordinates, opening hours, ratings, branch locations and more for every company. Type an activity and a city (for example *fontaneros* in *Madrid*) or paste a search, category, branch-list or business URL, press Start, and export the **Spanish business leads** as JSON, CSV or Excel, or call the actor as an **API**. Repeat runs skip businesses you already scraped, so monitoring new Spanish companies in a sector stays cheap.

**Target website:** [paginasamarillas.es](https://www.paginasamarillas.es)

### ✨ Features of this Páginas Amarillas business scraper

- **Business listing extraction** — name, category, activities, description, phone numbers, website, full address, province, coordinates, logo, rating and review count.
- **Phone numbers without clicking "Ver teléfono"** — the site hides the number behind a button, but it is already in the page data, so the scraper returns it for every result, even with business pages turned off.
- **Business page details** — opening hours, payment methods, cuisines (restaurants), brands, technical service brands, gallery photos, years advertising on Páginas Amarillas and additional info.
- **Branch locations** — every other branch of a company with its own page URL, address, coordinates and phone number, or paste a branch-list URL to scrape all branches as separate businesses.
- **Search by activity and city** — enter activities such as dentistas or abogados and an optional city; leave the city empty to search all of Spain.
- **Pagination support** — follows the result pages until your limit is reached or the results run out.
- **Proxy support** — uses Apify datacenter proxy by default, which the site requires.
- **New businesses only (cache)** — a cache project name skips businesses scraped in earlier runs, so scheduled runs fetch and pay for new ones only.
- **No browser required** — plain HTTP requests keep runs fast and cheap.

### 🚀 How to scrape Páginas Amarillas business data in 5 steps

1. [Sign up](https://apify.com/sign-up) for a free Apify account — includes **$5 monthly credit**.
2. Open the actor page and click **Try for free**.
3. Fill in the **Input** fields (a search term or a start URL is required).
4. Click **Start** and wait for the run to complete.
5. Download results from the **Output** tab in JSON, CSV, or Excel format.

You can also run this actor via the [Apify API](https://docs.apify.com/api/v2) or integrate it directly into your workflows using [Zapier](https://zapier.com/apps/apify), [Make](https://www.make.com/), or [n8n](https://n8n.io/).

### 💰 Pricing

This actor uses **pay-per-result** billing based on the compute units a run consumes.

- New Apify accounts include **$5 of free monthly credit**.
- It works over plain HTTP requests without a browser, so it costs significantly less to run than browser-based scrapers.
- Set a **Cache project name** on scheduled runs: businesses you already scraped are skipped and not charged (see below).
- Turning off **Scrape business pages** makes runs even cheaper (one request per 30 businesses instead of one per business).

### 🔧 Input configuration

| Field | Type | Required | Default | Description |
| ----- | ---- | -------- | ------- | ----------- |
| `startUrls` | array | — | `[]` (prefilled with a fontaneros in Madrid search) | Search URLs, category pages (`/a/fontaneros/`), branch lists (`/c/name/id/1`) or business pages (`/f/.../name_id.html`). |
| `scrapeDetails` | boolean | — | `true` | Open every business page for all phone numbers, full description, opening hours, brands, photos and other branch locations. Phone numbers and coordinates are returned even when this is off. |
| `maxItems` | integer | — | `5` | Maximum unique businesses saved for each search term or search URL. |
| `cacheProjectName` | string | — | — | Same name on each scheduled run returns only new businesses; cached ones are skipped, not charged and not counted. Records get `changeType: new`. |
| `maxConcurrency` | integer | — | `5` | Maximum number of pages fetched in parallel. |
| `proxyConfiguration` | object | — | `{ "useApifyProxy": true }` | Proxy settings. The site blocks requests without a proxy; datacenter proxy works. |
| `searchTerms` | array | — | `[]` | Business activities to search for, for example fontaneros, dentistas, abogados laboralistas. Each term is searched separately. |
| `location` | string | — | — | City or town to search in. Leave empty to search all of Spain. Only used together with search terms; start URLs ignore it. |

In the Console, the search terms and location sit in the collapsible **Search by keyword and location** section. They are optional and only needed when you do not paste URLs; the location applies to the search terms only, never to start URLs.

**How the cache saves money:**

With **Scrape business pages** on, every business costs one extra page request on top of the search request. Without a cache, a daily run over the same search opens the same business pages again and pays for each result every time. With a **Cache project name**:

- The actor remembers every business it has saved in a key-value store named after your project, and keeps it between runs.
- Each run still reads the search result pages, which are cheap and hold about 30 businesses each. Businesses already in the cache are dropped right there, before their page is requested.
- Skipped businesses cost no page request and no result charge, and they do not count towards **Max items per search**. The limit is spent only on new businesses.
- A business URL you paste is skipped too if it is already cached.

For example, a search with 600 plumbers that gets 15 new ones a week pays for 15 results and 15 business pages on the next run instead of 600 of each.

Use a different project name per search you track, because each name has its own memory. A cached business is not scraped again, so later phone or address changes on it are not picked up.

**Supported URL types:**

- Search: `https://www.paginasamarillas.es/search/fontaneros/all-ma/madrid/all-is/madrid/all-ba/all-pu/all-nc/1`
- Category: `https://www.paginasamarillas.es/a/fontaneros/` (searched across all of Spain)
- Business page: `https://www.paginasamarillas.es/f/madrid/asistencia-hogar-24h_8DdsfCdjkf.html`
- Branch list ("Ver más direcciones" of a business): `https://www.paginasamarillas.es/c/yavoi-reparaciones/0012400000f1QsUAAU/1?la=40.429167938&lo=-3.678244907`

### 📦 Páginas Amarillas scraper output data

Each business is one JSON record with the fields `id`, `url`, `name`, `category`, `activities`, `description`, `about`, `phone`, `phones`, `website`, `address`, `streetAddress`, `postalCode`, `city`, `province`, `latitude`, `longitude`, `logoUrl`, `rating`, `reviewCount`, `isAdvertiser`, `isFeatured`, `adId`, `advertiserId`, `openingHours`, `paymentMethods`, `cuisines`, `additionalInfo`, `brands`, `technicalService`, `images`, `yearsOnDirectory`, `otherLocations`, `position`, `scrapedAt`, `searchUrl` and, with a cache, `changeType`. `phone` and `phones` come from the data the site already puts in the page behind its "Ver teléfono" button, so they are filled even without opening each business page. `otherLocations` lists the branches of a chain with their own page URL, address, coordinates and phone, `technicalService` the brands serviced, `images` the gallery photos and `yearsOnDirectory` how many years the business has advertised on Páginas Amarillas. The dataset has 1 view: **Overview**, a compact table with the id, name, category, phone, website, address, city, province, coordinates, change type and URL.

**Output at a glance:**

| Name | Category | Phone | Postal code | City | Lat, Lng |
| ---- | -------- | ----- | ----------- | ---- | -------- |
| [Yavoi Reparaciones](https://www.paginasamarillas.es/f/madrid/yavoi-reparaciones_0niALSBbef.html) | Multiservicios: empresas | 696376485 | 28001 | Madrid | 40.429, -3.678 |
| [Reparaciones Inmediatas NCL](https://www.paginasamarillas.es/f/madrid/reparaciones-inmediatas-ncl_vlZrGXRSxu.html) | Multiservicios: empresas | 910494507 | 28028 | Madrid | 40.422, -3.669 |
| [Fcn Funciona Reparaciones](https://www.paginasamarillas.es/f/madrid/fcn-funciona-reparaciones_3cIOHAO3zI.html) | Multiservicios: empresas | 686024167 | 28001 | Madrid | 40.430, -3.678 |
| [Servi OK](https://www.paginasamarillas.es/f/madrid/servi-ok_0gkelYA7UR.html) | Multiservicios: empresas | 628781790 | 28041 | Madrid | 40.374, -3.719 |
| [ASISTENCIA HOGAR 24H](https://www.paginasamarillas.es/f/madrid/asistencia-hogar-24h_8DdsfCdjkf.html) | Multiservicios: empresas | 910553918 | 28002 | Madrid | 40.441, -3.673 |

**Sample output (raw JSON):**

```json
{
    "id": "0niALSBbef",
    "url": "https://www.paginasamarillas.es/f/madrid/yavoi-reparaciones_0niALSBbef.html",
    "name": "Yavoi Reparaciones",
    "category": "Multiservicios: empresas",
    "activities": ["Multiservicios: empresas"],
    "description": "Trabajos rápidos 24h/365d. Ahora con descuento especial.Unidades móviles en capital y provincia muy cerca de ti.SABEMOS REPARARLO. 35 años son la mejor garantía.",
    "about": "Información general:\nTrabajos Rápidos 24H/365D. Unidades móviles en capital y provincia muy cerca de ti. SABEMOS REPARARLO. 35 años son la mejor garantía.\n...",
    "phone": "696376485",
    "phones": ["696376485", "913096393"],
    "website": "http://www.yavoi.net/POSNAC/GENERICO/",
    "address": "Calle Gral. Pardiñas, 58, 28001, Madrid",
    "streetAddress": "Calle Gral. Pardiñas, 58",
    "postalCode": "28001",
    "city": "Madrid",
    "province": "Madrid",
    "latitude": 40.429167938,
    "longitude": -3.678244907,
    "logoUrl": "https://multimedia.paginasamarillas.es/adsContentSrv/20455390-0-0niALSBbef/7fc9dae9-1e5d-4ee3-bf56-9ab1925dd403/yavoireparaciones.png",
    "rating": null,
    "reviewCount": null,
    "isAdvertiser": true,
    "isFeatured": true,
    "adId": "S00627932_000",
    "advertiserId": "GReEW2So3FYL",
    "openingHours": null,
    "paymentMethods": null,
    "cuisines": null,
    "additionalInfo": ["Horario continuo: 24 HORAS"],
    "brands": ["ELCO", "SUPERSER"],
    "technicalService": ["EDESA", "FAGOR", "JUNKERS", "MIELE", "TEKA", "ZANUSSI", "BOSCH"],
    "images": ["https://multimedia.paginasamarillas.es/adsContentSrv/20455390-0-0niALSBbef/f29702f8-9151-43f2-8901-47b30414dcac/LOGOLISTA.jpg"],
    "yearsOnDirectory": 20,
    "otherLocations": [
        {
            "id": "DCp1aLxvXr",
            "url": "https://www.paginasamarillas.es/f/puig/yavoi-reparaciones_DCp1aLxvXr.html",
            "name": "Yavoi Reparaciones",
            "address": "Calle Miguel Servet, 92 , 46540 Puig, VALENCIA",
            "phone": "963173320",
            "latitude": 39.591544498,
            "longitude": -0.306588078
        }
    ],
    "position": 2,
    "scrapedAt": "2026-10-15T13:32:57.453Z",
    "searchUrl": "https://www.paginasamarillas.es/search/fontaneros/all-ma/all-pr/all-is/madrid/all-ba/all-pu/all-nc/1"
}
```

A restaurant page also fills `rating` (e.g. `4`), `reviewCount`, `openingHours` (e.g. `["Mo 12:00-00:00", ...]`), `paymentMethods` (e.g. `["Visa", "Paypal"]`) and `cuisines` (e.g. `["Cocina gallega"]`).

### 🐍 How to scrape Páginas Amarillas with Python, JavaScript or the API

Run the actor programmatically with the official Apify clients. Replace `<YOUR_API_TOKEN>` with the token from your [Apify Console](https://console.apify.com/account/integrations).

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run = client.actor("confidential_gnat/paginasamarillas-business-scraper").call(run_input={
    "searchTerms": ["fontaneros"],
    "location": "Madrid",
    "maxItems": 50,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**JavaScript** (`npm install apify-client`):

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

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const run = await client.actor('confidential_gnat/paginasamarillas-business-scraper').call({
    searchTerms: ['fontaneros'],
    location: 'Madrid',
    maxItems: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**cURL** — start a run and wait for the dataset:

```bash
curl -X POST "https://api.apify.com/v2/acts/confidential_gnat~paginasamarillas-business-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["fontaneros"], "location": "Madrid", "maxItems": 50}'
```

### 💡 What you can use Páginas Amarillas business data for

- B2B lead generation: build phone and website lists of Spanish businesses by activity and city.
- Sales territory planning with postal codes, provinces and GPS coordinates.
- Local market research: count and map competitors in a sector or town.
- Enriching a CRM with phone numbers, websites, opening hours and categories.
- Monitoring newly listed businesses in a sector with scheduled, cached runs.

Sales teams, marketing agencies, lead-generation services and market researchers working on the Spanish market use this data in sectors such as home services, legal, healthcare and hospitality.

### ⚠️ Limitations & known issues

- **No email addresses** — Páginas Amarillas does not publish business emails; contact goes through an on-site form.
- **Phone numbers** — the number behind the "Ver teléfono" button is read from the page data. A few results have no map marker and then only get a phone from their business page, so keep **Scrape business pages** on for the most complete phone lists.
- **Sponsored results** — the site mixes sponsored businesses from other activities or cities into results; they are kept as the site shows them.
- **Proxy required** — requests without a proxy are blocked by the website's bot protection.
- **Province on business URLs** — `province` is filled from search results; for business URLs given directly it stays `null`.

### ❓ Frequently asked questions

#### Can I scrape Páginas Amarillas legally?

This actor only collects business information that is publicly visible on paginasamarillas.es, with no login or private content. Scraping publicly available data is generally considered lawful (see *hiQ Labs v. LinkedIn*), but you are responsible for complying with the site's Terms of Service and laws such as GDPR, especially for phone numbers of sole traders.

#### What data does the Páginas Amarillas scraper return?

Name, category, description, phone numbers, website, street address, postal code, city, province, coordinates, logo, rating and advertiser flags from search results. With **Scrape business pages** on, you also get all phone numbers, activities, full description, opening hours, payment methods, cuisines, brands, technical service brands, photos, years on the directory and every other branch location with its phone and coordinates.

#### How many businesses can I scrape from one search?

`maxItems` limits unique businesses per search term or search URL. The actor follows result pages (about 30 businesses each) until it reaches that limit or the site returns an empty page; a city search such as plumbers in Madrid has several hundred results.

#### Do I need a proxy to scrape paginasamarillas.es?

Yes. The input defaults to Apify datacenter proxy, which works reliably; requests without a proxy are blocked. Switch to residential proxy only if you see repeated blocking.

#### How do I scrape Páginas Amarillas with Python?

Use the Python example above: call the actor with `searchTerms` and `location`, then iterate over the dataset items.

#### Can I run this Páginas Amarillas scraper on a schedule?

Yes, with Apify Schedules. Set the same **Cache project name** on every run: the actor drops businesses it already saved before opening their pages, so each run fetches, returns and charges for only new businesses, marked with `changeType: new`. See **How the cache saves money** above.

#### What output formats are supported?

JSON, CSV, Excel, XML and RSS, either from the **Output** tab or through the Apify API.

#### Does the scraper return phone numbers and emails?

Phone numbers, yes: Páginas Amarillas shows them only after a click on "Ver teléfono", but they are already in the page data, so the scraper returns them in `phone` and `phones` for every business. Emails are not published on the site (contact goes through a form), so use the `website` field to find an email on the business's own site.

### 🔗 Other actors you may find useful

| Scraper | Description |
| ------- | ----------- |
| [🏢 BBB Emails & Info Scraper](https://apify.com/confidential_gnat/bbb-business-scraper) | Better Business Bureau businesses: phone, address, rating, accreditation, complaints and contacts. |
| [🇩🇪 German Imprint (Impressum) Scraper](https://apify.com/confidential_gnat/german-imprint-scraper) | Company decision makers, legal name, address, emails and phones from any German Impressum page. |
| [⛪ Church Finder Scraper](https://apify.com/confidential_gnat/churchfinder-scraper) | Church listings and profiles: name, denomination, address, phone, service times and ratings. |
| [📋 Craigslist Listings Scraper](https://apify.com/confidential_gnat/craigslist-listings-scraper) | Craigslist classified listings in any city and category: title, price, location and photos. |
| [🛍️ Mudah.my Classifieds Scraper](https://apify.com/confidential_gnat/mudah-classifieds-scraper) | Malaysian classified ads: cars, property and marketplace listings with seller phone numbers. |

### 💬 Support & contact

If you encounter any issues or have questions, please [open an issue](https://apify.com/confidential_gnat/paginasamarillas-business-scraper/issues/open).

You can also find more of our actors on the [Actor Flow](https://apify.com/confidential_gnat) page.

# Actor input Schema

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

Páginas Amarillas search URLs (for example https://www.paginasamarillas.es/search/fontaneros/all-ma/madrid/all-is/madrid/all-ba/all-pu/all-nc/1), category pages (https://www.paginasamarillas.es/a/fontaneros/) or business pages (https://www.paginasamarillas.es/f/madrid/asistencia-hogar-24h_8DdsfCdjkf.html). The keyword and location fields below are not needed when you use URLs.

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

Open every business page to get the phone number (most search results hide it), coordinates, full description, activities, brands and other addresses. Turn off for faster, cheaper runs with the search card data only. Business URLs always include the details.

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

Maximum unique businesses saved for each search term or search URL.

## `cacheProjectName` (type: `string`):

Use the same name on each scheduled run to get only new businesses. Businesses already scraped under this name are skipped and not charged, and they do not count towards Max items. Each record gets changeType: new.

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

This website blocks requests without a proxy. Apify datacenter proxy (the default) works; switch to residential only if you get blocked.

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

Optional: business activities to search for instead of (or together with) URLs, for example fontaneros, dentistas, abogados laboralistas. Each term is searched separately.

## `location` (type: `string`):

City or town to search in, for example Madrid, Barcelona or Getafe. Leave empty to search all of Spain. Only used together with Search terms; start URLs ignore it.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.paginasamarillas.es/search/fontaneros/all-ma/all-pr/all-is/madrid/all-ba/all-pu/all-nc/1"
    }
  ],
  "scrapeDetails": true,
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "searchTerms": []
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.paginasamarillas.es/search/fontaneros/all-ma/all-pr/all-is/madrid/all-ba/all-pu/all-nc/1"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("confidential_gnat/paginasamarillas-business-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 = { "startUrls": [{ "url": "https://www.paginasamarillas.es/search/fontaneros/all-ma/all-pr/all-is/madrid/all-ba/all-pu/all-nc/1" }] }

# Run the Actor and wait for it to finish
run = client.actor("confidential_gnat/paginasamarillas-business-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 '{
  "startUrls": [
    {
      "url": "https://www.paginasamarillas.es/search/fontaneros/all-ma/all-pr/all-is/madrid/all-ba/all-pu/all-nc/1"
    }
  ]
}' |
apify call confidential_gnat/paginasamarillas-business-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,confidential_gnat/paginasamarillas-business-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/WqlxhgZLPXHAiz4uc/builds/5vco2pPg29e17UznS/openapi.json
