# Rappi Perú (`diegomedflo/rappi-peru`) Actor

Extrae restaurantes y menús completos de Rappi Peru. Soporta 7 ciudades: Lima, Arequipa, Trujillo, Chiclayo, Piura, Cusco e Iquitos. Obtén nombre, dirección, rating, precio de delivery, horarios y menú con precios por producto. Sin login requerido. $0.001 por resultado.

- **URL**: https://apify.com/diegomedflo/rappi-peru.md
- **Developed by:** [Diego](https://apify.com/diegomedflo) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 88.9% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Rappi Peru — Scraper de Restaurantes y Menús

Extrae restaurantes y menús completos de **Rappi Peru** usando la plataforma [Apify](https://apify.com). No requiere login ni cuenta en Rappi.

Disponible en el Apify Store: [diegomedflo/rappi-apify](https://apify.com/diegomedflo/rappi-apify)

---

### ¿Qué hace?

- Obtiene todos los restaurantes disponibles en una ciudad peruana desde Rappi
- Extrae el detalle completo de cada restaurante: nombre, dirección, rating, precio de delivery, tiempo estimado, horario
- Opcionalmente descarga el menú completo por restaurante: categorías, productos, descripciones, precios e imágenes
- Guarda los datos como registros JSON en el dataset de Apify — descargables en JSON, CSV o Excel

---

### Ciudades disponibles

| Slug | Ciudad |
|---|---|
| `lima` | Lima |
| `arequipa` | Arequipa |
| `trujillo` | Trujillo |
| `chiclayo` | Chiclayo |
| `piura` | Piura |
| `cusco` | Cusco |
| `iquitos` | Iquitos |

---

### Parámetros de entrada

| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
| `city` | string | ✅ | Slug de la ciudad (ej. `lima`) |
| `mode` | string | ✅ | `restaurants` solo restaurantes, `restaurants_and_menu` incluye menú |
| `lat` | number | ❌ | Latitud de entrega — afecta el ETA y precio de delivery. Por defecto usa el centro de la ciudad. |
| `lng` | number | ❌ | Longitud de entrega |
| `max_restaurants` | integer | ❌ | Límite de restaurantes a procesar |

#### Ejemplo de entrada

```json
{
  "city": "lima",
  "mode": "restaurants_and_menu",
  "lat": -12.097,
  "lng": -77.048,
  "max_restaurants": 20
}
````

***

### Datos de salida

Se generan dos tipos de registros en el dataset, identificados por el campo `record_type`.

#### Registro de restaurante

```json
{
  "record_type": "restaurant",
  "store_id": 4,
  "name": "Primos Chicken Bar Armendariz",
  "brand_name": "Primos Chicken Bar",
  "address": "Armendariz 546, Miraflores",
  "city": "lima",
  "location_lat": -12.1348,
  "location_lng": -77.0259,
  "rating_score": 3.7,
  "rating_reviews": 249,
  "delivery_price_soles": 1.9,
  "eta_minutes": 14,
  "eta_text": "14 min",
  "open_time": "11:30:00",
  "close_time": "23:00:00",
  "is_open_today": true,
  "menu_categories": 15,
  "menu_products": 80,
  "scraped_at": "2026-06-05T20:00:00Z"
}
```

#### Registro de producto del menú (solo en modo `restaurants_and_menu`)

```json
{
  "record_type": "menu_item",
  "store_id": 4,
  "restaurant_name": "Primos Chicken Bar Armendariz",
  "city": "lima",
  "category": "Combos",
  "product_name": "Pollo a la Brasa más Papas",
  "description": "Porción de pollo a la brasa con papas fritas",
  "price_soles": 95.0,
  "image_url": "https://images.rappi.pe/products/abc123.png",
  "scraped_at": "2026-06-05T20:00:00Z"
}
```

***

### Precios

| Evento | Costo | Descripción |
|---|---|---|
| Inicio del actor | $0.05 | Cargo único por ejecución |
| Por resultado | $0.001 | Por cada restaurante o producto extraído |

| Escenario | Costo estimado |
|---|---|
| Lima, solo restaurantes (~52 tiendas) | ~$0.10 |
| Arequipa, solo restaurantes (~30 tiendas) | ~$0.08 |
| Lima, restaurantes + menú completo (~3500 items) | ~$3.60 |

***

### ¿Cómo usarlo?

#### Desde la consola de Apify

1. Abre la [página del Actor](https://apify.com/diegomedflo/rappi-apify)
2. Completa el formulario de entrada (ciudad, modo)
3. Haz clic en **Start**
4. Descarga los resultados desde la pestaña **Dataset** en JSON, CSV o Excel

#### Vía API REST

```bash
curl -X POST "https://api.apify.com/v2/acts/diegomedflo~rappi-apify/runs" \
  -H "Authorization: Bearer TU_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"city": "lima", "mode": "restaurants"}'
```

#### Vía SDK de Python

```python
from apify_client import ApifyClient

client = ApifyClient("TU_API_TOKEN")
run = client.actor("diegomedflo/rappi-apify").call(run_input={
    "city": "lima",
    "mode": "restaurants_and_menu",
    "max_restaurants": 10
})
dataset = client.dataset(run["defaultDatasetId"]).list_items().items
```

***

### Uso local (CLI — genera archivos Excel)

```bash
pip install requests beautifulsoup4 lxml pandas openpyxl
python main.py
```

Sigue las instrucciones en consola para elegir ciudad y modo. Los archivos Excel se guardan en la misma carpeta del proyecto.

***

### Autor

**Diego Medina** — [diegomedflo](https://github.com/diegomedflo)

> Este Actor no está afiliado ni respaldado por Rappi. Solo accede a información públicamente disponible.

# Actor input Schema

## `city` (type: `string`):

Peruvian city to scrape restaurants from.

## `mode` (type: `string`):

Choose what data to return. 'restaurants' returns store info only (fast). 'restaurants\_and\_menu' adds all menu items per restaurant (slower, costs more).

## `lat` (type: `number`):

Optional. Latitude of the delivery address (affects delivery price and ETA estimates). If omitted, the city center coordinates are used.

## `lng` (type: `number`):

Optional. Longitude of the delivery address (affects delivery price and ETA estimates). If omitted, the city center coordinates are used.

## `max_restaurants` (type: `integer`):

Maximum number of restaurants to scrape. Leave empty to scrape all found on the city page (typically 30-60).

## Actor input object example

```json
{
  "city": "lima",
  "mode": "restaurants",
  "lat": -12.097,
  "lng": -77.048
}
```

# Actor output Schema

## `restaurantes` (type: `string`):

Dataset con todos los registros extraídos: restaurantes (record\_type='restaurant') y productos del menú (record\_type='menu\_item'). Descargable en JSON, CSV o Excel.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("diegomedflo/rappi-peru").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("diegomedflo/rappi-peru").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call diegomedflo/rappi-peru --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=diegomedflo/rappi-peru",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Rappi Perú",
        "description": "Extrae restaurantes y menús completos de Rappi Peru. Soporta 7 ciudades: Lima, Arequipa, Trujillo, Chiclayo, Piura, Cusco e Iquitos. Obtén nombre, dirección, rating, precio de delivery, horarios y menú con precios por producto. Sin login requerido. $0.001 por resultado.",
        "version": "0.0",
        "x-build-id": "1zMg8Ics9IGz9gvlX"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/diegomedflo~rappi-peru/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-diegomedflo-rappi-peru",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/diegomedflo~rappi-peru/runs": {
            "post": {
                "operationId": "runs-sync-diegomedflo-rappi-peru",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/diegomedflo~rappi-peru/run-sync": {
            "post": {
                "operationId": "run-sync-diegomedflo-rappi-peru",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "city",
                    "mode"
                ],
                "properties": {
                    "city": {
                        "title": "City",
                        "enum": [
                            "lima",
                            "arequipa",
                            "trujillo",
                            "chiclayo",
                            "piura",
                            "cusco",
                            "iquitos"
                        ],
                        "type": "string",
                        "description": "Peruvian city to scrape restaurants from.",
                        "default": "lima"
                    },
                    "mode": {
                        "title": "Scrape Mode",
                        "enum": [
                            "restaurants",
                            "restaurants_and_menu"
                        ],
                        "type": "string",
                        "description": "Choose what data to return. 'restaurants' returns store info only (fast). 'restaurants_and_menu' adds all menu items per restaurant (slower, costs more).",
                        "default": "restaurants"
                    },
                    "lat": {
                        "title": "Delivery Latitude",
                        "type": "number",
                        "description": "Optional. Latitude of the delivery address (affects delivery price and ETA estimates). If omitted, the city center coordinates are used."
                    },
                    "lng": {
                        "title": "Delivery Longitude",
                        "type": "number",
                        "description": "Optional. Longitude of the delivery address (affects delivery price and ETA estimates). If omitted, the city center coordinates are used."
                    },
                    "max_restaurants": {
                        "title": "Max Restaurants",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of restaurants to scrape. Leave empty to scrape all found on the city page (typically 30-60)."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
