> For the complete documentation index, see [llms.txt](https://developers.crawlbyte.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.crawlbyte.ai/flyfrontier-scraper.md).

# FlyFrontier Scraper

## Endpoint

```
POST https://api.crawlbyte.ai/api/tasks
```

## Basic Configuration (Required)

```json
{
  "type": "flyfrontier",
  "input": [
    "https://booking.flyfrontier.com/Flight/InternalSelect?o1=ATL&d1=DEN&dd1=May%2028%2C%202025&dd2=May%2029%2C%202025&ADT=1&r=true&mon=true&promo=&ftype=STD"
  ],
  "multithread": false
}
```

### Parameters

| Field       | Type    | Description                                            |
| ----------- | ------- | ------------------------------------------------------ |
| type        | string  | Always `"flyfrontier"`                                 |
| input       | array   | Array of full FlyFrontier booking URLs                 |
| multithread | boolean | Use `true` for faster processing with multiple threads |

## URL Builder Notes

You must build the full FlyFrontier URL manually and insert it into the `input` array. Use the following key query parameters:

| Parameter | Meaning                  | Example      |
| --------- | ------------------------ | ------------ |
| o1        | Origin Airport Code      | ATL          |
| d1        | Destination Airport Code | DEN          |
| dd1       | Departure Date           | May 28, 2025 |
| dd2       | Return Date              | May 29, 2025 |

* **Ensure dates are URL-encoded** (e.g., `May%2028%2C%202025`)

## Advanced Configuration (Optional)

```json
{
  "type": "flyfrontier",
  "input": [
    "https://booking.flyfrontier.com/Flight/InternalSelect?o1=ATL&d1=DEN&dd1=May%2028%2C%202025&dd2=May%2029%2C%202025&ADT=1&r=true&mon=true&promo=&ftype=STD"
  ],
  "proxy": "http://username:password@ip:port"
}
```

### Optional Parameters

| Field | Type   | Description                        |
| ----- | ------ | ---------------------------------- |
| proxy | string | `http://username:password@ip:port` |

## Pricing

* **$0.01 per successful task**\
  This is a pay-as-you-go pricing model — you're only charged when a FlyFrontier task successfully returns flight data.

You can view your current credit balance and usage history in the [Crawlbyte Dashboard](https://dash.crawlbyte.ai/).

## Response

The response contains metadata about the task. For `flyfrontier` type, the most important fields are `status` and `result`.

```json
{
  "id": "bd3e89ed-815e-4395-98a3-521ede71cc4d",
  "status": "completed",
  "result": {
    "inboundSchedule": {
      // inbound schedule here
    },
    "outboundSchedule": {
      // outbound schedule here
    },
    "results": {
      // flight data here
    }
  }
}
```

* `result` is a **JSON object,** that's the final scraped flight data — no further polling is needed.

### Status Types

| Status     | Meaning                                              |
| ---------- | ---------------------------------------------------- |
| queued     | Task was accepted and added to the processing queue. |
| processing | Task is currently running.                           |
| completed  | Task finished and flight data was collected.         |
| failed     | Task encountered an error (invalid URL, etc.).       |

## Polling

If `status` is `queued` or `processing`, continue polling the task until it's completed or failed.

```
GET https://api.crawlbyte.ai/api/tasks/:id
```

* You’ll receive the same structure with an updated `status`.
* Only poll until you receive `completed` or `failed`.
* Recommended interval: **every 3–5 seconds**.

## SDK Usage

You can run this task using any official **Crawlbyte SDK**:

* [Go SDK](https://github.com/crawlbyte/crawlbyte-sdk-go)
* [TypeScript SDK](https://github.com/crawlbyte/crawlbyte-sdk-ts)
* [Python SDK](https://github.com/crawlbyte/crawlbyte-sdk-py)

Each SDK provides a simple way to:

* Create the task
* Poll for status
* Handle the final result

Refer to the [SDKs section](/sdks.md) for installation, examples, and setup instructions.

## Notes

* Only valid FlyFrontier booking URLs will return results.
* Crawlbyte handles retries, rendering, fingerprinting, and anti-bot logic internally — no need to manage it yourself.
* Use `multithread: true` in advanced settings if running large volumes.
* Make sure airport codes and dates are correct and properly URL-encoded.
* FlyFrontier response includes **all relevant flight data**, including the full date range (from `RetrieveSchedule` endpoint).
* Average task duration is **\~5 seconds**, due to FlyFrontier’s slower site architecture — this is normal and fully supported.
