How it works · Raja · 1 min
How Takeotrip.com shows fares
Takeotrip.com does not sell the seat. It asks Aviasales, through a Netlify Function, for recent cached fares and shows them as cards. The Book button opens Aviasales with an affiliate marker so a booking can be tracked. You pay them, or the airline. You do not pay Takeotrip an extra fee.
The token
TRAVELPAYOUTS_TOKEN lives in the Netlify environment. The browser calls /api/flights. The function adds the X-Access-Token header. View source on a fare card and you will see a book link, not the token.
If the token is missing, the same pages render with a Sample badge. Those numbers are previews so the site can be reviewed. They are not offers.
When the API says no
A 429 means Aviasales is limiting requests. The function retries with a short backoff, then tells you to wait. It does not swap in a sample and pretend the limit did not happen.
What we will not write
No average fare, no “prices drop 40% in September”, no reviews we did not receive. The blog points at route pages. The route pages point at the cache.
Share: WhatsApp
