{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Flights API: Prices, Itineraries & Date Grid",
    "description": "Google Flights prices API: one-way and round-trip itineraries with airlines, stops, times, emissions and prices in any currency, plus a cheapest-price-per-day grid. Pay per flight.",
    "version": "0.1",
    "x-build-id": "Pd66ismAiITnpWLAq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ocius-data~google-flights-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ocius-data-google-flights-prices",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/ocius-data~google-flights-prices/runs": {
      "post": {
        "operationId": "runs-sync-ocius-data-google-flights-prices",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/ocius-data~google-flights-prices/run-sync": {
      "post": {
        "operationId": "run-sync-ocius-data-google-flights-prices",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "origin": {
            "title": "From",
            "type": "string",
            "description": "Airport code (JFK, BOG, MAD) or city (\"New York\", \"Bogotá\", \"Paris, France\"). A city searches all of its airports."
          },
          "destination": {
            "title": "To",
            "type": "string",
            "description": "Airport code or city, as in \"From\"."
          },
          "departureDate": {
            "title": "Departure date",
            "type": "string",
            "description": "Format YYYY-MM-DD. Up to about 330 days ahead. Leave empty to search 30 days from today. Not used in date grid mode."
          },
          "returnDate": {
            "title": "Return date",
            "type": "string",
            "description": "Optional. Leave empty for a one-way search. With a return date, prices are round-trip totals."
          },
          "searches": {
            "title": "More searches (optional)",
            "type": "array",
            "description": "Several routes or dates in one run. Each item: {\"origin\": \"BOG\", \"destination\": \"MAD\", \"departureDate\": \"2026-12-10\", \"returnDate\": \"2026-12-20\"}. Up to 100 searches. Passenger, cabin and currency options apply to all of them.",
            "default": []
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Passengers aged 12 or older.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Passengers aged 2 to 11. Adults plus children: up to 9. Prices are totals for all passengers.",
            "default": 0
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Cabin to price.",
            "default": "economy"
          },
          "maxStops": {
            "title": "Stops",
            "enum": [
              "any",
              "nonstop",
              "one_or_fewer",
              "two_or_fewer"
            ],
            "type": "string",
            "description": "Filter by number of stops.",
            "default": "any"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO currency code for all prices, for example USD, EUR, GBP, COP, MXN or BRL.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of airline and airport names, for example en, es, pt-BR or fr.",
            "default": "en"
          },
          "country": {
            "title": "Country (market)",
            "type": "string",
            "description": "Two-letter code of the market you search from, for example US, CO, ES or MX. Fares can differ by market.",
            "default": "US"
          },
          "maxResults": {
            "title": "Maximum itineraries per search",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Upper limit of itineraries saved (and charged) per search. Google usually shows between 5 and 100 per search.",
            "default": 50
          },
          "includeReturnFlights": {
            "title": "Include return flights (round trips)",
            "type": "boolean",
            "description": "Off: one row per outbound flight with Google's round-trip total price. On: one row per outbound and return flight pair, with both flights' details and the exact total for that pair. Each pair is one itinerary.",
            "default": false
          },
          "maxReturnOptions": {
            "title": "Return flights per outbound flight",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "With return flights on: how many return options to keep for each outbound flight, in Google's order.",
            "default": 3
          },
          "dateGrid": {
            "title": "Date grid: cheapest price per day",
            "type": "boolean",
            "description": "On: instead of itineraries, get the cheapest price for each departure date in a range. Charged per date with a price (event \"date-price\").",
            "default": false
          },
          "dateGridStart": {
            "title": "First departure date",
            "type": "string",
            "description": "Date grid only. Format YYYY-MM-DD."
          },
          "dateGridEnd": {
            "title": "Last departure date",
            "type": "string",
            "description": "Date grid only. Up to 62 days after the first date."
          },
          "tripLengthDays": {
            "title": "Trip length in days (round trip)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Date grid only. Leave empty for one-way prices. With a value, each date is priced as a round trip returning this many days later."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "By default the Actor starts with datacenter proxies and switches to residential proxies in your market country if Google blocks requests.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxRetries": {
            "title": "Maximum attempts per request",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Each blocked request is retried with a new IP address and exponential backoff.",
            "default": 6
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Requests sent to Google at the same time.",
            "default": 3
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}