# Restaurant Menu Price Tracker & Comparator (`mariocampos1028/restaurant-menu-price-tracker`) Actor

Extract restaurant menu prices from public web pages and text-based PDFs. Normalize products and sizes, compare equivalent items across restaurants, and detect price changes, new or removed dishes and promotions between runs. Built for Latin America.

- **URL**: https://apify.com/mariocampos1028/restaurant-menu-price-tracker.md
- **Developed by:** [mario alberto campos](https://apify.com/mariocampos1028) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 menu processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Restaurant Menu Price Tracker & Comparator

Turn public restaurant menu pages into **clean, comparable price data** and get alerted to **price changes between runs**.

Give it the URLs of restaurant menus (the restaurant's own website, an online ordering page, a QR-menu page with prices as text). For each menu it returns normalized products, and when you schedule it, it tells you what changed: **price increases and decreases, new and removed products, promotions starting or ending**. With 2+ restaurants it also compares equivalent products across them.

### What you get

| `recordType` | What it is |
|---|---|
| `product` | One menu item: name, description, category, price, currency, size / weight / quantity when published, price per 100 g / per liter / per unit when computable, product type, combo vs. single item, a `confidence` score and quality `flags`. |
| `change` | Detected since the previous run of the same URL: `price_up`, `price_down`, `new_product`, `removed_product`, `promo_started`, `promo_ended`, or `extraction_anomaly`. |
| `comparison` | Equivalent products grouped across restaurants (same type, size, combo/single, burger variant): min / median / mean / max price, cheapest and most expensive restaurant, and a `comparison_confidence` (`high` / `medium` / `low`). |
| `error` | A URL that could not be processed and why (`pdf_not_supported`, `requires_javascript`, `http_403`, `blocked_by_robots_txt`, `no_menu_found`...). Errors are never billed. |

A `SUMMARY` record in the default key-value store lists processed menus, failures and counts.

#### Example product

```json
{
  "record_type": "product",
  "restaurant": "Frisby",
  "name": "Combo Mix",
  "price": 32000,
  "currency": "COP",
  "product_type": "pollo",
  "is_combo": true,
  "size_label": null,
  "price_per_unit": null,
  "confidence": 0.7,
  "flags": ["size_unknown"],
  "group_key": "pollo|combo|unknown|-|COP"
}
```

#### Example change

```json
{
  "record_type": "change",
  "change_type": "price_up",
  "restaurant": "Lalitos Burger",
  "product_name": "VEGGIE BURGER DOBLE CARNE",
  "old_price": 20000,
  "new_price": 24500,
  "pct_change": 22.5,
  "currency": "COP"
}
```

### How to track price changes

1. Run the Actor once with your list of menu URLs. This stores a **baseline** (no changes are reported on the first run).
2. **Schedule** the Actor (for example weekly). Every later run is compared with the previous one for each URL.
3. Keep the same **History store name** for the same set of URLs. Use a different name for a different client or market.

### Why comparisons are trustworthy

A plain price list mixes things that are not comparable. This Actor keeps them apart:

- A burger and a **combo** with fries and a drink are different groups.
- Personal, medium, large and family sizes are different groups, and weights / volumes (`150 g`, `1.5 L`) are parsed.
- A single, double and triple burger are different groups.
- When size is not published the group is marked `size_unknown` and `comparison_confidence: low`. Nothing is silently assumed.
- Prices abbreviated in thousands (`$17.7`, `$282`, `$55 mil` in Colombian pesos) are expanded, and the ones that had to be **inferred** are flagged `price_scale_inferred` with a lower confidence. By default they are left out of cross-restaurant comparisons (`comparisonMinConfidence`).
- Prices outside a plausible range are dropped rather than guessed.

### Input

| Field | Description |
|---|---|
| `startUrls` | Menu page URLs (HTML with prices as text). |
| `defaultCurrency` | Currency assumed when the page does not say (default `COP`). |
| `detectChanges` | Compare with the previous run (default on). |
| `compareAcrossRestaurants` | Group equivalent products across the restaurants in the run (default on). |
| `comparisonMinConfidence` | Minimum confidence (0-1) for a product to enter comparisons (default 0.5). |
| `historyStoreName` | Key-value store used for history (default `menu-history`). |
| `maxProductsPerMenu`, `requestTimeoutSecs` | Safety limits. |

### Pricing (pay per event)

- **Menu processed**: charged once per menu URL from which at least one valid product was extracted.
- **Price change detected**: charged per detected change (price up/down, new/removed product, promotion start/end).

Failed URLs, extraction anomalies and the baseline run's missing changes are not charged.

### What it does NOT do (yet)

Be aware before you rely on it:

- **No browser.** Menus that only appear after JavaScript runs are reported as `requires_javascript` or `no_menu_found`.
- **PDF menus are supported only when the PDF contains real text** (you can select the words). Scanned or photo-only PDFs have no text and are reported as `pdf_has_no_text`; image files are reported as `image_not_supported`. There is no OCR. PDF extraction is less precise than HTML: products get a lower `confidence`, item names keep the PDF's capitalization, and complex layouts can be misread. Typical issues: item descriptions taken as names (flagged `name_may_be_description` and left out of comparisons by default), several price columns on one line (e.g. glass / bottle; the first price is used and the item is flagged `multiple_prices`), and pages laid out in several overlapping columns. Check a sample of your own PDFs before relying on the output.
- **Links that open a viewer instead of the file** (Google Drive, OneDrive/SharePoint, Dropbox previews) cannot be read. Use the direct link to the PDF file when the restaurant provides one.
- **No delivery marketplaces** (Rappi, PedidosYa, Uber Eats, iFood...). Their terms restrict automated access; use restaurants' own pages and sources whose use is permitted.
- Product type detection covers common categories (pizza, burger, chicken, pasta, drinks, desserts, ...); other items are extracted and priced but not compared.
- Extraction on arbitrary HTML is heuristic. Check the `confidence` field and the `SUMMARY` on your own URLs before automating decisions.

### Responsible use

Only public pages. The Actor reads `robots.txt` and skips disallowed URLs, identifies itself with its own User-Agent, limits concurrency and adds a short delay between requests. It does not log in, solve CAPTCHAs or bypass blocks. You are responsible for complying with each site's terms.

# Actor input Schema

## `startUrls` (type: `array`):

Public web pages with a restaurant menu and prices as text, or direct links to text-based PDF menus (one URL per menu). Scanned/image-only menus, Google Drive / OneDrive viewers and delivery apps are not supported.

## `defaultCurrency` (type: `string`):

Currency assumed when the page does not state one (price symbols like US$ or € override it). COP prices abbreviated in thousands ($17.7, $55 mil) are detected and expanded.

## `detectChanges` (type: `boolean`):

Compare each menu with its previous run and report price increases/decreases, new and removed products and promotions. The first run only stores a baseline. Schedule the Actor (e.g. weekly) to get changes.

## `compareAcrossRestaurants` (type: `boolean`):

When 2+ restaurants are in the run, group equivalent products (same type, size, combo/solo) and output min/median/max prices.

## `comparisonMinConfidence` (type: `number`):

Products below this extraction confidence (0-1) are left out of cross-restaurant comparisons. Prices whose scale had to be inferred (e.g. '$17.7' read as 17,700) score below 0.5. Set 0 to include everything.

## `historyStoreName` (type: `string`):

Name of the key-value store that keeps price history between runs. Use a different name per monitored market or client. Letters, numbers and dashes only.

## `maxProductsPerMenu` (type: `integer`):

Safety cap on the number of products kept per menu URL.

## `requestTimeoutSecs` (type: `integer`):

Timeout for each page download.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://takami.co/oficial/menu/"
    },
    {
      "url": "https://lalitosburger.com/"
    },
    {
      "url": "https://www.ebanorestaurantes.com/bogota/menu/carnes/"
    }
  ],
  "defaultCurrency": "COP",
  "detectChanges": true,
  "compareAcrossRestaurants": true,
  "comparisonMinConfidence": 0.5,
  "historyStoreName": "menu-history",
  "maxProductsPerMenu": 500,
  "requestTimeoutSecs": 20
}
```

# Actor output Schema

## `products` (type: `string`):

Normalized menu products with prices, sizes and confidence.

## `changes` (type: `string`):

Price increases/decreases, new and removed products, promotions since the previous run.

## `comparisons` (type: `string`):

Equivalent products grouped across restaurants.

## `errors` (type: `string`):

URLs that could not be processed and why.

## `summary` (type: `string`):

Counts, failed URLs and first-run baselines.

# 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 = {
    "startUrls": [
        {
            "url": "https://takami.co/oficial/menu/"
        },
        {
            "url": "https://lalitosburger.com/"
        },
        {
            "url": "https://www.ebanorestaurantes.com/bogota/menu/carnes/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mariocampos1028/restaurant-menu-price-tracker").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 = { "startUrls": [
        { "url": "https://takami.co/oficial/menu/" },
        { "url": "https://lalitosburger.com/" },
        { "url": "https://www.ebanorestaurantes.com/bogota/menu/carnes/" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mariocampos1028/restaurant-menu-price-tracker").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://takami.co/oficial/menu/"
    },
    {
      "url": "https://lalitosburger.com/"
    },
    {
      "url": "https://www.ebanorestaurantes.com/bogota/menu/carnes/"
    }
  ]
}' |
apify call mariocampos1028/restaurant-menu-price-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mariocampos1028/restaurant-menu-price-tracker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/r8rzuIc1qKdeStsE7/builds/dogTiRIYrdouKGIF3/openapi.json
