# Paginasamarillas (Peru) — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 Peruvian businesses with instant access to their contact details, including phone numbers, emails, WhatsApp, websites, social media profiles, addresses, and operating hours. Find verified reviews and comprehensive business information all in one place to easily connect with companies across Peru.

**Category:** Business Directories | **Website:** [www.paginasamarillas.com.pe/lima/servicios/inmobiliarias](https://www.paginasamarillas.com.pe/lima/servicios/inmobiliarias) | **Docs:** [parse.bot/marketplace/de28505b-c12e-4ea5-94cf-d9b26e11e299/paginasamarillas-com-pe-api](https://parse.bot/marketplace/de28505b-c12e-4ea5-94cf-d9b26e11e299/paginasamarillas-com-pe-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/paginasamarillas-peru/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get business detail

Get detailed information for a specific business including opening hours, reviews, services, and keywords. The url_path is obtained from the detail_url field in search_businesses results (strip the domain prefix). Returns richer data than the search listing: opening hours schedule, customer reviews with ratings, service list, and keyword tags.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url_path` | string | Yes | Business detail URL path from search_businesses results (e.g., '/empresas/notaria-herrera-carrera/miraflores-589431') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/paginasamarillas-peru/get-business-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"url_path":"<string>"}'
```

### Search businesses

Full-text search over Peru Yellow Pages business listings by keyword and city. Returns a paginated list of businesses with contact info, social media links, and addresses. Pagination is 0-indexed. Each business includes a detail_url path usable with get_business_detail for full info including hours and reviews.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | No | Location/city to search in |
| `page` | integer | No | Page number (0-indexed) |
| `query` | string | Yes | Search keyword (e.g., 'inmobiliarias', 'restaurantes', 'abogados') |
| `size` | integer | No | Results per page |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/paginasamarillas-peru/search-businesses \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","page":"<integer>","query":"<string>","size":"<integer>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.