Socket
Book a DemoInstallSign in
Socket

amadeusnode

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amadeusnode

A comprehensive TypeScript client for the Amadeus API, providing easy access to flight search, hotel booking, airport information, and travel-related data.

0.0.41
latest
npmnpm
Version published
Weekly downloads
6
100%
Maintainers
1
Weekly downloads
 
Created
Source

THIS README WAS WRITTEN BY CURSOR. TEXT @raamas70 on x.com if u need help thx

Amadeus API Client

A comprehensive TypeScript client for the Amadeus API, providing easy access to flight search, hotel booking, airport information, and travel-related data.

Features

  • ✈️ Flight Search - Search for flights, get price metrics, and find cheapest dates
  • 🏨 Hotel Search - Find hotels by city, geolocation, or specific IDs
  • 🗺️ Airport & City Search - Search for airports and cities worldwide
  • 📊 Price Analytics - Get pricing trends and fare analysis
  • 🎯 Recommendations - Get personalized destination recommendations
  • 📱 Real-time Status - Check flight status and operational details
  • 🔐 Automatic Authentication - Handles OAuth 2.0 token management
  • 🧪 Test & Production - Support for both sandbox and live environments

Installation

npm install amadeus-node-client

Quick Start

import { AmadeusClient } from "amadeus-node-client";

// Initialize the client
const amadeus = new AmadeusClient(
  "your-api-key",
  "your-api-secret",
  "test" // or "production"
);

// Search for flights
const flights = await amadeus.getFlightOffers("LAX", "JFK", "2024-01-15");

// Search for hotels
const hotels = await amadeus.getHotelsByCity("LAX");

API Key Setup

  • Visit the Amadeus Developer Portal
  • Create an account and register your application
  • Get your API key and secret
  • Use "test" mode for development, "production" for live data

Core Methods

const flights = await amadeus.getFlightOffers("LAX", "JFK", "2024-01-15");
const flights = await amadeus.getFlightOffers("LAX", "JFK", "2024-01-15", {
  returnDate: "2024-01-22",
  adults: 2,
  travelClass: "ECONOMY",
  nonStop: true,
  currencyCode: "USD",
  max: 20,
});

Price Metrics

const metrics = await amadeus.flightPriceMetrics("LAX", "JFK", "2024-01-15", {
  currencyCode: "USD",
  oneWay: "true",
});

Cheapest Flight Dates

const dates = await amadeus.cheapestFlightDate("LAX", "JFK", {
  departureDate: "2024-01-15",
  oneWay: "true",
  maxPrice: 500,
  currencyCode: "USD",
});

Search Hotels by City

const hotels = await amadeus.getHotelsByCity("LAX", {
  radius: 10,
  radiusUnit: "KM",
  ratings: ["4", "5"],
  amenities: "SPA",
});

Search Hotels by Coordinates

const hotels = await amadeus.getHotelsByGeocode(34.0522, -118.2437, {
  radius: 10,
  radiusUnit: "KM",
  ratings: ["4", "5"],
});

Get Hotel Offers

const offers = await amadeus.getHotelOffers(["HOTEL1", "HOTEL2"], {
  adults: 2,
  checkInDate: "2024-01-15",
  checkOutDate: "2024-01-18",
  currency: "USD",
  bestRateOnly: true,
});

Search Airports and Cities

// Search for cities
const cities = await amadeus.airportCitySearch("CITY", "Los Angeles", {
  countryCode: "US",
  view: "FULL",
});

// Search for airports
const airports = await amadeus.airportCitySearch("AIRPORT", "LAX");

Get Airport Routes

const routes = await amadeus.getAirportRoutes("LAX", {
  max: 20,
  arrivalCountryCode: "US",
});

Travel Insights

Cheap Flight Destinations

const destinations = await amadeus.cheapFlightDestinations("LAX", {
  departureDate: "2024-01-15",
  oneWay: "true",
  maxPrice: 500,
  currencyCode: "USD",
  viewBy: "COUNTRY",
});
const recommendations = await amadeus.recommendedDestinations(["LAX", "JFK"], {
  travelerCountryCode: "US",
  destinationCountryCodes: "US,ES,UK",
});

Flight Status

const status = await amadeus.getFlightStatus("AA", "100", "2024-01-15", {
  operationalSuffix: "A",
});

Error Handling

The client includes comprehensive error handling:

try {
  const flights = await amadeus.getFlightOffers("LAX", "JFK", "2024-01-15");
  console.log("Flights found:", flights.data?.length);
} catch (error) {
  console.error("API Error:", error.message);
}

Response Types

All methods return properly typed responses. Import types for better TypeScript support:

import {
  getFlightOffersResponse,
  getHotelsResponse,
  AirportCitySearchResponse,
} from "./responseTypes";

Environment Configuration

const amadeus = new AmadeusClient("test-key", "test-secret", "test");

Production Environment

const amadeus = new AmadeusClient("prod-key", "prod-secret", "production");

Rate Limits

The Amadeus API has rate limits:

  • Test Environment: 1000 calls per month
  • Production Environment: Varies by subscription

Monitor your usage in the Amadeus Developer Portal.

Contributing

  • Fork the repository
  • Create a feature branch (git checkout -b feature/amazing-feature)
  • Commit your changes (git commit -m 'Add amazing feature')
  • Push to the branch (git push origin feature/amazing-feature)
  • Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Changelog

v1.0.0

  • Initial release
  • Complete Amadeus API coverage
  • TypeScript support
  • Comprehensive documentation
  • Error handling
  • Test and production environment support

Note: This client is not officially affiliated with Amadeus. For official support, please contact Amadeus directly.

Keywords

api

FAQs

Package last updated on 02 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.