Plantrip Agent API

Build AI-powered travel experiences with our comprehensive API. Create itineraries, generate packing lists, get travel insights, and more.

Sign In to Get Started View Documentation
{ }

What You Can Build

Integrate Plantrip's AI-powered travel tools into your applications

🗺

AI Itineraries

Generate complete day-by-day travel itineraries with activities, costs, and locations.

🎒

Packing Lists

Create personalized packing lists based on destination, weather, and activities.

☁️

Weather Insights

Get detailed climate information and weather patterns for any destination.

💰

Cost Estimates

Generate budget breakdowns for accommodations, food, transport, and activities.

🧭

Travel Expert

Ask any travel question and get expert answers with current information.

📖

Travel Guides

Search our library of destination guides and travel content.

API Keys

Sign in to create and manage your API keys.

Documentation

Authentication

Include your API key in the request headers:

# Option 1: X-API-Key header curl -H "X-API-Key: pt_agent_your_key_here" \ https://plantrip.io/api/agent/tools # Option 2: Authorization Bearer header curl -H "Authorization: Bearer pt_agent_your_key_here" \ https://plantrip.io/api/agent/tools

Base URL

https://plantrip.io/api/agent/

Rate Limits

  • 60 requests/minute (default)
  • 10,000 requests/day (default)

Rate limit headers are included in responses: X-RateLimit-Remaining-Minute and X-RateLimit-Remaining-Day

Response Format

All responses are JSON. Successful responses include "success": true:

{ "success": true, "itinerary_id": 12345, "status": "step2_in_progress" }

Error responses include "error": true and a message:

{ "error": true, "message": "Invalid API key" }

Get the full list of tools with parameters: GET /api/agent/tools

Itinerary Tools
  • create_itinerary - Create a new travel itinerary (async)
  • get_itinerary_status - Poll generation status
  • get_itinerary - Retrieve complete itinerary
  • modify_itinerary - Modify with natural language
  • list_user_trips - List saved trips
  • save_itinerary - Save to user's trips
  • delete_trip - Remove from saved trips
Travel Tools
  • generate_packing_list - AI packing list
  • ask_travel_expert - Travel Q&A
  • get_weather_insights - Weather/climate info
  • estimate_trip_cost - Budget breakdown
Content Tools
  • search_guides - Search travel guides
  • get_tour_availability - Check tour dates
  • submit_tour_inquiry - Tour booking inquiry
Create an Itinerary
curl -X POST https://plantrip.io/api/agent/execute \ -H "X-API-Key: pt_agent_your_key" \ -H "Content-Type: application/json" \ -d '{ "tool": "create_itinerary", "arguments": { "destination": "Tokyo, Japan", "days": 5, "preferences": "food and culture" } }'
Check Status
curl -X POST https://plantrip.io/api/agent/execute \ -H "X-API-Key: pt_agent_your_key" \ -H "Content-Type: application/json" \ -d '{ "tool": "get_itinerary_status", "arguments": { "itinerary_id": 12345 } }'
Ask Travel Expert
curl -X POST https://plantrip.io/api/agent/execute \ -H "X-API-Key: pt_agent_your_key" \ -H "Content-Type: application/json" \ -d '{ "tool": "ask_travel_expert", "arguments": { "question": "What are the visa requirements for US citizens visiting Vietnam?" } }'
OpenAI Function Calling Format

The /api/agent/tools endpoint returns tool definitions compatible with OpenAI's function calling format:

// Get tool definitions for your AI agent const response = await fetch('https://plantrip.io/api/agent/tools', { headers: { 'X-API-Key': 'pt_agent_your_key' } }); const { tools } = await response.json(); // Use with OpenAI const completion = await openai.chat.completions.create({ model: 'gpt-4', messages: [...], functions: tools, function_call: 'auto' });
Model Context Protocol (MCP) Server

Use Plantrip tools directly with Claude Desktop or other MCP-compatible clients.

Installation
# Clone and install git clone https://github.com/plantrip/mcp-server.git cd mcp-server npm install npm run build
Claude Desktop Configuration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{ "mcpServers": { "plantrip": { "command": "node", "args": ["/path/to/mcp-server/dist/index.js"], "env": { "PLANTRIP_API_KEY": "pt_agent_your_key" } } } }
Available Tools in Claude

Once configured, you can ask Claude to:

  • "Create a 5-day itinerary for Tokyo focused on food"
  • "What should I pack for a hiking trip to Patagonia in March?"
  • "What's the weather like in Bali in August?"
  • "How much would a week in Iceland cost for 2 people?"