A Chrome extension that automatically extracts AirAsia API tokens and scrapes flight prices for analysis and comparison.
- Automatically captures AirAsia API tokens from web requests
- Displays token details including expiration time
- JWT token decoding and validation
- Copy tokens to clipboard with one click
- Scrape flight prices for multiple destinations
- Support for both one-way and round-trip flights
- Configurable date ranges and request delays
- Real-time progress tracking with detailed logs
- Round-trip price analysis with trip duration optimization
- Multiple sorting options (price, trip days, destination)
- Weekend flight detection
- CSV export functionality
- Configurable request delays to avoid rate limiting
- Default airport and date preferences
- Token history management
- Settings import/export functionality
- Download or clone this repository
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" in the top right corner
- Click "Load unpacked" and select the
airasia-extensionfolder - The extension should now appear in your extensions list
Note: This extension is not yet available on the Chrome Web Store
- Install the extension
- Visit airasia.com
- Search for flights (this will generate API requests with tokens)
- Click the extension icon to view captured tokens
- The extension badge will show the number of captured tokens
- Open the extension popup
- Select a captured token or enter one manually
- Configure your scraping parameters:
- Departure Airport: Select your departure airport
- Destination Airports: Choose one or more destinations
- Date Range: Set your travel period
- Flight Type: Choose one-way or round-trip
- Request Delay: Set delay between API requests (default: 2.5s)
- Click "Start Scraping" to begin the process
- Monitor progress in the real-time log
- The extension will automatically export results as CSV
- For round-trip flights, analysis will be performed automatically
Access settings by clicking the gear icon in the popup or visiting the options page:
- Maximum Token History: Number of captured tokens to keep (5-50)
- Default Request Delay: Default delay between API requests
- Default Dates: Default from/to dates for searches
- Default Departure: Default departure airport
- Clear Storage: Remove all captured tokens and data
- Export Settings: Backup your configuration
- Import Settings: Restore from backup
The extension uses the following AirAsia API endpoints:
- Base URL:
https://flights.airasia.com/fp/lfc/v1/lowfare - Method: GET
- Headers: Includes authorization token and required headers
- Parameters: Airport codes, dates, currency, etc.
CSV with columns:
- departure_station
- arrival_station
- departure_date
- price
- formatted_price
- short_price
- airline_profile
- aa_flight
- direction
- fetch_date
CSV with columns:
- Destination
- Outbound Date
- Outbound Price
- Inbound Date
- Inbound Price
- Total Price
- Trip Days
- Local Storage: All data is stored locally in your browser
- No External Servers: The extension doesn't send data to external servers
- Token Security: Tokens are only used for API requests to AirAsia
- Data Export: You control when and what data is exported
- Ensure you're on airasia.com or flights.airasia.com
- Try searching for flights to generate API requests
- Check that the extension has the necessary permissions
- Verify your access token is valid and not expired
- Increase the request delay to avoid rate limiting
- Check the log for specific error messages
- Ensure the extension has access to the required websites
- Check Chrome's extension permissions settings
airasia-extension/
βββ manifest.json # Extension manifest
βββ service-worker.js # Background service worker
βββ popup/
β βββ popup.html # Popup interface
β βββ popup.css # Popup styles
β βββ popup.js # Popup functionality
β βββ json-viewer.bundle.js # JSON viewer library
βββ options/
β βββ options.html # Options page
β βββ options.css # Options styles
β βββ options.js # Options functionality
βββ icons/ # Extension icons
βββ README.md # This file
This extension is ready to use as-is. No build process required.
- Load the extension in Chrome
- Visit airasia.com and search for flights
- Test token capture functionality
- Test flight scraping with various parameters
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
This extension is for educational and personal use only. Please respect AirAsia's terms of service and rate limits. The developers are not responsible for any misuse of this tool.
For issues and questions:
- Check the troubleshooting section above
- Review the Chrome DevTools console for error messages
- Ensure you have the latest version of Chrome
- Initial release
- Automatic token extraction
- Flight price scraping
- Round-trip analysis
- CSV export functionality
- Configurable settings