Itinerary Scheduler Api avatar

Itinerary Scheduler Api

Pricing

from $10.00 / 1,000 schedule itineraries

Go to Apify Store
Itinerary Scheduler Api

Itinerary Scheduler Api

Pricing

from $10.00 / 1,000 schedule itineraries

Rating

0.0

(0)

Developer

Yang Cai

Yang Cai

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 minutes ago

Last modified

Categories

Features

Limited permissions

Share

Deterministic Travel Itinerary & Opening-Hours Scheduler (API + MCP)

Zero-LLM, deterministic travel itinerary constraint solver built for AI Travel Agents, Apify Store (Standby + Input Runs + MCP), RapidAPI, Smithery / Glama, and n8n / Make workflows.

LLMs are great at recommending places, and terrible at scheduling them: they book museums on Monday closing days, bounce travelers back and forth across town, ignore winter vs. summer sunset times, and overpack afternoons.

This engine solves those constraints deterministically in milliseconds with zero external API cost:

  • Geographic Clustering & 2-opt / Or-opt Optimization — exact permutation solver for up to 7 stops/day, automatically inferring walk / transit / drive / scooter / bike modes.
  • Weekly Closing-Day Avoidance — permutes multi-day stretches so museums and sights land on days they are actually open.
  • Google + OpenStreetMap Opening-Hours Parser — accepts both Google weekdayDescriptions arrays and OSM opening_hours strings ("Tu-Su 09:30-18:00; Mo off").
  • NOAA Solar Sunset Alignment — schedules viewpoints and rooftops ~1 hour before true local sunset with IANA timezone & DST resolution.
  • Realistic Pacing & Rainy-Day Backups — relaxed / balanced / full load budgets, major-museum queue buffers, lunch breaks, multi-stay moving days, and indoor backup recommendations.
  • Explainable Unscheduled Pool & Quality Telemetry — structured reason codes (closed, far, day-full, similar, lodging, duplicate, other-area) plus planQuality metrics.

Tools (MCP & REST)

MCP ToolREST EndpointPurpose
schedule_itineraryPOST /v1/itineraries/scheduleBuild a conflict-free multi-day itinerary from 1–100 candidate places
retime_itineraryPOST /v1/itineraries/retimeRecompute exact clocks & opening-hours conflicts for a fixed stop order
parse_opening_hoursPOST /v1/hours/parseParse Google or OSM opening hours into structured weekday windows + open-at-time checks
compute_sunsetPOST /v1/sun/sunsetCompute local solar sunset, golden hour start, and IANA timezone

Additional system endpoints: GET /v1/health, GET /openapi.json, and POST /mcp (Streamable HTTP JSON-RPC 2.0).


Installation

1. Remote MCP (Apify Standby or Cloudflare Workers)

Connect any Streamable HTTP MCP client (Claude Desktop, Cursor, Windsurf, Smithery, Apify MCP):

{
"mcpServers": {
"itinerary-scheduler": {
"url": "https://intimate-axinite--itinerary-scheduler-api.apify.actor/mcp",
"headers": {
"Authorization": "Bearer <YOUR_APIFY_TOKEN>"
}
}
}
}

Available on Apify Store and RapidAPI Hub.

2. Local Stdio MCP (Claude Desktop / Cursor)

git clone https://github.com/ladyissy/itinerary-scheduler-api.git
cd itinerary-scheduler-api
npm install
{
"mcpServers": {
"itinerary-scheduler": {
"command": "node",
"args": ["--experimental-strip-types", "/path/to/itinerary-scheduler-api/src/mcp-stdio.ts"]
}
}
}

3. Docker / Self-Hosted HTTP Server

docker build -t itinerary-scheduler .
docker run -p 8787:8787 itinerary-scheduler

Usage

REST API (curl)

curl -s http://localhost:8787/v1/itineraries/schedule \
-H 'Content-Type: application/json' \
-d '{
"days": 2,
"pace": "balanced",
"startDate": "2026-05-11",
"places": [
{
"id": "louvre",
"name": "Louvre Museum",
"latitude": 48.8606,
"longitude": 2.3376,
"category": "Museum",
"city": "Paris",
"country": "France",
"reviews": 320000,
"hours": ["Monday: 9:00 AM – 6:00 PM", "Tuesday: Closed", "Wednesday: 9:00 AM – 9:00 PM"]
},
{
"id": "orsay",
"name": "Musée d\u2019Orsay",
"latitude": 48.86,
"longitude": 2.3266,
"category": "Museum",
"city": "Paris",
"country": "France",
"reviews": 95000,
"hours": "Tu-Su 09:30-18:00; Mo off"
},
{
"id": "arc",
"name": "Arc de Triomphe Viewpoint",
"latitude": 48.8738,
"longitude": 2.295,
"category": "Viewpoint",
"city": "Paris",
"country": "France",
"reviews": 210000
}
]
}' | jq .

MCP Streamable HTTP (POST /mcp)

curl -s -X POST http://localhost:8787/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq .

Apify Actor Modes

This Actor works in both modes automatically:

  • Standby / Server + MCP Mode (usesStandbyMode: true, webServerMcpPath: "/mcp", webServerSchema: "../openapi.json"): real-time REST & MCP with Pay-Per-Event billing (schedule-itinerary, retime-itinerary, utility-call) and multi-tenant X-Actor-Request-ID support.
  • Standard Input Run Mode (Apify Console / n8n / Make): reads JSON input from the Input tab, computes the itinerary, and writes the structured result to the default Dataset and OUTPUT Key-Value Store record.

See docs/APIFY_MCP_LAUNCH.md and docs/LAUNCH_COPY.md for deployment checklists.