# 888漫步旅遊 · 888travel > Single-tenant, privacy-first personal travel hub with multi-language itinerary planning, live calendar subscriptions, Google Places verification, contingency fallback management, and a dedicated RESTful Agent API. ## Overview 888travel is a personal travel command center designed to run serverlessly on Cloudflare Workers and Cloudflare KV. It aggregates bookings from Google Calendar, Gmail, and manual user inputs into a unified, chronological timeline. This instance provides a comprehensive RESTful API (`/api/v1`) designed specifically for external AI agents (Claude Code, Antigravity, Cursor, OpenAI Agents, LangChain) to plan, query, update, and manage trips, granular itinerary items, verified places, fallback plans, wishlist radar, backups, and live synchronization. ## Machine-Readable Documents - [/skill.md](https://travel.david888.com/skill.md): Canonical Agent Skill specification with tool definitions and instructions. - [/llms-full.txt](https://travel.david888.com/llms-full.txt): Comprehensive API documentation, full JSON schemas, and usage examples. ## Key Capabilities & Rules 1. **Full Trips CRUD**: Create, read, update, and delete multi-day travel itineraries (`GET`, `POST`, `PUT`, `DELETE /api/v1/trips`). 2. **Granular Segment Planning**: Append, edit, or remove itinerary segments individually or in high-performance batches (`POST`, `PUT`, `DELETE /api/v1/trips/:id/segments`). 3. **7 Standard Categories**: - `flight` ✈️: Airline flights, layovers, and airport terminals. - `hotel` 🏨: Accommodations, hotels, ryokans, resorts, and Airbnbs. - `restaurant` 🍽️: Dining reservations, culinary spots, and cafes. - `rail` 🚆: Trains, Shinkansen, high-speed rail, metro, and scenic rail. - `car` 🚗: Rental cars and vehicle hire pick-up and drop-off. - `ride` 🚕: Taxis, airport transfers, and private chauffeurs. - `other` 📍: Attractions, museums, activities, and meetings. 4. **Smart Contingency & Fallback Plans**: Attach alternative backup plans to any item. Support 1-click in-app promotion and programmatic 1-click swap (`POST /api/v1/trips/:id/segments/:sid/swap-fallback`). 5. **Google Places Discovery**: Search verified real-world places, opening hours, Google ratings, review counts, and Maps links (`POST /api/v1/places/search`, `POST /api/v1/places/details`). 6. **Wishlist Radar & Airfare Tracking**: Maintain future destinations, target budgets, and travel months (`GET`, `POST`, `DELETE /api/v1/wishes`). 7. **On-Demand Sync Trigger**: Programmatically trigger Google Calendar & Gmail synchronization passes (`POST /api/v1/sync`). 8. **Cloud Snapshots & Export**: Inspect automatic KV backup snapshots and download full data exports (`GET /api/v1/backups`, `GET /api/v1/export`). 9. **In-App AI Copilot Chat**: Query 888travel's internal AI travel assistant with active trip context to generate structured proposal cards (`POST /api/v1/copilot/chat`). 10. **Manual Invariant Protection**: All items created via the Agent API are stamped with `source: "manual"`. They will NEVER be overwritten or deleted by automated background calendar or email synchronization. 11. **Instance Health & Status**: Inspect instance health, version, trip counts, and active integration flags (`GET /api/v1/status`). ## Quick API Reference ### Base URL & Authentication - Base URL: `https:///api/v1` - Header: `Authorization: Bearer rr_agent_` - Content-Type: `application/json` ### Endpoints Index - `GET /api/v1/status`: Instance health, metrics, and integrations status. - `GET /api/v1/trips`: List all trips with summary metrics and segments. - `POST /api/v1/trips`: Create a new trip with destination, dates, notes, and optional initial segments. - `GET /api/v1/trips/:id`: Retrieve single trip details by ID. - `PUT /api/v1/trips/:id`: Update trip destination, dates, timezone, photo, or notes. - `DELETE /api/v1/trips/:id`: Delete a trip and its itinerary. - `POST /api/v1/trips/:id/segments`: Append single segment or batch array of segments (with optional fallback plans). - `PUT /api/v1/trips/:id/segments/:sid`: Update an existing segment. - `DELETE /api/v1/trips/:id/segments/:sid`: Delete an itinerary segment with automatic tombstoning. - `POST /api/v1/trips/:id/segments/:sid/swap-fallback`: 1-Click swap primary plan with its backup fallback plan. - `POST /api/v1/places/search`: Search Google Places for verified venues, ratings, reviews, open status. - `POST /api/v1/places/details`: Fetch details for a specific Google Place ID. - `GET /api/v1/wishes`: List all wishlist travel radar items. - `POST /api/v1/wishes`: Add or update a wishlist radar item. - `DELETE /api/v1/wishes/:id`: Delete a wishlist radar item. - `POST /api/v1/sync`: Trigger on-demand sync of Google Calendar and Gmail. - `GET /api/v1/backups`: List automated weekly and pre-restore cloud snapshot backups. - `GET /api/v1/export`: Export complete instance JSON data backup. - `POST /api/v1/copilot/chat`: Chat with the in-app AI travel copilot with active trip context. ## Getting Started for Agents 1. Have the user generate an Agent API Key in the web app under Settings -> AI Agent Integration. 2. Verify connectivity with `GET /api/v1/status` or `GET /api/v1/trips`. 3. Read [/skill.md](https://travel.david888.com/skill.md) or [/llms-full.txt](https://travel.david888.com/llms-full.txt) for detailed schemas and prompt engineering guidelines.