Get up and running with the YGO API in minutes. This guide walks you through making your first package search request.Looking for AI-powered search? Check out AI Search & Planning to learn about YGO AI's natural language search, intelligent itinerary generation, and multi-source data augmentation capabilities. Prerequisites#
Before you start, make sure you have:✅ Your API token (check your email from the YGO team)
✅ Access to a terminal or API client (curl, Postman, Insomnia, etc.)
✅ Basic understanding of REST APIs and JSON
New to APIs? We recommend using Postman or Insomnia for a visual interface while you're learning. Your First Request: Search for Packages#
Let's search for hotel + flight packages to Paris for a 4-night stay in December 2025.Request#
Replace your_api_token_here with your actual API token.Use your Sandbox API token for this first test. The API will automatically route your request to the test environment with safe, non-production data.
Response#
You'll receive a JSON response with available packages:{
"searchId": "srch_abc123",
"packages": [
{
"id": "pkg_xyz789",
"totalPrice": {
"amount": 1250.00,
"currency": "USD"
},
"hotel": {
"name": "Le Grand Hotel Paris",
"rating": 4,
"location": "8th Arrondissement",
"roomType": "Deluxe Double Room"
},
"flight": {
"outbound": {
"departure": "2025-12-01T10:30:00Z",
"arrival": "2025-12-01T22:45:00Z",
"airline": "Air France",
"flightNumber": "AF123"
},
"return": {
"departure": "2025-12-05T14:15:00Z",
"arrival": "2025-12-05T17:30:00Z",
"airline": "Air France",
"flightNumber": "AF456"
}
}
}
],
"meta": {
"totalResults": 47,
"page": 1,
"pageSize": 10
}
}
What Just Happened?#
1.
AI-Enhanced Search - The API used AI to find optimal hotel and flight combinations
2.
Multi-Supplier Results - Results came from Peakwork, Amadeus, and other connected suppliers
3.
Bundled Pricing - Each package shows the total price for hotel + flights together
Response Times: Search requests typically return in 2-5 seconds. The API aggregates results from multiple suppliers in real-time.
Understanding the Search Request#
Let's break down the request parameters:| Parameter | Type | Required | Description |
|---|
destination | string | Yes | City or destination name |
origin | string | Yes | Departure city for flights |
checkIn | string | Yes | Check-in date (ISO 8601: YYYY-MM-DD) |
checkOut | string | Yes | Check-out date (ISO 8601: YYYY-MM-DD) |
guests.adults | integer | Yes | Number of adult travelers (18+) |
guests.children | array | No | Array of child ages (e.g., [5, 12]) |
budget | object | No | Price range filter (see Search API Reference) |
Next Steps#
Now that you've made your first search, you can:Common Issues#
"Invalid or missing authorization token"#
Double-check that you included the Authorization: Bearer header
Verify you included the "Bearer " prefix before your token
Confirm you copied the full token (no extra spaces)
Ensure your token hasn't been revoked or expired
Dates must be in YYYY-MM-DD format
Check-out date must be after check-in date
Dates must be in the future
No results returned#
This is normal! Availability depends on:Your supplier credentials (Peakwork, Amadeus test accounts in Sandbox)
Date range (some dates may have no availability)
Destination (try major cities like "Paris", "London", "New York")
Testing Tip: In Sandbox, use popular destinations and dates 2-4 months in the future for best test results.
Get Help#
Stuck? Here's how to get support:Documentation: Check the API Reference for detailed endpoint specs Account Manager: Contact your YGO account manager directly