# Paginasamarillas (Spain) — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and discover Spanish businesses with detailed information including contact details, social links, and customer reviews, with specialized features for finding restaurants and getting search suggestions. Access comprehensive business profiles to find exactly what you're looking for in Spain's leading business directory.

**Category:** Business Directories | **Website:** [paginasamarillas.es/](https://paginasamarillas.es/) | **Docs:** [parse.bot/marketplace/192c3400-fa84-4a77-ab01-2fb3dcdc39e1/paginasamarillas-es-api](https://parse.bot/marketplace/192c3400-fa84-4a77-ab01-2fb3dcdc39e1/paginasamarillas-es-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-paginasamarillas-es-api-192c3400/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_business_details

Retrieve full details of a specific business by its URL. Returns contact information, social links, and metadata. Fields like rating, reviews_count, hours, and activities may be null or empty depending on the business listing.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `business_url` | string | Yes | Full URL to the business page (e.g. 'https://www.paginasamarillas.es/f/madrid/<business-slug>_<id>.html'). Can be obtained from search_businesses results[*].url. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-paginasamarillas-es-api-192c3400/get_business_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"business_url":"<string>"}'
```

### get_business_reviews

Retrieve reviews for a specific business. Accepts a full business URL or a numeric container ID. Reviews are sorted by newest first.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `business_id` | string | Yes | Business identifier. A full business URL (e.g. 'https://www.paginasamarillas.es/f/madrid/<business-slug>_<id>.html') or a numeric container ID. URLs can be obtained from search_businesses results[*].url. |
| `limit` | integer | No | Maximum number of reviews to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-paginasamarillas-es-api-192c3400/get_business_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"business_id":"<string>","limit":"<integer>"}'
```

### get_search_suggestions

Get autocomplete suggestions for the what (business type/activity) or where (location) search fields. Returns up to 5 suggestions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `is_what` | boolean | No | If true, search for business types/activities. If false, search for locations. |
| `query` | string | Yes | Partial search term to autocomplete (e.g. 'restaur', 'madri') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-paginasamarillas-es-api-192c3400/get_search_suggestions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"is_what":"<boolean>","query":"<string>"}'
```

### search_businesses

Search for businesses by keyword and location. Returns a paginated list of businesses with approximately 28-30 results per page. Clients should check total_results and has_next before requesting higher pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `what` | string | Yes | Search keyword (e.g. 'restaurantes', 'fontaneros') |
| `where` | string | Yes | Location (e.g. 'madrid', 'barcelona') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-paginasamarillas-es-api-192c3400/search_businesses \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","what":"<string>","where":"<string>"}'
```

### search_restaurants

Search specifically for restaurants in a given location. Returns a paginated list of restaurants. Cuisine and price filters are accepted but may not be applied server-side consistently.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cuisine` | string | No | Cuisine type filter (e.g. 'cocina-italiana') |
| `location` | string | Yes | Location to search in (e.g. 'madrid', 'barcelona') |
| `page` | integer | No | Page number for pagination. |
| `price` | string | No | Average price filter |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-paginasamarillas-es-api-192c3400/search_restaurants \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cuisine":"<string>","location":"<string>","page":"<integer>","price":"<string>"}'
```
