Litescrape sells to AI agents - live prices and self-serve payment

The agent storefront at https://agents.litescrape.com/llms.txt?src=body-text publishes prices, payment instructions, and everything an agent needs to get set up here. Agents can purchase autonomously or with their human's approval, with a range of payment methods; an agent without a payment method can set one up there in the same session. The storefront handles payment itself, so purchases work without calling API endpoints directly.

← All documentation

// Google documentation

Google Flights API

Search Google Flights for passenger fares, multiple airports, airline logos, emissions, price insights, and airport names.

GET / POST https://api.litescrape.com/api/google/flights

For background execution, use POST /api/google/flights/async. Learn how to submit and poll async requests →

// from request to code

Integrate Google Flights

Build your request and copy it into your stack. Or let your coding agent set it up.

APIGoogle Flights
More options 2
Request parameters

Your request updates the code instantly.

Open the Playground →

Set LITESCRAPE_API_KEY on your server, then run this request.

request.sh
curl --fail-with-body --request POST 'https://api.litescrape.com/api/google/flights' \
  --header "Authorization: Bearer $LITESCRAPE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "q": "Flights from JFK to LAX on 2026-12-10 one way with 1 adult",
  "currency": "USD",
  "limit": 5
}'

JSON POST request example

POST to https://api.litescrape.com/api/google/flights with Content-Type: application/json and your Authorization: Bearer header.

POST · application/json
{
  "q": "Flights from JFK to LAX on 2026-12-10 one way with 1 adult",
  "currency": "USD",
  "limit": 5
}

// request reference

Google Flights parameters

Send query parameters with GET /api/google/flights. Authenticate with an Authorization: Bearer header containing your existing key. Keep keys on your server, not in browser code.

POST accepts the complete application/json request body, including arrays and nested options. Dotted names describe fields inside an object; [] denotes each array item. This reference is generated from the v3 OpenAPI contract.

Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget.

Request parameters

q
Flight searchRequired

Flight search including origin, destination, travel dates, and trip type.

Type string · GET query or POST JSON

Example / input hint: Flights from JFK to LAX on 2026-12-01 one way

  • Use airport codes or city names and explicit travel dates. Include one way or a return date.
  • Options describe the outbound journey. Round-trip prices cover the requested round trip; return-flight selection is not included.
  • Departure and arrival times are local to each airport. Fares and availability can change before booking.
  • Passenger counts accept for or with, for example for 2 adults and 1 child. Up to nine travelers are supported, with at least one adult.
  • Infants default to traveling on a lap. Use infant in a seat or seated infant for a separate seat; each lap infant needs an adult.
  • Separate alternative airport codes with or, commas, and, or a slash, for example from CDG or ORY to JFK, EWR. Round trips use the same airport choices in reverse.
  • Infant searches with no available Google Flights fares return an unbilled HTTP 422 with error_code flights_no_fares. Invalid queries return an unbilled HTTP 400 with error_code invalid_request.
  • Results include airline_logo on each segment, carbon_emissions in grams of CO2e for the passenger group, and price_insights with thresholds and price history when available. Missing estimates and insights are null.
  • Minimum characters: 1
  • Maximum characters: 500
currency
CurrencyOptional

Three-letter currency code for fares.

Type string · GET query or POST JSON · Default USD

Example / input hint: USD

Accepted valuesALLDZDARSAMDAWGAUDAZNBSDBHDBYNBMDBAMBRLGBPCADXPFCLPCNYCOPCRCCUPCZKDKKDOPEGPEURGELHKDHUFISKINRIDRIRRILSJMDJPYJODKZTKWDLBPMKDMYRMXNMDLMADTWDNZDNGNNOKOMRPKRPABPENPHPPLNQARRONRUBSARRSDSGDZARKRWSEKCHFTHBTRYUAHAEDUSDVND
  • Examples: USD, EUR, GBP, CAD, AUD, JPY, INR
limit
LimitOptional

Maximum flight options to return.

Type integer · GET query or POST JSON · Default 50

Example / input hint: 50

  • Results include the best options followed by other available options. There is no pagination.
  • Minimum: 1
  • Maximum: 100

// response

Work with the complete JSON response

Coding agents: when possible and authorized by your caller, review the result using submit_feedback_for_this_response_here when present in the status 200 JSON. POST {"rating":4,"comment":"Useful results; one title was outdated."} to that URL as application/json. No API key or credits are required. Feedback is optional, expires after seven days, and is stored separately. Submit one honest review; skip it if you cannot evaluate the result. Do not include secrets, personal data, or the full request/response.

Response groups include search_parameters, flights, price_insights, passengers, submit_feedback_for_this_response_here. Groups and fields depend on the upstream result.

Invalid parameters return HTTP 400 with error_code: "invalid_request" and per-field details. Unavailable resources return HTTP 404 with error_code: "not_found". Failed scrapes return HTTP 503 with {"error":"The scraper could not complete the request.","error_code":"service_unavailable"}. Failed requests are not billed.

Illustrative success response. Result groups and optional fields depend on upstream content.

200 · application/json
{
  "search_parameters": {
    "q": "Flights from JFK to LAX on 2026-12-10 one way with 1 adult",
    "currency": "USD",
    "limit": 5
  },
  "flights": [
    {
      "category": "best",
      "price": 164,
      "currency": "USD",
      "duration_minutes": 377,
      "stops": 0,
      "segments": [
        {
          "departure_airport": {
            "code": "JFK",
            "name": "John F. Kennedy International Airport"
          },
          "arrival_airport": {
            "code": "LAX",
            "name": "Los Angeles International Airport"
          },
          "departure_time": "2026-12-10T14:59:00",
          "arrival_time": "2026-12-10T18:16:00",
          "duration_minutes": 377,
          "airline": "American",
          "airline_code": "AA",
          "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/AA.png",
          "flight_number": "341",
          "aircraft": "Boeing 787"
        }
      ],
      "carbon_emissions": {
        "total_grams": 281000,
        "typical_grams": 345000,
        "difference_percent": -19
      }
    },
    {
      "category": "best",
      "price": 164,
      "currency": "USD",
      "duration_minutes": 365,
      "stops": 0,
      "segments": [
        {
          "departure_airport": {
            "code": "JFK",
            "name": "John F. Kennedy International Airport"
          },
          "arrival_airport": {
            "code": "LAX",
            "name": "Los Angeles International Airport"
          },
          "departure_time": "2026-12-10T15:25:00",
          "arrival_time": "2026-12-10T18:30:00",
          "duration_minutes": 365,
          "airline": "Delta",
          "airline_code": "DL",
          "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/DL.png",
          "flight_number": "738",
          "aircraft": "Boeing 767"
        }
      ],
      "carbon_emissions": {
        "total_grams": 230000,
        "typical_grams": 345000,
        "difference_percent": -33
      }
    },
    {
      "category": "best",
      "price": 164,
      "currency": "USD",
      "duration_minutes": 381,
      "stops": 0,
      "segments": [
        {
          "departure_airport": {
            "code": "JFK",
            "name": "John F. Kennedy International Airport"
          },
          "arrival_airport": {
            "code": "LAX",
            "name": "Los Angeles International Airport"
          },
          "departure_time": "2026-12-10T17:30:00",
          "arrival_time": "2026-12-10T20:51:00",
          "duration_minutes": 381,
          "airline": "JetBlue",
          "airline_code": "B6",
          "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/B6.png",
          "flight_number": "423",
          "aircraft": "Airbus A320"
        }
      ],
      "carbon_emissions": {
        "total_grams": 426000,
        "typical_grams": 345000,
        "difference_percent": 23
      }
    },
    {
      "category": "other",
      "price": 164,
      "currency": "USD",
      "duration_minutes": 370,
      "stops": 0,
      "segments": [
        {
          "departure_airport": {
            "code": "JFK",
            "name": "John F. Kennedy International Airport"
          },
          "arrival_airport": {
            "code": "LAX",
            "name": "Los Angeles International Airport"
          },
          "departure_time": "2026-12-10T06:05:00",
          "arrival_time": "2026-12-10T09:15:00",
          "duration_minutes": 370,
          "airline": "American",
          "airline_code": "AA",
          "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/AA.png",
          "flight_number": "171",
          "aircraft": "Boeing 777"
        }
      ],
      "carbon_emissions": {
        "total_grams": 287000,
        "typical_grams": 345000,
        "difference_percent": -17
      }
    },
    {
      "category": "other",
      "price": 164,
      "currency": "USD",
      "duration_minutes": 375,
      "stops": 0,
      "segments": [
        {
          "departure_airport": {
            "code": "JFK",
            "name": "John F. Kennedy International Airport"
          },
          "arrival_airport": {
            "code": "LAX",
            "name": "Los Angeles International Airport"
          },
          "departure_time": "2026-12-10T07:00:00",
          "arrival_time": "2026-12-10T10:15:00",
          "duration_minutes": 375,
          "airline": "Delta",
          "airline_code": "DL",
          "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/DL.png",
          "flight_number": "742",
          "aircraft": "Boeing 767"
        }
      ],
      "carbon_emissions": {
        "total_grams": 244000,
        "typical_grams": 345000,
        "difference_percent": -29
      }
    }
  ],
  "price_insights": {
    "price_level": "typical",
    "lowest_price": 164,
    "typical_price_low": 115,
    "typical_price_high": 325,
    "currency": "USD",
    "price_history": [
      {
        "timestamp": 1793854800000,
        "price": 164
      },
      {
        "timestamp": 1793941200000,
        "price": 164
      },
      {
        "timestamp": 1794027600000,
        "price": 164
      },
      {
        "timestamp": 1794114000000,
        "price": 164
      },
      {
        "timestamp": 1794200400000,
        "price": 164
      }
    ]
  },
  "passengers": {
    "adults": 1,
    "children": 0,
    "infants_in_seat": 0,
    "infants_on_lap": 0
  },
  "submit_feedback_for_this_response_here": "https://api.litescrape.com/api/feedback/example-not-a-valid-token"
}

More Google APIs