# Ryanair API Documentation

<p><strong>Ryanair API Documentation</strong> Pass two IATA codes, an outbound range and either inbound dates or a stay length in nights. Inbound dates are derived from the outbound range and nights when omitted. Limit is 1 to 20. One request performs one upstream lookup and costs one credit when it succeeds.</p>

- **Documentation:** [https://scrappa.co/docs/ryanair-api/ryanair_fares_round_trip](https://scrappa.co/docs/ryanair-api/ryanair_fares_round_trip)
- **API group:** Ryanair API
- **Endpoint:** `GET https://scrappa.co/api/ryanair/fares/round-trip`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `origin` | string | Yes | Origin IATA code |
| `destination` | string | Yes | Destination IATA code |
| `departure_date_from` | string | Yes | First outbound date, YYYY-MM-DD |
| `departure_date_to` | string | Yes | Last outbound date, YYYY-MM-DD |
| `inbound_date_from` | string | No | First return date, YYYY-MM-DD. Required unless nights are given |
| `inbound_date_to` | string | No | Last return date, YYYY-MM-DD. Required unless nights are given |
| `nights_from` | integer | No | Minimum stay in nights. Required unless inbound dates are given |
| `nights_to` | integer | No | Maximum stay in nights. Required unless inbound dates are given |
| `limit` | integer | No | Maximum fares, 1 to 20 |

## Example response

```json
{
    "data": {
        "fares": [
            {
                "inbound": {
                    "price": 22
                },
                "outbound": {
                    "price": 20
                }
            }
        ]
    },
    "meta": {
        "credits": 1,
        "billable": true
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing or invalid. This response is not billed. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
