Obtain an access token by POSTing your client_id and client_secret to https://test.api.amadeus.com/v1/security/oauth2/token with grant_type=client_credentials; the response contains a bearer token valid for 1799 seconds.
Call GET /v2/shopping/flight-offers with required params: originLocationCode (IATA), destinationLocationCode (IATA), departureDate (YYYY-MM-DD), adults (integer); optionally add returnDate, travelClass, max (result count cap).
Parse the response: each element in data[] is a FlightOffer object with a unique id, price.grandTotal (currency in price.currency), itineraries[], and validatingAirlineCodes[].
Note the lastTicketingDate or lastTicketingDateTime field on each offer — this is the deadline by which the ticket must be issued, not just held.
Filter or rank offers in your application logic; do not assume ordering is by price — sort explicitly on price.grandTotal if needed.
Before displaying to a user, store the full offer object verbatim; you will need to pass it back unchanged in the pricing and order-creation calls.
Known gotchas
Access tokens expire after 1799 seconds; cache and refresh proactively rather than waiting for a 401, which adds latency mid-flow.
Test environment (test.api.amadeus.com) returns synthetic data with limited carriers and routes; switch the base URL to api.amadeus.com for production and expect pricing differences.
The max parameter caps results but does not guarantee you receive the cheapest fares; low-cost carriers with NDC-only content may be absent entirely.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp