# Menicka Crawler (`janbuchar/menicka-crawler`) Actor

Gathers lunch menu information from menicka.cz

- **URL**: https://apify.com/janbuchar/menicka-crawler.md
- **Developed by:** [Jan Buchar](https://apify.com/janbuchar) (community)
- **Categories:** Travel
- **Stats:** 9 total users, 1 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## menicka-crawler

Scrapes daily menus from [menicka.cz](https://www.menicka.cz) — one dataset item
per menu item (soup or main course), with prices and, optionally, walking
distance from an address you pick.

Built on Crawlee v4 (`CheerioCrawler`) and Apify SDK v4. Requires Node.js 24+ and
pnpm; there is no build step, since Node runs the TypeScript sources directly by
stripping their types.

### Input

| Field                | Description                                                                                                       |
| -------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `cities`             | City pages to scrape, e.g. `praha-1.html`. Each entry is used as a regular expression matched against city links. |
| `distanceAddress`    | Address to measure restaurant distance from. Requires `googleMapsApiToken`.                                       |
| `googleMapsApiToken` | Google Maps API token with the Directions and Places APIs enabled.                                                |

Without a token, `longitude`, `latitude` and `distance` are `null`.

### Output

Each dataset item looks like this:

```json
{
  "city": "Praha 1",
  "type": "main",
  "order": "5",
  "name": "Bramborové lokše plněné trhaným vepřovým masem ve švestkové omáčce A:1, 3, 7",
  "price": 265,
  "restaurantName": "Sněmovna v Jakubský",
  "restaurantAddress": "Jakubská, 5, 11000, Praha 1",
  "longitude": null,
  "latitude": null,
  "distance": null,
  "date": "2026-08-19",
  "url": "https://www.menicka.cz/5750-snemovna-v-jakubsky.html"
}
```

`type` is either `main` or `soup`, `order` is the item's position on the menu,
and `distance` is the walking distance in metres. On finish, the whole dataset is
also exported to the `OUTPUT` record of the default key-value store as CSV.

### Running it locally

```bash
pnpm install
pnpm start
```

Input is read from `storage/key_value_stores/default/INPUT.json`, results land in
`storage/datasets/default`.

### Checks

The same checks run in CI on every pull request.

```bash
pnpm lint        # oxlint
pnpm fmt:check   # oxfmt
pnpm typecheck   # tsc --noEmit
```

Pushing to `master` runs the checks and then deploys the Actor to Apify, which
needs an `APIFY_TOKEN` repository secret. The same deploy can be triggered by
hand from the Actions tab ("Push Actor").

# Actor input Schema

## `cities` (type: `array`):

No description

## `distanceAddress` (type: `string`):

Address for determining restaurant distance

## `googleMapsApiToken` (type: `string`):

Used for calculating restaurant distance. The token has to have the Directions and Places APIs enabled

## Actor input object example

```json
{
  "cities": [
    "praha-1.html"
  ]
}
```

# 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("janbuchar/menicka-crawler").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("janbuchar/menicka-crawler").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 '{}' |
apify call janbuchar/menicka-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,janbuchar/menicka-crawler"
        }
    }
}
```

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/cDdfwOpaX7iNdmoRs/builds/ClYZDslF7sPtpNIg5/openapi.json
