Personalized Tourist Planner avatar
Personalized Tourist Planner

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Personalized Tourist Planner

Personalized Tourist Planner

The Personalized Tourist Planner is an Apify Actor that generates customized multi-day travel itineraries for Indian destinations. It combines real-time data scraping with AI-powered optimization to create personalized trip plans based on user preferences.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

Chandan Kumar

Chandan Kumar

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 hours ago

Last modified

Categories

Share

Personalized Tourist Planner - Quick Start Guide

Overview

The Personalized Tourist Planner is an Apify Actor that generates customized multi-day travel itineraries for Indian destinations. It combines real-time data scraping with AI-powered optimization to create personalized trip plans based on user preferences.

Key Features

Dynamic Input-Based: Generates output entirely from user inputs - no hardcoded data
Real-Time Integration: Fetches live weather, attractions, accommodations, and fuel data
AI Optimization: Uses Claude 3.5 Sonnet or GPT-4o to create intelligent itineraries
Cost Estimation: Calculates accurate trip costs with ±10% accuracy
Intelligent Routing: Suggests attractions based on distance, type, and preferences
Risk Assessment: Identifies weather risks, EV charging availability, safety concerns

Quick Start (Local Development)

1. Prerequisites

  • Node.js 20+ (LTS)
  • npm 9+
  • Optional: Anthropic API key for Claude integration
  • Optional: OpenAI API key for GPT-4o integration

2. Installation

# Install dependencies
npm install
# Build TypeScript to JavaScript
npm run build
# OR run in development with ts-node (watches TypeScript)
npm run dev

3. Provide Input

The actor reads input from sample-input.json in development mode, or from Apify's input UI in production.

sample-input.json Example:

{
"startLocation": "Bengaluru, Karnataka",
"placeTypes": ["hills", "nature", "historical"],
"budget": 75000,
"durationDays": 7,
"groupSize": 5,
"vehicleType": "XUV700",
"preferences": ["EV charging", "fine dining", "adventure activities"],
"maxDistanceKm": 400,
"llmProvider": "anthropic",
"verbose": true
}

4. Run the Actor

Development Mode (with ts-node, auto-loads sample-input.json):

$npm run dev

Production Mode (compiled JavaScript):

$npm start

Input Schema

All inputs are validated according to input_schema.json:

ParameterTypeRequiredRangeDescription
startLocationstring✅ Yes-City and state (e.g., "Bengaluru, Karnataka")
placeTypesarray✅ Yes1+ itemsTypes: beaches, hills, temples, historical, wildlife, shopping, nature
budgetnumber✅ Yes₹10K-500KTotal trip budget in rupees
durationDaysnumber✅ Yes1-30Trip duration in days
groupSizenumber❌ No1-20Number of travelers (default: 1)
vehicleTypestring❌ NoSedan, SUV, EV, XUV700, Creta, etc.Vehicle type (default: sedan)
preferencesarray❌ Nogym stops, EV charging, luxury hotels, etc.Travel preferences
maxDistanceKmnumber❌ No50-1000Exploration radius from start (default: 500)
llmProviderstring❌ Noanthropic, openaiAI model to use (default: anthropic)
verboseboolean❌ Notrue/falseEnable detailed logging (default: false)

Output Schema

The actor returns a comprehensive itinerary object with:

{
success: boolean;
startLocation: {
name: string;
latitude: number;
longitude: number;
};
totalCost: number;
costBreakdown: {
fuel: number;
stay: number;
food: number;
attractions: number;
misc: number;
};
costEstimateAccuracy: string;
itinerary: Array<{
day: number;
places: string[];
distance: number;
cost: number;
activities: string;
accommodation: string;
meals: string[];
}>;
attractions: Array<{
name: string;
type: string;
location: string;
lat: number;
lon: number;
description: string;
entryFee: number;
openingHours: string;
distanceFromStart: number;
}>;
accommodations: Array<{
location: string;
name: string;
type: string;
category: string;
pricePerNight: number;
rating: string;
amenities: string[];
}>;
transportation: {
vehicleType: string;
totalDistanceKm: number;
fuelNeeded: number;
fuelCostEstimate: number;
mileage: number;
chargingStops: string[];
};
risks: string[];
recommendations: string[];
maps: Array<{
destination: string;
url: string;
}>;
generatedAt: string;
llmModel?: string;
error?: string;
}

Development Workflow

Running with Custom Input

Create a new JSON file with your inputs:

cat > my-trip.json << 'EOF'
{
"startLocation": "Mysore, Karnataka",
"placeTypes": ["historical", "shopping"],
"budget": 50000,
"durationDays": 3,
"groupSize": 2,
"vehicleType": "sedan"
}
EOF

Then modify src/main.ts to load from this file in dev mode, or deploy to Apify and use the UI.

Building and Testing

# Build TypeScript
npm run build
# Check for lint errors
npm run lint
# Run compiled version
npm start

Deployment to Apify

  1. Install Apify CLI:

    $npm install -g apify-cli
  2. Initialize/login:

    $apify login
  3. Push to Apify:

    $apify push
  4. The actor will be deployed with:

    • Input schema from input_schema.json
    • Output schema from .actor/output_schema.json
    • Actor specification from .actor/actor.json

Environment Variables

For LLM integration, set these environment variables:

# For Anthropic Claude
export ANTHROPIC_API_KEY="your-anthropic-key"
# For OpenAI GPT-4o
export OPENAI_API_KEY="your-openai-key"

Without these, the actor will generate a fallback itinerary based on available attractions.

Project Structure

Tourplanner/
├── .actor/
│ ├── actor.json # Actor specification v1
│ └── output_schema.json # Output schema definition
├── src/
│ ├── main.ts # Actor entry point (10-step workflow)
│ ├── types/
│ │ └── itinerary.ts # TypeScript interfaces
│ └── utils/
│ ├── geocoder.ts # Nominatim location geocoding
│ ├── weather.ts # Open-Meteo weather API
│ ├── scraper.ts # Attractions/accommodations database
│ ├── costCalculator.ts # Trip cost estimation
│ └── llm.ts # Claude/GPT-4o integration
├── dist/ # Compiled JavaScript (generated)
├── input_schema.json # Input validation schema
├── sample-input.json # Example input for testing
├── package.json # npm configuration
├── tsconfig.json # TypeScript configuration
└── .eslintrc.json # ESLint rules

Data Sources

The actor integrates with these free and premium APIs:

SourcePurposeAPIStatus
NominatimLocation geocodingFree, no auth required✅ Active
Open-MeteoWeather forecastingFree, no auth required✅ Active
Internal DatabaseAttractions/accommodationsPre-loaded in code✅ Active
AnthropicAI itinerary generationRequires API key✅ Optional
OpenAIAI itinerary generationRequires API key✅ Optional

Example Usage

Scenario: Week-long Bangalore to Mysore/Coorg trip

Input:

{
"startLocation": "Bengaluru, Karnataka",
"placeTypes": ["hills", "nature", "historical"],
"budget": 100000,
"durationDays": 7,
"groupSize": 4,
"vehicleType": "XUV700",
"preferences": ["EV charging", "adventure activities", "fine dining"],
"maxDistanceKm": 300,
"llmProvider": "anthropic"
}

Output Highlights:

  • ✅ Start: Bengaluru geocoded to exact coordinates
  • ✅ Attractions: Mysore Palace, Nandi Hills, Jog Falls, Bandipur identified
  • ✅ Weather: 7-day forecast with temperature and rain risk
  • ✅ Cost: ₹87,500 estimated (fuel: ₹15K, stay: ₹35K, food: ₹25K, attractions: ₹10K, misc: ₹2.5K)
  • ✅ Route: 8 EV charging stops along optimal path
  • ✅ Accommodations: Mysore Heritage Inn, Coorg Coffee Estate Homestay
  • ✅ Itinerary: Day-by-day breakdown with places, activities, meals
  • ✅ Maps: Google Maps links to all attractions

Troubleshooting

"No input provided" Error

  • Dev mode: Ensure sample-input.json exists in project root
  • Production: Make sure input_schema.json is valid and provided via Apify UI

"LLM generation failed" Warning

  • Set ANTHROPIC_API_KEY or OPENAI_API_KEY environment variables
  • Actor continues with fallback itinerary if LLM fails
  • Not critical - all other data is still generated

"0 accommodations found"

  • Check that your start location matches a city in the accommodations database
  • Database includes: Bengaluru, Mysore, Coorg
  • Extend maxDistanceKm to search in neighboring cities

TypeScript Compilation Errors

  • Run npm install to ensure all dependencies are present
  • Run npm run build to check for type errors
  • ESLint: npm run lint to identify code quality issues

API Rate Limits

  • Nominatim: 1 request/second (built-in delay)
  • Open-Meteo: 10,000 requests/day (typically no limit in practice)
  • Anthropic: Depends on subscription (rate-limited per account)
  • OpenAI: Depends on subscription (rate-limited per account)

Performance Characteristics

  • Geocoding: 2-5 seconds per location
  • Weather: 1-2 seconds
  • Attractions/accommodations: <1 second (database lookups)
  • LLM Generation: 10-30 seconds (Claude/GPT-4o depending on request size)
  • Total Runtime: 20-40 seconds (without LLM) to 30-70 seconds (with LLM)

Support & Issues

For issues or feature requests, check the documentation in:

  • README.md - Full project documentation
  • DEPLOYMENT.md - Production deployment guide
  • INTEGRATION.md - Integration with other systems
  • PROJECT_SUMMARY.md - Technical architecture

Version: 1.0.0
Last Updated: 11 December 2025
Status: Production Ready ✅