# PaginasAmarillas.es Scraper | With Numbers | $4 / 1k (`fatihtahta/paginasamarillas-es-scraper`) Actor

Extract clean, structured Spain business data right from PaginasAmarillas.es. It grabs every visible listing to deliver names, phone numbers, websites, ratings, addresses, hours  and more. Ideal for sales, market mapping or local competitor research.

- **URL**: https://apify.com/fatihtahta/paginasamarillas-es-scraper.md
- **Developed by:** [Fatih Tahta](https://apify.com/fatihtahta) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 41 total users, 4 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$3.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

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

## PaginasAmarillas.es Scraper | With Numbers | $4 / 1k

**Slug:** `fatihtahta/paginasamarillas-es-scraper`
**Price:** **$4 per 1,000 saved listings**

Collect clean, structured Spanish business data straight from **PaginasAmarillas.es**. Point this actor at any results page (for example, "electricistas en Madrid" or "restaurantes en Barcelona") and receive download-ready listings with the details you need for outreach, market research, or location planning.

***

### 💡 Why Scrape PaginasAmarillas.es?

PaginasAmarillas.es is one of Spain’s largest and most trusted business directories. Capturing its listings helps you:

- **Outbound & Sales Enablement** – Build phone-ready lead lists with direct websites and contact links.
- **Market Intelligence** – Map businesses by **city/region/category** with reviews, ratings, and promotional badges.
- **Competitive Analysis** – Monitor sponsored placements, ratings, and messaging for rivals in any Spanish market.
- **Local SEO & Expansion** – Audit coverage by neighborhood, understand category mix, and spot gaps for new openings.

***

### 🚀 Highlights

- **📞 Phone Numbers Included** – Extracts visible phone numbers plus tap-to-call links when present.
- **🗺️ Location Context** – Captures structured addresses, map links, and availability badges.
- **🌐 Real Web & Contact Links** – Collects official websites and consultation/contact URLs directly from the listing cards.
- **📈 Pagination Coverage** – Follows search result pagination automatically until the requested quota is reached.
- **📦 Flexible Exports** – Download results from the dataset as JSON, CSV, Excel, or HTML and feed any CRM, BI tool, or automation.

***

### 📊 Data You Can Expect

Each saved item typically includes:

**Listing & Source**

- `name`
- `detailUrl`
- `categories[]`, `primaryCategory`
- `description`
- `position` (rank on the search page)
- `rating`, `reviewCount`
- `badges[]` (e.g., verified, promo, booking labels)
- `status` ("Abierto ahora", etc.)
- `sourceUrl`

**Location**

- `address.raw`
- `address.streetAddress`
- `address.locality`
- `address.region`
- `address.postalCode`
- `address.country`
- `address.mapUrl`

**Contacts & Links**

- `contacts.phones[]`
- `contacts.phoneLinks[]`
- `contacts.website`
- `contacts.contactUrl`

**Media & Extras**

- `media.image`
- `media.alt`
- `media.title`
- `analytics` (when available from the listing markup)

> Bonus: The run also stores a `SEARCH_SUMMARY` key-value record containing the headline summary and reported result count from the search page.

***

### 📖 How to Use

1. Open **PaginasAmarillas.es Scraper | With Numbers | $4 / 1k** on Apify and click **Try actor**.
2. In **Input**, paste a **PaginasAmarillas.es** search URL (examples below).
3. Optionally adjust `maxResults` (defaults to 50,000; hard cap 1,000,000).
4. Click **Start** and let the actor gather listings.
5. Download your dataset from **Storage → Dataset** in the format you prefer.

> Tip: Begin with a smaller `maxResults` to validate the segment, then rerun for full coverage.

***

### 📥 Input Configuration

- `targetUrl` *(string, required)* — Any PaginasAmarillas.es search results page.
  - Example: `https://www.paginasamarillas.es/search/electricistas/madrid/all-ma/all-pr/all-is/all-ci/all-ba/all-pu/all-nc/1`
- `maxResults` *(number, optional; default `50000`)* — Maximum listings to save (min 10, max 1,000,000).

***

### 🧪 Example Input

```json
{
  "targetUrl": "https://www.paginasamarillas.es/search/restaurantes/barcelona/all-ma/all-pr/all-is/all-ci/all-ba/all-pu/all-nc/1",
  "maxResults": 1200
}
```

***

### 📦 Example Output Item

```json
{
  "name": "Restaurante La Rambla",
  "detailUrl": "https://www.paginasamarillas.es/f/restaurante-la-rambla/1234567",
  "categories": ["Restaurantes", "Cocina Mediterránea"],
  "primaryCategory": "Restaurantes",
  "description": "Cocina mediterránea con menú diario y terraza.",
  "position": 3,
  "rating": 4.5,
  "reviewCount": 28,
  "badges": ["Destacado", "Reserva online"],
  "status": "Abierto ahora",
  "address": {
    "raw": "C/ de la Rambla, 45, 08002 Barcelona",
    "streetAddress": "C/ de la Rambla, 45",
    "locality": "Barcelona",
    "region": "Barcelona",
    "postalCode": "08002",
    "country": "ES",
    "mapUrl": "https://www.paginasamarillas.es/?lat=41.3809&lng=2.1735"
  },
  "contacts": {
    "phones": ["933 000 000"],
    "phoneLinks": ["https://www.paginasamarillas.es/llamar/restaurante-la-rambla"],
    "website": "https://www.restauranterambla.es",
    "contactUrl": "https://www.paginasamarillas.es/contactar/restaurante-la-rambla"
  },
  "media": {
    "image": "https://multimedia.paginasamarillas.es/.../foto.jpg",
    "alt": "Restaurante La Rambla",
    "title": "Terraza exterior"
  },
  "analytics": {
    "listingId": "987654321",
    "geoTier": "in"
  },
  "sourceUrl": "https://www.paginasamarillas.es/search/restaurantes/barcelona/all-ma/all-pr/all-is/all-ci/all-ba/all-pu/all-nc/1"
}
```

***

### 💰 Pricing

**$4 per 1,000 saved listings.**
You only pay for listings successfully stored in the dataset.
Example: 7,500 listings → `(7,500 / 1,000) * $4 = $30`.

***

### ⚖️ Responsible Use

This actor collects publicly available business information from PaginasAmarillas.es. Ensure your use complies with applicable laws, data-processing regulations (GDPR/CCPA, etc.), and the platform’s terms—especially if you plan outreach or automated messaging.

***

### ❓ Support

Need a tweak, enrichment, or full-scale project? Open an issue on the actor’s **Issues** tab in Apify Console and we’ll get back to you promptly.

¡Feliz prospección!

# Actor input Schema

## `targetUrl` (type: `string`):

enter the url of the PaginasAmarillas.es list that you want to scrape.

## `maxResults` (type: `integer`):

The maximum number of contacts to scrape.

## Actor input object example

```json
{
  "targetUrl": "https://www.paginasamarillas.es/search/churreria/all-ma/barcelona/all-is/barcelona-capital/all-ba/all-pu/all-nc/1?what=Churrer%C3%ADa&where=barcelona+capital&qc=true",
  "maxResults": 50000
}
```

# 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 = {
    "targetUrl": "https://www.paginasamarillas.es/search/churreria/all-ma/barcelona/all-is/barcelona-capital/all-ba/all-pu/all-nc/1?what=Churrer%C3%ADa&where=barcelona+capital&qc=true"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fatihtahta/paginasamarillas-es-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 = { "targetUrl": "https://www.paginasamarillas.es/search/churreria/all-ma/barcelona/all-is/barcelona-capital/all-ba/all-pu/all-nc/1?what=Churrer%C3%ADa&where=barcelona+capital&qc=true" }

# Run the Actor and wait for it to finish
run = client.actor("fatihtahta/paginasamarillas-es-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 '{
  "targetUrl": "https://www.paginasamarillas.es/search/churreria/all-ma/barcelona/all-is/barcelona-capital/all-ba/all-pu/all-nc/1?what=Churrer%C3%ADa&where=barcelona+capital&qc=true"
}' |
apify call fatihtahta/paginasamarillas-es-scraper --silent --output-dataset

```

## MCP server setup

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