Google Flights API Python Client
Extract Google Flights data with our Google Flights API Python client. Get programmatic access to airline details, booking options, arrival airports, departure airports, flight schedules, flight prices, and more using simple Python code. Start free, no credit card required.

Trusted by industry leaders all over the world
Integrate our Google Flights API
The Apify API client for Python is the official library that allows you to use Google Flights API in Python, providing convenience functions and automatic retries on errors. Get started with simple pip installation and robust error handling built-in.
Python
JavaScript
HTTP
MCP
1from apify_client import ApifyClient2
3# Initialize the ApifyClient with your Apify API token4# Replace '<YOUR_API_TOKEN>' with your token.5client = ApifyClient("<YOUR_API_TOKEN>")6
7# Prepare the Actor input8run_input = {9 "departureIATA": "LAX",10 "arrivalIATA": [11 "LAS",12 "MUC",13 ],14 "airlines": "ALL",15 "currency": "USD",16 "proxy": {17 "useApifyProxy": True,18 "apifyProxyGroups": ["RESIDENTIAL"],19 },20}21
22# Run the Actor and wait for it to finish23run = client.actor("canadesk/google-flights").call(run_input=run_input)24
25# Fetch and print Actor results from the run's dataset (if there are any)26print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])27for item in client.dataset(run["defaultDatasetId"]).iterate_items():28 print(item)29
30# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-startGet data with Google Flights API Python client
Use our Python API client to extract Google Flights data by providing departure/arrival airports, travel dates, and search preferences. The API returns structured data, including flight prices, airline information, schedules, duration, and booking details in organized JSON format.
Input
{ "delay": 0, "stops": "select", "retries": 0, "currency": "select", "operation": "select", "arrivalDate": "string", "arrivalIATA": [ "string" ], "departureDate": "string", "departureIATA": "string", "arrivalDateRng": "string", "departureDateRng": "string"}Output
{ "price": 60, "details": { "legs": [ { "airlineName": "AS", "arrivalTime": "2024-03-17T08:35:00-07:00", "flightNumber": "702", "departureTime": "2024-03-17T07:20:00-07:00", "aircraftNumber": "73J", "arrivalAirport": "LAS", "departureAirport": "LAX" } ], "airlines": { "name": [ "Alaska" ] }, "duration": "01:15" }, "currency": "CAD", "returnDate": false, "departureDate": "2024-03-18", "arrivalAirport": "Harry Reid International Airport", "departureAirport": "Los Angeles International Airport"}Sign up for Apify account01
Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.
Install Apify Python client02
Install the Apify Python client using pip: pip install apify-client. This package provides a simple interface to interact with Google Flights API from your Python applications.
Get your Apify API token03
Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.
Integrate Google Flights API04
Navigate to the Google Flights API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more. Use the provided Python code examples to integrate Google Flights API into your Python application.
Get your Google Flights data via API05
The Google Flights API returns structured JSON data that works perfectly with pandas, NumPy, and other Python data analysis libraries.

Why use Apify?
Never get blocked
Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.
Customers love us
We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.
Monitor your runs
With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.
Export to various formats
Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.
Integrate Apify to your workflow
You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.
Large developer community
Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!
Python-ready Google Flights data extraction
Connect to hundreds of apps right away using ready-made integrations, or set up your own with webhooks and our API.
No, Google does not provide an official public Python API for Google Flights data. However, our Google Flights Python API client provides reliable access to flight information including prices, schedules, airlines, and booking options through automated data extraction from Google Flights search results.
Yes, you can try our Google Flights Python API client for free! We offer a free trial that includes $5 worth of usage credits. After that, the service costs $12.00/month plus usage-based pricing. You can test the Python API client with your specific routes and requirements before committing to a paid plan.
The Python Google Flights API client extracts comprehensive flight data including flight prices in your selected currency, departure and arrival airport details, airline names and flight numbers, departure and return dates, flight duration, aircraft information, leg details with timestamps, and direct booking URLs for easy access to purchase options.
Yes, it is legal to use a Python API client to scrape publicly available Google Flights data for legitimate business purposes such as price comparison, market research, and travel planning. Python API clients operate within legal boundaries by accessing only public information. However, always ensure compliance with Google's terms of service and implement proxies with appropriate delays between requests in your Python scraping code.
Getting started with our Google Flights Python API is easy — simply create a free Apify account, get your API token, and start using the Google Flights API in Python, JavaScript, CLI, cURL, OpenAPI, or MCP.