npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

amadeusnode

v0.0.41

Published

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

Readme

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

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

Core Methods

Flight Search

Basic Flight Search

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

Advanced Flight Search

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",
});

Hotel Search

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,
});

Airport & Location Search

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",
});

Recommended Destinations

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

Test Environment (Recommended for Development)

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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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.