# @2bad/ryanair

> Unofficial typescript client for the Ryanair API that allows you to easily retrieve information about airports, flights and prices.

Latest version **8.1.0** (published 2026-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @2bad/ryanair
pnpm add @2bad/ryanair
yarn add @2bad/ryanair
bun add @2bad/ryanair
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 8.1.0 |
| Published | 2026-08-02 |
| First published | 2023-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=26 |
| Dependencies | 5 |
| Unpacked size | 77.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 33 |
| Author | 2BAD (https://github.com/2BAD) |
| Maintainers | mrhyde, armordarks |
| Keywords | api-client, api, client, rest-client, rest, ryanair, typescript |

## Links

- npm: https://www.npmjs.com/package/@2bad/ryanair
- Repository: https://github.com/2BAD/ryanair
- Homepage: https://github.com/2BAD/ryanair#readme
- Issues: https://github.com/2BAD/ryanair/issues
- npm.io page: https://npm.io/package/@2bad/ryanair

## Dependencies (5)

- [got](https://npm.io/package/got.md) 15.1.0
- [zod](https://npm.io/package/zod.md) 4.4.3
- [hpagent](https://npm.io/package/hpagent.md) 1.2.0
- [date-fns](https://npm.io/package/date-fns.md) 4.4.0
- [fast-cartesian](https://npm.io/package/fast-cartesian.md) 9.0.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 8.1.0 (latest) — 2026-08-02
- 8.0.0 — 2026-05-11
- 7.1.2 — 2024-12-22
- 7.1.1 — 2024-06-10
- 7.0.0 — 2024-01-23
- 6.0.1 — 2023-11-03
- 6.0.0 — 2023-10-31
- 5.0.0 — 2023-07-20
- 4.0.0 — 2023-06-23
- 3.0.0 — 2023-05-20
- 2.0.2 — 2023-05-11
- 2.0.1 — 2023-05-11
- 2.0.0 — 2023-05-08
- 1.0.0 — 2023-04-13

## README

# Ryanair API

[![NPM version](https://img.shields.io/npm/v/@2bad/ryanair)](https://www.npmjs.com/package/@2bad/ryanair)
[![License](https://img.shields.io/npm/l/@2bad/ryanair)](https://www.npmjs.com/package/@2bad/ryanair)
[![GitHub Build Status](https://img.shields.io/github/actions/workflow/status/2BAD/ryanair/build.yml)](https://github.com/2BAD/ryanair/actions/workflows/build.yml)
[![Code coverage](https://img.shields.io/codecov/c/github/2BAD/ryanair)](https://codecov.io/gh/2BAD/ryanair)
[![Written in TypeScript](https://img.shields.io/github/languages/top/2BAD/ryanair)](https://github.com/2BAD/ryanair/search?l=typescript)
[![Postman Collection](https://img.shields.io/badge/postman-collection-ff6c37)](https://www.postman.com/hakkotsu/workspace/ryanair)

Unofficial TypeScript client for Ryanair's API that provides easy access to flights, fares, and airport information.

## Install

```shell
npm install @2bad/ryanair
```

**Warning:** This package is native [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and no longer provides a CommonJS export. If your project uses CommonJS, you will have to [convert to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) or use the [dynamic `import()`](https://v8.dev/features/dynamic-import) function. Please don't open issues for questions regarding CommonJS / ESM.

## Usage

```typescript
import { airports, fares, flights } from '@2bad/ryanair'

// Find your nearest airport
const closest = await airports.getClosest()

// Check available flight dates
const dates = await flights.getDates('BER', 'DUB')

// Get cheapest fares for your trip
const deals = await fares.getCheapestPerDay('BER', 'DUB', '2024-02-01')
```

## API Overview

### Airports API
- Get active airports list
- Find nearest airports
- Discover available destinations
- View airport details
- Search flight routes

[View Airports Documentation →](docs/airports.md)

### Fares API
- Find cheapest daily fares
- Compare prices across date ranges
- Discover best round-trip deals
- Search by currency preference

[View Fares Documentation →](docs/fares.md)

### Flights API
- Check flight availability
- View flight schedules
- Search available dates
- Access flight details

[View Flights Documentation →](docs/flights.md)

## Understanding IATA Codes

IATA codes are three-letter identifiers used in aviation for airports worldwide. For example:
- `DUB` - Dublin Airport
- `BER` - Berlin Brandenburg Airport
- `STN` - London Stansted Airport

Find the complete list on [IATA's official website](https://www.iata.org/en/publications/directories/code-search/).

## Disclaimer

This is an unofficial package and is not affiliated with Ryanair. Usage is subject to Ryanair's API terms and conditions.

## Contributing

Contributions are welcome! Here's how you can help:

1. Fork the repository
2. Create a feature branch
3. Submit a pull request

Please ensure your code passes all tests and follows our coding standards.

## License

MIT © [2BAD](https://github.com/2BAD)

---

Need help? [Open an issue](https://github.com/2BAD/ryanair/issues) or check our [Postman collection](https://www.postman.com/hakkotsu/workspace/ryanair).

---
_Source: https://npm.io/package/@2bad/ryanair · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
