# Pedidosya — 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.

> Browse restaurants and menus available in Argentine cities through PedidosYa, search for specific restaurants by name or food category, and retrieve complete menu offerings including items, prices, and available options.

**Category:** Food & Dining | **Website:** [pedidosya.com.ar/](https://pedidosya.com.ar/) | **Docs:** [parse.bot/marketplace/6dd3147f-aa90-43b7-8962-3efff7f58227/pedidosya-com-ar-api](https://parse.bot/marketplace/6dd3147f-aa90-43b7-8962-3efff7f58227/pedidosya-com-ar-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-pedidosya-com-ar-api-6dd3147f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_cities

Fetch the list of cities where PedidosYa operates in Argentina. Returns city names and URL slugs. Each slug can be used to construct a City instance for listing or searching restaurants in that city.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pedidosya-com-ar-api-6dd3147f/get_cities \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_restaurant_menu

Fetch the full menu for a specific restaurant including all sections and items with prices. The restaurant_slug is the restaurant-specific portion of the URL (without city prefix), as returned in the restaurant_slug field from get_restaurants_by_city or search_restaurants.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city` | string | Yes | City slug (e.g. buenos-aires, cordoba) |
| `restaurant_slug` | string | Yes | Restaurant slug with UUID from get_restaurants_by_city results restaurant_slug field, e.g. tostado-obelisco-069bb71f-24f0-44dc-a9b9-056d510ea710 |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pedidosya-com-ar-api-6dd3147f/get_restaurant_menu \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city":"<string>","restaurant_slug":"<string>"}'
```

### get_restaurants_by_city

Fetch a list of featured restaurants available in a given city. Returns up to 20 restaurants along with their food categories and total count. Each restaurant includes a restaurant_slug that can be used with get_restaurant_menu to fetch its full menu.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city` | string | Yes | City slug from get_cities endpoint (e.g. buenos-aires, cordoba, rosario, la-plata, san-miguel-de-tucuman, mar-del-plata) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pedidosya-com-ar-api-6dd3147f/get_restaurants_by_city \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city":"<string>"}'
```

### search_restaurants

Search for restaurants by keyword in a given city. Filters the city's featured restaurant list by matching the query against restaurant names and food categories (case-insensitive). Returns matching restaurants. An empty result set is valid when no restaurants match.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city` | string | No | City slug (e.g. buenos-aires, cordoba, rosario, la-plata, san-miguel-de-tucuman, mar-del-plata) |
| `query` | string | Yes | Search keyword to match against restaurant names and food categories |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pedidosya-com-ar-api-6dd3147f/search_restaurants \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city":"<string>","query":"<string>"}'
```
