
Integrate AI-powered travel planning, real-time flight & hotel search, destination data, and itinerary generation into your own products.
From indie developers to enterprise travel platforms — our API fits every scale.
Embed AI itinerary generation and live flight search directly into your booking platform.
Power your travel app with destination data, weather, and hotel search via REST.
Build custom travel tools, bots, or dashboards using our clean, well-documented API.
Integrate Tour Frontier's AI recommendations into your existing travel portal.
Explore our REST API endpoints. All responses are JSON. Base URL: https://api.tourfrontier.com
/v1/destinationsReturns a paginated list of destinations with metadata, ratings, and travel tips.
limitintegerNumber of results (max 100)offsetintegerPagination offsetregionstringFilter by region (e.g. "europe"){
"status": "success",
"data": {
"id": "paris-france",
"name": "Paris",
"country": "France",
"region": "europe",
"rating": 4.9,
"avg_temp_c": 12,
"best_months": ["Apr", "May", "Sep", "Oct"],
"highlights": [
"Eiffel Tower",
"Louvre Museum",
"Montmartre",
"Seine River Cruise"
],
"avg_daily_budget_usd": 180,
"visa_required": false
}
}Authenticate with your API key, make your first request, and start building. Our REST API follows standard conventions — no SDKs required, though we offer them for JavaScript, Python, and Go.
// Install: npm install axios const axios = require('axios'); const response = await axios.get( 'https://api.tourfrontier.com/v1/destinations', { headers: { 'Authorization': `Bearer $${YOUR_API_KEY}`, } } ); console.log(response.data);
All API requests must be authenticated. Choose the method that fits your architecture — all keys are scoped to your plan and can be rotated at any time.
API Key Format
Live keys are prefixed tf_live_ and test keys are prefixed tf_test_. Never expose live keys in client-side code or public repositories.
Pass your API key as a Bearer token in the Authorization header. This is the recommended method for server-side requests.
// HTTP Header
Authorization: Bearer YOUR_API_KEY
// Example with fetch
const res = await fetch('https://api.tourfrontier.com/v1/destinations', {
headers: {
'Authorization': 'Bearer tf_live_abc123xyz',
'Content-Type': 'application/json'
}
});Never expose keys client-side
Store API keys in environment variables or a secrets manager. Never commit them to version control.
Rotate keys regularly
Rotate your API keys every 90 days or immediately if you suspect a compromise. Old keys are invalidated instantly.
Use scoped permissions
Request only the OAuth scopes your app needs. Principle of least privilege reduces your attack surface.
Rate limits are enforced per API key using a sliding window algorithm. Exceeding limits returns a 429 Too Many Requests response.
| Plan | Per Minute | Per Hour | Per Day |
|---|---|---|---|
| Sandbox | 10 req/min | 100 req/hr | 1,000 req/day |
| Growth | 120 req/min | 5,000 req/hr | 50,000 req/day |
| Enterprise | Custom | Custom | Unlimited |
X-RateLimit-LimitTotal requests allowed in the current windowX-RateLimit-RemainingRequests remaining in the current windowX-RateLimit-ResetUnix timestamp when the window resetsRetry-AfterSeconds to wait before retrying (only on 429 responses)async function fetchWithRetry(
url: string,
options: RequestInit,
maxRetries = 3
): Promise<Response> {
for (let attempt = 0; attempt <= maxRetries; attempt++) {
const res = await fetch(url, options);
if (res.status !== 429) return res;
const retryAfter = res.headers.get('Retry-After');
const delay = retryAfter
? parseInt(retryAfter) * 1000
: Math.pow(2, attempt) * 1000; // exponential backoff
console.warn(`Rate limited. Retrying in ${delay}ms...`);
await new Promise((r) => setTimeout(r, delay));
}
throw new Error('Max retries exceeded');
}Pro Tip: Cache responses
Destination data and weather forecasts change infrequently. Cache responses for 5–15 minutes to dramatically reduce your request count and improve latency.
All errors return a consistent JSON body with error.code, error.message, and an optional error.details array.
HTTP Status Codes
OK
Request succeeded. Response body contains the requested data.
Created
Resource created successfully (e.g. new itinerary generated).
Bad Request
Invalid request parameters. Check the error.details field for specifics.
Unauthorized
Missing or invalid API key. Verify your Authorization header.
Forbidden
Valid key but insufficient permissions for this endpoint or plan.
Not Found
The requested resource does not exist.
Unprocessable
Request body is valid JSON but fails business logic validation.
Too Many Requests
Rate limit exceeded. Check Retry-After header and back off.
Server Error
Unexpected server error. Retry with exponential backoff.
Service Unavailable
Temporary outage. Check status.tourfrontier.com for updates.
// 401 Unauthorized
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key.",
"docs": "https://docs.tourfrontier.com/auth"
}
}
// 422 Validation Error
{
"error": {
"code": "VALIDATION_FAILED",
"message": "Request validation failed.",
"details": [
{
"field": "duration",
"issue": "Must be between 1 and 30 days"
},
{
"field": "interests",
"issue": "At least one interest is required"
}
]
}
}
// 429 Rate Limited
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Slow down.",
"retry_after": 12
}
}Quick Debugging Checklist
Tell us a bit about your project and we'll get you set up with API credentials within 1 business day. For urgent needs, contact us directly.
We use cookies to enhance your experience
We use cookies to personalize content, analyze traffic, and improve our services. By clicking "Accept All", you consent to our use of cookies. Cookie Policy & Privacy Policy