# Expedia Japan Flight Scraper

This template collects one-way economy class flight information for the nearest dates from Expedia Japan.

- Template page: [https://www.octoparse.com/template/expedia-japan-flight-scraper](https://www.octoparse.com/template/expedia-japan-flight-scraper)
- Categories: Travel
- Status: `PUBLISHED`
- Run mode: `CLOUD`

## Pricing

Current price: **$0.3/1,000 lines**. Billing is based on output rows; an Octoparse subscription may be required.

## What is an Octoparse template?

An Octoparse template is a ready-to-use scraping workflow with predefined inputs and structured outputs. Use the exact parameter keys below; do not invent parameters.

## Overview

This ready-to-use template collects structured data from search-results pages.

## Output

The current workflow extracts 30 fields, including `ご搭乗日`, `キャビンクラス`, `フライト時間`, `乗継回数`, `乗継時間`, `乗継空港`, `元の料金`, `出発地`, `出発地_到着地`, `出発時間`, `出発空港コード`, `到着地`, `到着日`, `到着日差`, `到着時間`, `到着空港コード`, `収集日時`, `料金単位`, `検索URL`, `検索元_出発地`, `検索元_出発日`, `検索元_到着地`, `検索結果件数_画面表示`, `検索結果順位`, `残席情報`, `片道料金`, `経由情報`, `航空会社`, `通貨`, `運航会社`.

## Use Cases

- Use structured results for research, comparison, and monitoring.
- Collect rows without building the extraction workflow from scratch.
- Combine results with other templates for downstream enrichment.
- Review a representative result before starting a large batch.

## Why Octoparse

- **No coding required:** complete Flight routes or search URLs, Departure date, Number of departure dates and start the template in cloud mode.
- **Flexible export:** review and export results as CSV, Excel, or JSON.

## Input

### Flight routes or search URLs

Required. Enter one item per line: an airport route such as `NRT>JFK`, or an Expedia `Flights-Search` results URL. Do not add a date to an airport route. Constraints: minItems=1; maxItems=1000; items.minLength=3.

### Departure date

Optional. It is not required when every input is an Expedia search results URL that already contains a date.

### Number of departure dates

Optional. Collect this many consecutive dates starting from the departure date. Enter 1–31. Constraints: minimum=, maximum=31.

### Cabin class

Optional. Select Economy, Premium economy, Business, or First. Callable values are the `const` keys in JSON `oneOf`, not the option titles.

### Maximum results per date

Optional. Enter 0 to collect all results shown by Expedia, or enter a limit up to 500. Constraints: minimum=, maximum=500.

## How to Use

## Expedia Japan Flight Scraper

Collects one-way flight listings from Expedia Japan for specified airport routes and departure dates. Searches are for **one adult**. Supports Economy, Premium Economy, Business, and First Class.

### Pricing

No per-line usage charge. Octoparse plan, cloud runtime, API, or resource limits may still apply.

### Input Parameters

- **MainKeys** (required) – One item per line. Use an airport route such as `NRT>JFK` or an Expedia `Flights-Search` results URL. Do not add a date to a plain route.
- **DepartureDate** (conditionally required) – Date in `YYYY-MM-DD` format. Can be omitted when every input is an Expedia search URL that already contains a date.
- **DateCount** (optional) – Number of consecutive departure dates to collect, starting from `DepartureDate`. Range: 1–31.
- **CabinClass** (optional) – Economy, Premium Economy, Business, or First Class.
- **MaxResults** (optional) – `0` collects all results Expedia makes available; otherwise set a limit up to 500.

### Output Fields

The template returns structured rows with fields including: departure date, departure/arrival times, airports (codes and names), flight duration, stops, layover airports, airline, fare, currency, cabin class, search URL, collection timestamp, result ranking, and source search parameters. Empty fields may appear when Expedia does not display them.

### How to Use

1. Open the template and select **Try it** or **Start**.
2. Enter one or more flight routes or Expedia search-result URLs in `MainKeys`.
3. Set `DepartureDate`, `DateCount`, `CabinClass`, and optional `MaxResults`.
4. Run the task.
5. Review the structured rows. Export to CSV, Excel, JSON, or use APIs.

### Limitations

- Collects one-way flight search-result listings for one adult only.
- Does not collect fare rules, baggage policies, seat selection, or booking details.
- Prices, availability, rankings, and displayed result counts can change at any time.
- Expedia may return fewer results than the configured `MaxResults`. This is a collection limit, not a guarantee.
- If Expedia requests human verification, the template retries with a new browser session but does not solve CAPTCHAs automatically.

### Tips

- Start with one route and one departure date, then scale up.
- Use valid three-character airport codes (e.g., `NRT>JFK`).
- Use an Expedia `Flights-Search` URL to reuse an existing search configuration.
- Use `DateCount` to compare several consecutive departure dates without entering each date separately.
- For deduplication, combine fields such as `検索元_出発地`, `検索元_到着地`, `検索元_出発日`, `航空会社`, `出発時間`, `到着時間`, and `片道料金`.

## Limitations

Results depend on what the source site exposes at run time. Fields may be empty when a source page does not provide a value. The template enforces the input limits shown above.

## Tips

Use specific, valid inputs and review a representative result before starting a large batch. Remove duplicate inputs when repeated records are not needed.

## FAQ

### What do I need to enter?

Use the exact inputs and limits listed above.

### What data does this template return?

See Output Schema below; availability can vary by source record.

### How is usage billed?

See the Pricing section above for current pricing and billing details.

## Related Templates

- [Check24 Flight Scraper](https://www.octoparse.com/template/check-24-flug-scraper)
- [Skyscanner Flight Price Scraper (Korea)](https://www.octoparse.com/template/skyscanner-scraper-korea)
- [Amazon Japan Product Scraper](https://www.octoparse.com/template/amazon-japan-product-scraper)
- [Google Maps Store Listing Scraper (Japan)](https://www.octoparse.com/template/google-maps-store-listing-scraper)
- [Google Scholar Article Scraper (for Japan)](https://www.octoparse.com/template/google-scholar-jp-article-scraper)

## Input Schema

```json
{
  "title": "Expedia Japan Flight Scraper input",
  "description": "Input parameters configured for the current published template version.",
  "type": "object",
  "schemaVersion": 1,
  "additionalProperties": false,
  "properties": {
    "flight_routes_or_search_URLs": {
      "title": "Flight routes or search URLs",
      "description": "Enter one item per line: an airport route such as `NRT>JFK`, or an Expedia `Flights-Search` results URL. Do not add a date to an airport route.",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 3
      },
      "minItems": 1,
      "maxItems": 1000,
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "departure_date": {
      "title": "Departure date",
      "description": "It is not required when every input is an Expedia search results URL that already contains a date.",
      "type": "string",
      "x-octoparse": {
        "apiEnabled": false
      }
    },
    "number_of_departure_dates": {
      "title": "Number of departure dates",
      "description": "Collect this many consecutive dates starting from the departure date. Enter 1–31.",
      "type": "integer",
      "maximum": 31,
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "cabin_class": {
      "title": "Cabin class",
      "description": "Select Economy, Premium economy, Business, or First.",
      "type": "string",
      "oneOf": [
        {
          "title": "economy",
          "const": "Economy"
        },
        {
          "title": "premiumeconomy",
          "const": "Premiumeconomy"
        },
        {
          "title": "business",
          "const": "Business"
        },
        {
          "title": "first",
          "const": "First"
        }
      ],
      "x-octoparse": {
        "apiEnabled": false
      }
    },
    "maximum_results_per_date": {
      "title": "Maximum results per date",
      "description": "Enter 0 to collect all results shown by Expedia, or enter a limit up to 500.",
      "type": "integer",
      "maximum": 500,
      "x-octoparse": {
        "apiEnabled": true
      }
    }
  },
  "required": [
    "flight_routes_or_search_URLs"
  ]
}
```

## Input JSON Example

No verified real input/output examples are currently available.


## Output Schema

```json
{
  "schemaVersion": 1,
  "type": "object",
  "properties": {
    "ご搭乗日": {
      "type": "string",
      "description": ""
    },
    "キャビンクラス": {
      "type": "string",
      "description": ""
    },
    "フライト時間": {
      "type": "string",
      "description": ""
    },
    "乗継回数": {
      "type": "string",
      "description": ""
    },
    "乗継時間": {
      "type": "string",
      "description": ""
    },
    "乗継空港": {
      "type": "string",
      "description": ""
    },
    "元の料金": {
      "type": "string",
      "description": ""
    },
    "出発地": {
      "type": "string",
      "description": ""
    },
    "出発地_到着地": {
      "type": "string",
      "description": ""
    },
    "出発時間": {
      "type": "string",
      "description": ""
    },
    "出発空港コード": {
      "type": "string",
      "description": ""
    },
    "到着地": {
      "type": "string",
      "description": ""
    },
    "到着日": {
      "type": "string",
      "description": ""
    },
    "到着日差": {
      "type": "string",
      "description": ""
    },
    "到着時間": {
      "type": "string",
      "description": ""
    },
    "到着空港コード": {
      "type": "string",
      "description": ""
    },
    "収集日時": {
      "type": "string",
      "description": ""
    },
    "料金単位": {
      "type": "string",
      "description": ""
    },
    "検索URL": {
      "type": "string",
      "description": ""
    },
    "検索元_出発地": {
      "type": "string",
      "description": ""
    },
    "検索元_出発日": {
      "type": "string",
      "description": ""
    },
    "検索元_到着地": {
      "type": "string",
      "description": ""
    },
    "検索結果件数_画面表示": {
      "type": "string",
      "description": ""
    },
    "検索結果順位": {
      "type": "string",
      "description": ""
    },
    "残席情報": {
      "type": "string",
      "description": ""
    },
    "片道料金": {
      "type": "string",
      "description": ""
    },
    "経由情報": {
      "type": "string",
      "description": ""
    },
    "航空会社": {
      "type": "string",
      "description": ""
    },
    "通貨": {
      "type": "string",
      "description": ""
    },
    "運航会社": {
      "type": "string",
      "description": ""
    }
  },
  "title": "Expedia Japan Flight Scraper output",
  "description": "Initial output fields derived from the current published implementation. Field descriptions are maintained by Data Center; production field names and types should be refreshed from recent successful runs.",
  "additionalProperties": false
}
```

## Output Example

No verified real input/output examples are currently available.

## API

`POST https://openapi.octoparse.com/api/agentTools/executeTask`

This is the OpenAPI Agent Tools `executeTask` endpoint. Authenticate with a Bearer token.

Request body:

`templateName` is the template slug; `parameters` is a JSON object string whose keys match Input Schema; `taskName`, `idempotencyKey`, and `maxCollectedRows` are optional.

Obtain a token:

```http
POST https://openapi.octoparse.com/token
Content-Type: application/json

{
  "username": "YOUR_USERNAME",
  "password": "YOUR_PASSWORD",
  "grant_type": "password"
}
```

Use `data.access_token` as `Authorization: Bearer <token>`. After starting, poll `getTaskStatus` and export with `exportData`.

No verified real input/output examples are currently available.

## MCP Setup

Connect an MCP-compatible AI client to `https://mcp.octoparse.com` using browser OAuth or an Octoparse API key. Find `expedia-japan-flight-scraper`, inspect its inputs, create a cloud task with the exact Input Schema keys, and export JSON results.

## Machine-readable Resources

- [Template contract](https://www.octoparse.com/templates/expedia-japan-flight-scraper.json)
- [Manifest](https://www.octoparse.com/templates/expedia-japan-flight-scraper-manifest.json)
