| name | planet-cinema |
| description | Use when working with Planet Cinema Israel (planetcinema.co.il) showtimes or tickets - checking what is playing, finding IMAX/4DX/VIP/ScreenX screenings, looking up a cinema or film id, querying availability for a specific movie, or adding/changing/checking the screening watcher that alerts on Telegram. Triggers on "planet cinema", "פלאנט", showtimes, הקרנות, IMAX, האודיסאה, ticket alerts, or the watcher. |
Planet Cinema
Layout
watcher/planet.js - both APIs (quickbook listings, tickets5 hall geometry)
plus the hall-capacity cache
watcher/search.js - Hebrew free-text parsing and search execution
watcher/worker.js - watcher loop, Telegram dashboard and wizards
watcher/selfcheck.mjs - node watcher/selfcheck.mjs, must stay green
The site exposes a public, unauthenticated JSON API. Use it, not Chrome.
Everything read-only is a plain curl. Read reference/planet-api.md before
constructing any request; it has the base URL, all six cinema ids, the event
object shape, the attribute vocabulary, and three quirks that reliably cause bugs
if you guess instead of read.
Answering a showtime question
- Cinema id from the table in the reference (
1072 is ראשון לציון).
GET .../dates/in-cinema/{cinemaId}/until/{date} for the open window.
GET .../film-events/in-cinema/{cinemaId}/at-date/{d}?attr={attr}&lang=he_IL
per date, then filter on filmId.
Always pass attr when the question names a format. attr=imax cuts the
response about 30x. There is no per-film endpoint, so fanning out over dates and
filtering client-side is the intended shape, not a workaround.
Report availabilityRatio and soldOut when the user is deciding whether to
book, and give the bookingLink, which lands straight in the order flow.
The watcher
watcher/ is a Cloudflare Worker on a 10-minute cron that alerts to Telegram
when a new screening appears. Free tier, roughly 144 invocations a day against a
100,000/day limit.
- Watches live in KV, not in config. Any number of (cinema × format × film)
combinations, managed with
/add and /watches in Telegram. The [vars] in
wrangler.toml only seed the first one. Do not tell the user to edit config
and redeploy to change what is watched.
- The 50-subrequest free-plan limit is the binding constraint and KV counts
toward it.
planFetches prioritises new dates, rotates through known ones, and
defers the overflow to the next tick. Before adding any per-date or per-watch
fetch, check it against that budget; the self-check has cases for it.
- Control it either by sending the bot
/status, /on, /off, /check,
/test in Telegram (webhook on /tg, guarded by the secret header and the
configured chat id), or via the same routes as URLs with ?token=$CONTROL_TOKEN.
Untokened requests get a 404 by design.
- Seat counts come from hall capacity ×
availabilityRatio. Capacity is
learned once per hall from the tickets5 seat plan and cached in KV under
halls. Exact per-seat occupancy is behind a reCAPTCHA and is deliberately
not automated; see the reference. Never present an estimate as exact seats.
- Free text is parsed by hand in
search.js, no LLM. Cinema is matched
before weekdays because "ראשון" is both Sunday and half of "ראשון לציון".
- Booking links must be built, not read from the API. Use
https://tickets5.planetcinema.co.il/order/{eventId}?lang=he-IL. Both
bookingLink and bookingRouterLaunchLink are broken, one 404s and the other
200s but forwards to a 403 staging host. See the reference for detail, and do
not "fix" this back to an API field.
- To confirm it still works, use
/test: it forgets the furthest-future
screenings and re-polls so a real alert fires end to end, then writes them back.
If asked "is the watcher working", prefer this over reasoning about the code.
/status shows lastCheck, which should be under about 10 minutes old.
- Logic changes go in
watcher/worker.js. The diff and formatting functions
are pure and exported. Any change there must keep node watcher/selfcheck.mjs
green, and new behaviour needs a case added to it.
To find a film id for a new watch, pull any date at that cinema unfiltered and
grep films[].name for the Hebrew title.
Buying tickets: the boundary
The API is read-only. There is no seat-map or purchase endpoint, and driving a
purchase is not something to automate here.
The division of labour is: the watcher tells you a screening opened, you buy it.
If asked to help with the actual booking, opening the bookingLink in Chrome so
the user can pick seats themselves is fine. Do not enter payment card details,
and do not complete a purchase. Ask the user to finish the checkout.