Virgin Atlantic
Virgin Atlantic flight search: one-way and round-trip itineraries with every flight, aircraft, connection and each fare family's price, taxes and availability.
Call these actions with your String API key; see Authentication. Every call answers with the envelope described in Responses & errors, whose data holds the rows below.
- Site:
virginatlantic - Version:
1.0.0 - Reads from:
virginatlantic.com
| Action | Description | Listed price |
|---|---|---|
search | Search Virgin Atlantic for one-way or round-trip flights between two airports on a date, for up to 9 passengers. Rows are the itineraries the site lists, at most 20, each with every flight's number, operating airline, aircraft, times and connection, and every fare family from Economy Light to Upper Class with its price, taxes, booking classes and availability. A round trip returns the outbound flights, each fare priced for the whole trip; pass a fare's offerId and the searchId to return-flights for the return flights. Prices are cash fares; Virgin Points fares need a signed-in account and are not read. | Billed per request at your plan's rates |
return-flights | List a Virgin Atlantic round trip's return flights once an outbound fare is chosen: pass the searchId and a fare's offerId from a round-trip search's rows. Rows have the same shape as search's, every fare priced for the whole trip with the chosen outbound fare. A search's ids are good for a short while only, so call this soon after the search. | Billed per request at your plan's rates |
search
Search Virgin Atlantic for one-way or round-trip flights between two airports on a date, for up to 9 passengers. Rows are the itineraries the site lists, at most 20, each with every flight's number, operating airline, aircraft, times and connection, and every fare family from Economy Light to Upper Class with its price, taxes, booking classes and availability. A round trip returns the outbound flights, each fare priced for the whole trip; pass a fare's offerId and the searchId to return-flights for the return flights. Prices are cash fares; Virgin Points fares need a signed-in account and are not read.
POST https://request.usestring.ai/v1/integrations/virginatlantic/searchInput
Unknown fields are rejected.
| Field | Type | Description |
|---|---|---|
origin | string | Required. The departure airport's IATA code, such as LHR. Matches ^[A-Za-z]{3}$. |
destination | string | Required. The arrival airport's IATA code, such as JFK. Matches ^[A-Za-z]{3}$. |
departureDate | string | Required. The outbound date, YYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$. |
returnDate | string | The return date, YYYY-MM-DD, for a round trip. Omit for one way. Matches ^\d{4}-\d{2}-\d{2}$. |
adults | integer | Adult passengers, 16 or older. Defaults to 1. From 1 to 9. |
teens | integer | Passengers aged 12 to 15. From 0 to 9. |
children | integer | Passengers aged 2 to 11. From 0 to 9. |
infants | integer | Infants under 2, on an adult's lap, at most one per adult. From 0 to 9. |
currency | string | The currency of prices, ISO 4217 such as USD. Defaults to the currency the site quotes the origin in. Matches ^[A-Za-z]{3}$. |
Output
data is an array of rows, one per result. Each row has:
| Field | Type | Description |
|---|---|---|
position | integer | Position in the results, from 1, in Virgin Atlantic's order. |
searchId | string | The search these results belong to. Pass it with a fare's offerId to return-flights to list a round trip's return flights. |
roundTrip | boolean | Whether the search was a round trip, so every price covers the whole trip. |
origin | string | The departure airport's IATA code. |
originCity | string | — |
destination | string | The arrival airport's IATA code. |
destinationCity | string | — |
departureTime | string | Local time at the departure airport, YYYY-MM-DDTHH:MM. |
arrivalTime | string | Local time at the arrival airport, YYYY-MM-DDTHH:MM. |
durationMinutes | integer | Total travel time, connections included. |
stops | integer | Connections between flights plus stops a flight makes on the way. |
flights | object[] | Each flight of the itinerary, in order. |
flights[].flightNumber | string | The marketing flight number, such as VS3. |
flights[].airlineCode | string | — |
flights[].airline | string | — |
flights[].operatingFlightNumber | string | The flight number of the airline flying it, the same as flightNumber unless the flight is a codeshare. |
flights[].operatingAirlineCode | string | — |
flights[].operatingAirline | string | — |
flights[].origin | string | — |
flights[].originCity | string | — |
flights[].destination | string | — |
flights[].destinationCity | string | — |
flights[].departureTime | string | Local time at the departure airport, YYYY-MM-DDTHH:MM. |
flights[].arrivalTime | string | Local time at the arrival airport, YYYY-MM-DDTHH:MM. |
flights[].durationMinutes | integer | — |
flights[].stops | integer | Stops the flight makes without a change of flight number. |
flights[].aircraft | string | null | The aircraft type, such as Boeing 787-9. |
flights[].connectionMinutes | integer | null | Time on the ground before the next flight. Null on the last flight. |
lowestPrice | number | null | The cheapest available fare's price for every passenger, taxes included. Null when every fare is sold out. |
currency | string | ISO 4217 currency of every price. |
fares | object[] | Every fare family the itinerary is listed with, available or not, in Virgin Atlantic's order. |
fares[].fareFamily | string | Virgin Atlantic's fare family code, such as ECONOMY-LIGHT or BUS-FIRST. |
fares[].name | string | null | The fare as the site names it, such as Economy Light or Upper Class. Null when the fare is not available. |
fares[].status | available soldOut notOffered | available, soldOut or notOffered. |
fares[].price | number | null | The price for every passenger, taxes included: the whole trip's for a round trip. Null unless available. |
fares[].baseFare | number | null | The price before taxes and carrier charges. |
fares[].taxes | number | null | Taxes, fees and carrier charges in the price. |
fares[].currency | string | — |
fares[].saver | boolean | Whether the site marks the fare as a saver fare. |
fares[].bookingClasses | string[] | The booking class of each flight, in order, such as T. |
fares[].offerId | string | null | Selects this fare: for a round trip's outbound flight, pass it to return-flights with searchId. Null unless available. |
Example
curl https://request.usestring.ai/v1/integrations/virginatlantic/search \
-H "Authorization: Bearer $STRING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin": "JFK",
"destination": "LHR",
"departureDate": "2027-01-12",
"returnDate": "2027-01-19",
"adults": 2,
"children": 1,
"currency": "USD"
}'data starts with these rows:
[
{
"position": 1,
"searchId": "a4f982ea-06a6-480a-9a4f-62b1819332fc",
"roundTrip": true,
"origin": "JFK",
"originCity": "New York",
"destination": "LHR",
"destinationCity": "London Heathrow",
"departureTime": "2027-01-12T08:00",
"arrivalTime": "2027-01-12T20:10",
"durationMinutes": 430,
"stops": 0,
"flights": [
{
"flightNumber": "VS26",
"airlineCode": "VS",
"airline": "Virgin Atlantic",
"operatingFlightNumber": "VS26",
"operatingAirlineCode": "VS",
"operatingAirline": "Virgin Atlantic",
"origin": "JFK",
"originCity": "New York",
"destination": "LHR",
"destinationCity": "London Heathrow",
"departureTime": "2027-01-12T08:00",
"arrivalTime": "2027-01-12T20:10",
"durationMinutes": 430,
"stops": 0,
"aircraft": "Airbus A330-900neo",
"connectionMinutes": null
}
],
"lowestPrice": 1814.97,
"currency": "USD",
"fares": [
{
"fareFamily": "ECONOMY-LIGHT",
"name": "Economy Light",
"status": "available",
"price": 1814.97,
"baseFare": 3,
"taxes": 1811.97,
"currency": "USD",
"saver": false,
"bookingClasses": ["T"],
"offerId": "7abd4e12-805f-488f-8547-325c7e57a303|97d132cc-8c5e-42e3-a92a-0185dc377941-FL-1"
},
{
"fareFamily": "ECON",
"name": "Economy Classic",
"status": "available",
"price": 2534.67,
"baseFare": 723,
"taxes": 1811.67,
"currency": "USD",
"saver": false,
"bookingClasses": ["O"],
"offerId": "7abd4e12-805f-488f-8547-325c7e57a303|97d132cc-8c5e-42e3-a92a-0185dc377941-FL-2"
},
{
"fareFamily": "ECON-CLASSIC-FLEXIBLE",
"name": "Economy Classic Flex",
"status": "available",
"price": 3734.67,
"baseFare": 1323,
"taxes": 2411.67,
"currency": "USD",
"saver": false,
"bookingClasses": ["O"],
"offerId": "7abd4e12-805f-488f-8547-325c7e57a303|97d132cc-8c5e-42e3-a92a-0185dc377941-FL-3"
},
{
"fareFamily": "ECONOMY-DELIGHT",
"name": "Economy Delight",
"status": "available",
"price": 2902.17,
"baseFare": 1053,
"taxes": 1849.17,
"currency": "USD",
"saver": false,
"bookingClasses": ["V"],
"offerId": "7abd4e12-805f-488f-8547-325c7e57a303|97d132cc-8c5e-42e3-a92a-0185dc377941-FL-4"
},
{
"fareFamily": "ECON-DELIGHT-FLEXIBLE",
"name": "Economy Delight Flex",
"status": "available",
"price": 4582.17,
"baseFare": 2133,
"taxes": 2449.17,
"currency": "USD",
"saver": false,
"bookingClasses": ["V"],
"offerId": "7abd4e12-805f-488f-8547-325c7e57a303|97d132cc-8c5e-42e3-a92a-0185dc377941-FL-5"
},
{
"fareFamily": "COMFORT-PLUS-PREMIUM-ECON",
"name": "Premium",
"status": "available",
"price": 6447.57,
"baseFare": 1023,
"taxes": 5424.57,
"currency": "USD",
"saver": false,
"bookingClasses": ["K"],
"offerId": "7abd4e12-805f-488f-8547-325c7e57a303|97d132cc-8c5e-42e3-a92a-0185dc377941-FL-6"
},
{
"fareFamily": "COMFORT-PLUS-PREMIUM-FLEXIBLE",
"name": "Premium Flex",
"status": "available",
"price": 7887.57,
"baseFare": 2463,
"taxes": 5424.57,
"currency": "USD",
"saver": false,
"bookingClasses": ["K"],
"offerId": "7abd4e12-805f-488f-8547-325c7e57a303|97d132cc-8c5e-42e3-a92a-0185dc377941-FL-7"
},
{
"fareFamily": "BUS-FIRST",
"name": "Upper Class",
"status": "available",
"price": 16821.27,
"baseFare": 6054,
"taxes": 10767.27,
"currency": "USD",
"saver": false,
"bookingClasses": ["I"],
"offerId": "7abd4e12-805f-488f-8547-325c7e57a303|97d132cc-8c5e-42e3-a92a-0185dc377941-FL-8"
},
{
"fareFamily": "BUS-FIRST-FLEXIBLE",
"name": "Upper Class Flex",
"status": "available",
"price": 20271.27,
"baseFare": 9504,
"taxes": 10767.27,
"currency": "USD",
"saver": false,
"bookingClasses": ["I"],
"offerId": "7abd4e12-805f-488f-8547-325c7e57a303|97d132cc-8c5e-42e3-a92a-0185dc377941-FL-9"
}
]
}
]Requests and billing
- Requests: 1–2 Web Access requests per call.
- Billing:
passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.
return-flights
List a Virgin Atlantic round trip's return flights once an outbound fare is chosen: pass the searchId and a fare's offerId from a round-trip search's rows. Rows have the same shape as search's, every fare priced for the whole trip with the chosen outbound fare. A search's ids are good for a short while only, so call this soon after the search.
POST https://request.usestring.ai/v1/integrations/virginatlantic/return-flightsInput
Unknown fields are rejected.
| Field | Type | Description |
|---|---|---|
searchId | string | Required. The searchId of a round-trip search's rows. Matches ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$. |
offerId | string | Required. The offerId of the outbound fare chosen from that search. Matches ^[0-9A-Za-z-]{1,80}\\|[0-9A-Za-z-]{1,80}$. |
Output
data is an array of rows, one per result. Each row has:
| Field | Type | Description |
|---|---|---|
position | integer | Position in the results, from 1, in Virgin Atlantic's order. |
searchId | string | The search these results belong to. Pass it with a fare's offerId to return-flights to list a round trip's return flights. |
roundTrip | boolean | Whether the search was a round trip, so every price covers the whole trip. |
origin | string | The departure airport's IATA code. |
originCity | string | — |
destination | string | The arrival airport's IATA code. |
destinationCity | string | — |
departureTime | string | Local time at the departure airport, YYYY-MM-DDTHH:MM. |
arrivalTime | string | Local time at the arrival airport, YYYY-MM-DDTHH:MM. |
durationMinutes | integer | Total travel time, connections included. |
stops | integer | Connections between flights plus stops a flight makes on the way. |
flights | object[] | Each flight of the itinerary, in order. |
flights[].flightNumber | string | The marketing flight number, such as VS3. |
flights[].airlineCode | string | — |
flights[].airline | string | — |
flights[].operatingFlightNumber | string | The flight number of the airline flying it, the same as flightNumber unless the flight is a codeshare. |
flights[].operatingAirlineCode | string | — |
flights[].operatingAirline | string | — |
flights[].origin | string | — |
flights[].originCity | string | — |
flights[].destination | string | — |
flights[].destinationCity | string | — |
flights[].departureTime | string | Local time at the departure airport, YYYY-MM-DDTHH:MM. |
flights[].arrivalTime | string | Local time at the arrival airport, YYYY-MM-DDTHH:MM. |
flights[].durationMinutes | integer | — |
flights[].stops | integer | Stops the flight makes without a change of flight number. |
flights[].aircraft | string | null | The aircraft type, such as Boeing 787-9. |
flights[].connectionMinutes | integer | null | Time on the ground before the next flight. Null on the last flight. |
lowestPrice | number | null | The cheapest available fare's price for every passenger, taxes included. Null when every fare is sold out. |
currency | string | ISO 4217 currency of every price. |
fares | object[] | Every fare family the itinerary is listed with, available or not, in Virgin Atlantic's order. |
fares[].fareFamily | string | Virgin Atlantic's fare family code, such as ECONOMY-LIGHT or BUS-FIRST. |
fares[].name | string | null | The fare as the site names it, such as Economy Light or Upper Class. Null when the fare is not available. |
fares[].status | available soldOut notOffered | available, soldOut or notOffered. |
fares[].price | number | null | The price for every passenger, taxes included: the whole trip's for a round trip. Null unless available. |
fares[].baseFare | number | null | The price before taxes and carrier charges. |
fares[].taxes | number | null | Taxes, fees and carrier charges in the price. |
fares[].currency | string | — |
fares[].saver | boolean | Whether the site marks the fare as a saver fare. |
fares[].bookingClasses | string[] | The booking class of each flight, in order, such as T. |
fares[].offerId | string | null | Selects this fare: for a round trip's outbound flight, pass it to return-flights with searchId. Null unless available. |
Example
curl https://request.usestring.ai/v1/integrations/virginatlantic/return-flights \
-H "Authorization: Bearer $STRING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"searchId": "a4f982ea-06a6-480a-9a4f-62b1819332fc",
"offerId": "7abd4e12-805f-488f-8547-325c7e57a303|97d132cc-8c5e-42e3-a92a-0185dc377941-FL-1"
}'data starts with these rows:
[
{
"position": 1,
"searchId": "a4f982ea-06a6-480a-9a4f-62b1819332fc",
"roundTrip": true,
"origin": "LHR",
"originCity": "London Heathrow",
"destination": "JFK",
"destinationCity": "New York",
"departureTime": "2027-01-19T09:05",
"arrivalTime": "2027-01-19T12:25",
"durationMinutes": 500,
"stops": 0,
"flights": [
{
"flightNumber": "VS3",
"airlineCode": "VS",
"airline": "Virgin Atlantic",
"operatingFlightNumber": "VS3",
"operatingAirlineCode": "VS",
"operatingAirline": "Virgin Atlantic",
"origin": "LHR",
"originCity": "London Heathrow",
"destination": "JFK",
"destinationCity": "New York",
"departureTime": "2027-01-19T09:05",
"arrivalTime": "2027-01-19T12:25",
"durationMinutes": 500,
"stops": 0,
"aircraft": "Airbus A350-1000",
"connectionMinutes": null
}
],
"lowestPrice": 1852.17,
"currency": "USD",
"fares": [
{
"fareFamily": "ECONOMY-LIGHT",
"name": "Economy Light",
"status": "available",
"price": 1852.17,
"baseFare": 3,
"taxes": 1849.17,
"currency": "USD",
"saver": false,
"bookingClasses": ["T"],
"offerId": "a05aaae7-845d-4279-98fd-90349d4ba667|456f662a-d2e6-4aa0-ab11-58a1239a5711-FL-1"
},
{
"fareFamily": "ECON",
"name": null,
"status": "soldOut",
"price": null,
"baseFare": null,
"taxes": null,
"currency": "USD",
"saver": false,
"bookingClasses": [],
"offerId": null
}
]
}
]Requests and billing
- Requests: 1–2 Web Access requests per call.
- Billing:
passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.