# páGinasamarelas — 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 for Portuguese businesses by name or category, browse Yellow Pages listings, and access detailed company information like contact details, addresses, and services. Find the right local business quickly with filters and comprehensive business profiles from Portugal's official business directory.

**Category:** Business Directories | **Website:** [xn--pginasamarelas-vgb.pt/](https://xn--pginasamarelas-vgb.pt/) | **Docs:** [parse.bot/marketplace/49ebedd5-1771-48d8-a091-658e8795f0ab/p-ginasamarelas-pt-api](https://parse.bot/marketplace/49ebedd5-1771-48d8-a091-658e8795f0ab/p-ginasamarelas-pt-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-p-ginasamarelas-pt-api-49ebedd5/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### browse_category

Browse businesses or sub-categories within a category slug. Top-level categories (e.g., 'comer-beber') return sub_categories; leaf categories (e.g., 'restaurantes') return businesses. Supports pagination and optional location filtering. Slugs are obtained from list_categories or from the sub_categories in a parent browse_category response.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | No | Optional location filter (e.g., 'Porto'). Omitting returns results across all locations. |
| `page` | integer | No | Page number for pagination. |
| `slug` | string | Yes | Category slug from list_categories or browse_category results (e.g., 'comer-beber', 'restaurantes'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-p-ginasamarelas-pt-api-49ebedd5/browse_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","page":"<integer>","slug":"<string>"}'
```

### get_business_by_id

Retrieve full details for a business using its numeric ID. Returns the same fields as get_business_detail. The ID is available from search_businesses results. Internally resolves to the business detail page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Numeric ID of the business (e.g., '4132'). Available from search_businesses results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-p-ginasamarelas-pt-api-49ebedd5/get_business_by_id \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### get_business_detail

Retrieve full details for a single business using its detail page URL. Returns contact information (phone, website), opening hours by day, categories/tags, geo coordinates, description, logo, and image. The URL is typically obtained from search_businesses or browse_category results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full URL of the business detail page (e.g., 'https://www.pai.pt/paginas/4132-restaurante-bar-caldeiras-vulcoes'). Available from search_businesses results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-p-ginasamarelas-pt-api-49ebedd5/get_business_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### list_categories

List top-level categories from the pai.pt homepage. Returns category names, URL slugs, full URLs, and approximate result counts. These slugs are used as input to browse_category.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-p-ginasamarelas-pt-api-49ebedd5/list_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_businesses

Full-text search over the pai.pt business directory. query matches business names and categories; location narrows geographically. Returns paginated results with business summaries including name, URL, ID, slug, category, and address. Pagination via page parameter. total_results reflects the server's count for the query/location combination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | No | Location filter (e.g., 'Lisboa', 'Porto'). Omitting returns results across all of Portugal. |
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword (e.g., 'restaurante', 'hotel', 'dentista'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-p-ginasamarelas-pt-api-49ebedd5/search_businesses \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","page":"<integer>","query":"<string>"}'
```
