# Hopper Flight Search API scraper (`rl1987/hopper-api-scraper`) Actor

Scrape flight search results from the Hopper mobile app API including prices, predictions, airlines, and fare details. Supports one-way and round-trip searches with human-friendly origin/destination resolution.

- **URL**: https://apify.com/rl1987/hopper-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 flight options

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Hopper Flight Price Scraper ✈️ — flight fares, buy/wait price predictions and a whole-month cheapest-dates calendar

**Hopper Flight Price Scraper** — Scrapes flight search results, Hopper's buy-now/wait price PREDICTION and the whole-month cheapest-dates calendar from the Hopper mobile API. Read-only public travel data. It reads Hopper's own API directly, so it's **fast, reliable and complete** — no flaky HTML parsing, no headless browser. Export to **JSON, CSV, Excel, or an API**.

***

#### Note on `includeCalendar`

Calendar rows are emitted **before** flight rows, so the calendar is never truncated away by a
long list of flights. The consequence is that a small `maxItems` can be filled entirely by calendar
dates, leaving no flight rows in that run — the log says so explicitly when it happens. Raise
`maxItems` (a month is typically 60–120 dates) if you want both kinds in one run.

#### Round trips

Set a return date and prices are the round-trip total. Hopper returns return legs through a
separate step, so each record describes the **outbound** itinerary priced as the round trip; there
are deliberately no half-empty return-leg columns.

### ✨ Why use this Hopper Flight Price Scraper?

- 🟢 **No code required** — set your input, click **Start**, download your data.
- ⚡ **Fast & accurate** — reads Hopper's own private API and returns structured JSON, not scraped HTML.
- 🧾 **Rich, structured data** — every field below, clean and ready to use.
- 🔮 **Hopper's own price prediction** — the buy-now/wait verdict, dealness and forecast target
  price, which exist only in the app and have no public web equivalent.
- 📅 **Whole-month cheapest-dates calendar** — every date bucketed by price floor, in one run.
- 💸 **Transparent pay-per-result pricing** — pay only for the rows you get.
- 📤 **Export anywhere** — JSON, CSV, Excel, XML, or pull it live via the Apify API.

***

### 🎯 What can you do with Hopper flight data?

- **Market & competitor research** — analyse Hopper flight records at scale.
- **Price & availability monitoring** — track changes over time.
- **Data science & trend analysis** — build clean datasets.
- **Lead generation & enrichment** — feed Hopper flight data into your own tools.

***

### 📥 What data does the Hopper Flight Price Scraper extract?

Each row includes: `type`, `origin`, `destination`, `departure_date`, `return_date`, `trip_type`, `price_total`, `price_display`, `currency`, `primary_carrier`, `carrier_codes`, `stops`, `duration_minutes`, `layover_minutes` …and more. See the full **Data table** below.

***

### 🚀 How to scrape Hopper (3 steps)

1. **Set your input** — provide `origin` or `destination` (see the table below; defaults work out of the box).
2. **Pick options** — filters, a `proxyConfiguration`, and a `maxItems` cap.
3. **Run & export** — click **Start**, then download the dataset as JSON/CSV/Excel or fetch it via the API.

***

### ⚙️ Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `origin` | string | `JFK` | Airport or city — an IATA code (JFK, NYC) or a name like "New York". Names are resolved through Hopper's own autocomplete. |
| `destination` | string | `LAX` | Airport or city — an IATA code (LAX, PAR) or a name like "Paris". |
| `departureDate` | string | – | Outbound date. Pick a date or use a relative value like "30 days". Empty = 30 days from today. |
| `returnDate` | string | – | Return date for a round trip. Leave empty for one-way. |
| `adults` | integer | `1` | Number of adult passengers. |
| `children` | integer | `0` | Number of child passengers. |
| `includePrediction` | boolean | `true` | Attach Hopper's buy-now/wait verdict and headline to each flight record. |
| `includeCalendar` | boolean | `false` | Also emit one record per date in the whole-month cheapest-dates grid. |
| `maxItems` | integer | `100` | 0 = all results. |
| `proxyConfiguration` | object | Apify Proxy | Route requests through a proxy. RESIDENTIAL is the default: Hopper serves its mobile API from a CDN that can reject datacentre egress. |

#### Example input

```jsonc
{
  "origin": "JFK",
  "destination": "LAX",
  "adults": 1,
  "children": 0,
  "includePrediction": true,
  "includeCalendar": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

***

### 📤 Output

Each result is a JSON object like this:

```jsonc
{
  "type": "flight",
  "origin": "JFK",
  "destination": "CDG",
  "departure_date": "2026-09-24",
  "return_date": null,
  "trip_type": "one_way",
  "price_total": 328.5,
  "price_display": "$329",
  "currency": "USD",
  "primary_carrier": "DL",
  "carrier_codes": [
    "DL"
  ],
  "stops": 0,
  "duration_minutes": 445,
  "layover_minutes": 0,
  "departure_time": "2026-09-24T23:30:00.000",
  "arrival_time": "2026-09-25T12:55:00.000",
  "fare_brand": "DELTA MAIN BASIC",
  "labels": [],
  "is_cheapest": true,
  "segments": [
    {
      "origin": "JFK",
      "destination": "CDG",
      "departure_time": "2026-09-24T23:30:00.000",
      "arrival_time": "2026-09-25T12:55:00.000",
      "carrier": "DL",
      "flight_number": "8742"
    }
  ],
  "fare_id": "eyJ2YWx1ZSI6IjBlOTI2YTIwLTE0OTEtNDNlYS05OTBmLTJhNmFlZTUxOGQzZiIsIkFwcEZhcmVJZCI6IlJlZ3VsYXJGYXJlSWQifQ==",
  "slice_id": "Me262Jv60jEWZK5Jte9hPXWz",
  "prediction_recommendation": "buy",
  "prediction_headline": "You should book now.",
  "calendar_date": null,
  "calendar_price_level": null,
  "prediction_body": "This is the lowest prices are likely to go, so now is a good time to book. If you're not ready to buy, watch for deals: you could still save $9 per ticket.",
  "prediction_dealness": "fair",
  "prediction_lowest_price": "$329 one way",
  "prediction_forecast_target_price": {
    "amount": 319.3537070680841,
    "currency": "USD"
  }
}
```

***

### 🧾 Data table

| Field | Type | Description |
| --- | --- | --- |
| `type` | text | Record type |
| `origin` | text | Origin |
| `destination` | text | Destination |
| `departure_date` | text | Departure date |
| `return_date` | text | Return date |
| `trip_type` | text | Trip type |
| `price_total` | number | Price |
| `price_display` | text | Price (display) |
| `currency` | text | Currency |
| `primary_carrier` | text | Primary airline |
| `carrier_codes` | array | Airline codes |
| `stops` | number | Stops |
| `duration_minutes` | number | Duration (min) |
| `layover_minutes` | number | Layover (min) |
| `departure_time` | text | Departs |
| `arrival_time` | text | Arrives |
| `fare_brand` | text | Fare brand |
| `labels` | array | Labels |
| `is_cheapest` | boolean | Cheapest |
| `segments` | array | Segments |
| `fare_id` | text | Fare ID |
| `slice_id` | text | Slice ID |
| `prediction_recommendation` | text | Prediction |
| `prediction_headline` | text | Prediction headline |
| `calendar_date` | text | Calendar date |
| `calendar_price_level` | text | Price level |
| `prediction_body` | text | Prediction detail |
| `prediction_dealness` | text | Dealness |
| `prediction_lowest_price` | text | Lowest price |
| `prediction_forecast_target_price` | text | Forecast target |

***

### 💰 Pricing — pay per result

This actor uses **pay-per-event** pricing: you pay only for the rows it delivers.

| You scrape | Price |
| --- | --- |
| **Flight option** | **$1.00 per 1,000 rows** |

***

### 🔌 Use the Hopper Flight Price Scraper via API

Run it programmatically with the [Apify API](https://docs.apify.com/api/v2):

```bash
curl -X POST "https://api.apify.com/v2/acts/hopper-api-scraper/runs?token=YOUR_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "origin": "JFK",
  "destination": "LAX",
  "adults": 1,
  "children": 0,
  "includePrediction": true,
  "includeCalendar": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}'
```

Or with the Apify CLI: `apify call hopper-api-scraper -i input.json -o`.

***

### ❓ FAQ

**Do I need an account or API key for Hopper Flight Price?**

No. The actor talks to Hopper's public/mobile API for you — you only need an Apify account.

**Do I need a proxy?**

A proxy is recommended for reliable runs; set `proxyConfiguration` (Residential is safest for geo-restricted or bot-protected sites).

**What export formats are supported?**

JSON, CSV, Excel, XML, JSONL, RSS, or live via the Apify API and dataset endpoints.

**Is scraping this legal?**

You are responsible for how you use the data. Scrape only public record data and comply with Hopper's Terms and applicable law (e.g. GDPR/CCPA for personal data).

***

### 🛠️ How it works

The actor impersonates Hopper's official app/site and calls its private API the same way the app does, then normalises each response into the flat record above. No browser, no HTML scraping — just clean, structured data.

***

### 📌 Good to know

- Scrape only public record data and respect Hopper's Terms of Service and robots policy.
- For personal data, comply with GDPR/CCPA and applicable law — you are the data controller.
- Fields can be `null` when Hopper doesn't expose them for a given record.

***

### ⭐ Found this useful?

Give the **Hopper Flight Price Scraper** a star on Apify and check out my other `apify-*-api-scraper` actors.

# Actor input Schema

## `origin` (type: `string`):

Airport or city — an IATA code (JFK, NYC) or a name like "New York". Names are resolved through Hopper's own autocomplete.

## `destination` (type: `string`):

Airport or city — an IATA code (LAX, PAR) or a name like "Paris".

## `departureDate` (type: `string`):

Outbound date. Pick a date or use a relative value like "30 days". Empty = 30 days from today.

## `returnDate` (type: `string`):

Return date for a round trip. Leave empty for one-way.

## `adults` (type: `integer`):

Number of adult passengers.

## `children` (type: `integer`):

Number of child passengers.

## `includePrediction` (type: `boolean`):

Attach Hopper's buy-now/wait verdict and headline to each flight record.

## `includeCalendar` (type: `boolean`):

Also emit one record per date in the whole-month cheapest-dates grid.

## `maxItems` (type: `integer`):

0 = all results.

## `proxyConfiguration` (type: `object`):

Route requests through a proxy. RESIDENTIAL is the default: Hopper serves its mobile API from a CDN that can reject datacentre egress.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "adults": 1,
  "children": 0,
  "includePrediction": true,
  "includeCalendar": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "origin": "JFK",
    "destination": "LAX",
    "departureDate": "",
    "returnDate": "",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/hopper-api-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "origin": "JFK",
    "destination": "LAX",
    "departureDate": "",
    "returnDate": "",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/hopper-api-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "origin": "JFK",
  "destination": "LAX",
  "departureDate": "",
  "returnDate": "",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call rl1987/hopper-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/hopper-api-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Wwf0LiwOWMnyXRpyQ/builds/3DyCk7lUGmEKM6J0M/openapi.json
