# Páginas Amarillas Spain

> Search one Spanish directory page by activity, province and city.
> ReefAPI engine `paginas-amarillas` · 4 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/paginas-amarillas/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http). Clients that add connectors by URL, such as ChatGPT and the Claude app, connect with OAuth 2.1 (the user pastes their key once on a ReefAPI page; discovery at `/.well-known/oauth-protected-resource/mcp`). Config files send the key as `Authorization: Bearer <key>`. `?key=<key>` in the URL also works as a last-resort fallback.

## Endpoints

### POST https://api.reefapi.com/paginas-amarillas/v1/search — 1 credit
Search one Spanish directory page by activity, province and city.

**Parameters:**
- `query` (string, optional) — Spanish directory term or category slug.
- `cursor` (object, optional) — Pass next_cursor to omit previously returned business IDs.
- `refinement` (string, optional) — Load an advertised activity, locality, district, neighborhood or postal_code filter.
- `company` (string, optional) — Company name on the advanced search form.
- `located_only` (boolean, optional) — Ubicados en esta localidad. Requires city.
- `district` (string, optional) — District from the published search choices.
- `postal_code` (string, optional) — Select the directory’s five-digit postal-code filter.
- `neighborhood` (string, optional) — Neighborhood slug from a search choice.
- `street` (string, optional) — Street name on the advanced search form, which applies the publisher’s proximity radius.
- `url` (string, optional) — Alternatively, a category, brand or next-page results URL.
- `province` (string, optional) — Province slug.
- `city` (string, optional) — City slug within the province.
- `page` (integer, optional, default 1) — One-based source page.
- `service` (string, optional) — Service label from available_services.
- `sort` (enum, optional, default "relevance") — Directory order. [one of: relevance, reviews]

**Returns:** Business cards in source order, reported and observed totals, published filters and continuation.

**Example request body:**
```json
{
  "query": "fontaneros",
  "province": "madrid",
  "city": "madrid"
}
```

### POST https://api.reefapi.com/paginas-amarillas/v1/reviews — 2 credits
Read visible comments and replies from the profile's guest discussion.

**Parameters:**
- `container_id` (string, required) — review_container_id published on the business profile.
- `limit` (integer, optional, default 20) — Top-level comments, or direct replies with parent_id, per page.
- `reply_limit` (integer, optional, default 20) — Replies requested per top-level comment.
- `parent_id` (string, optional) — Read a page of direct replies to this comment UUID.
- `cursor` (string, optional) — Pass the reviews next_cursor for the same container and parent.

**Returns:** Visible comments, author identifiers, dates, thread relationships and the provider's visible total.

**Example request body:**
```json
{
  "container_id": "225721349000000001"
}
```

### POST https://api.reefapi.com/paginas-amarillas/v1/business — 1 credit
Read the public profile linked from a result.

**Parameters:**
- `url` (string, required) — Full source profile URL.

**Returns:** Business identity, published contact details, hours, ratings, offers, nearby places and related listings.

**Example request body:**
```json
{
  "url": "https://www.paginasamarillas.es/f/madrid/reformas-myrp_228450284_000000001.html"
}
```

### POST https://api.reefapi.com/paginas-amarillas/v1/directory — 1 credit
Browse business activity, brand, category and place indexes.

**Parameters:**
- `index` (enum, optional, default "activities") — Select an index. [one of: activities, places, brands, categories]
- `letter` (string, optional) — Directory initial for activities, brands or categories.
- `page` (integer, optional, default 1) — Activity or brand index page.
- `url` (string, optional) — An index, letter or continuation link from directory.

**Returns:** Index heading and the links displayed in its main directory, including pagination.

**Example request body:**
```json
{
  "index": "brands",
  "letter": "B"
}
```

## At scale
- **Volume:** 5M+ requests a day, measured at 60 requests a second across the fleet with no
  central bottleneck. Per-key limits are raised for high-volume accounts; volume pricing on request.
- **Missing a source:** tell us a site we do not cover and it becomes an engine. A customer asked
  for bestprice.gr on 21 Sep 2026 and it was in the catalog on 22 Sep.
- **Support:** 2 minute median time from a question in the live chat to the first answer. Setup
  help included, no support tier to buy.
- **One key, one credit pool** across every API. No per-site plans, no separate subscriptions.

## More
- Try it live, no code: https://reefapi.com/playground?engine=paginas-amarillas
- Human docs page: https://reefapi.com/docs/paginas-amarillas
- Overview page: https://reefapi.com/paginas-amarillas-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
