> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.awardtool.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.awardtool.com/_mcp/server.

# Real-time Search API - Crawler Trigger

POST https://apisv2.awardtoolapi.com/flight_trigger/search_real_time
Content-Type: application/json

## Overview

### Trigger a Flight Search

Submits a flight search to the processing queue. Award availability is retrieved asynchronously.

A `task_id` may be provided by the client, but it is not required. If omitted, the backend generates a `task_id` and returns it in the response. Use that identifier to retrieve the search results.

A client-defined `task_id` is useful when multiple requests need to be grouped into a single search task.

### Recommended Sample Code

[Real-Time Search API sample code](https://gist.github.com/awardtool/8947354e6a2f24469cf4a07ddb82bd9f)

## Query Constraints

- Each request must search exactly one travel date. Date ranges are not supported.
    

## Request Fields

### `pax`

- **Type:** Integer
    
- **Required:** Yes
    
- **Description:** Number of passengers included in the search.
    

### `programs`

- **Type:** Array of strings
    
- **Required:** Yes
    
- **Description:** Loyalty-program codes to search.
    

### `cabins`

- **Type:** Array of strings
    
- **Required:** Yes
    
- **Description:** Cabin classes to include.
    
- **Supported values:**
    
    - `Economy`
        
    - `Premium Economy`
        
    - `Business`
        
    - `First`
        

### `origin`

- **Type:** String
    
- **Required:** Yes
    
- **Description:** Origin airport’s three-letter IATA code, such as `SFO`.
    

### `arrival`

- **Type:** String
    
- **Required:** Yes
    
- **Description:** Destination airport’s three-letter IATA code, such as `JFK`.
    

### `date`

- **Type:** Object
    
- **Required:** Yes
    
- **Description:** Travel date to search.
    
- **Constraint:** Must represent exactly one date. Date ranges are not supported.
    

### `task_id`

- **Type:** String
    
- **Required:** No
    
- **Description:** Identifier used to track the search and retrieve its results from the backend.
    
- **Usage:**
    
    - Provide your own `task_id` when you need to group multiple same-date requests, such as requests split across several program batches.
        
    - Omit `task_id` when submitting a standalone request. The backend will generate one and return it in the response.
        
    - Store the returned `task_id` and use it when calling the result-retrieval endpoint.
        
    - All requests using the same client-defined `task_id` must use the same travel date.
        

When `task_id` is omitted, each request receives a separate backend-generated identifier. To combine multiple requests into one task, provide and reuse your own `task_id`.

Reference: https://docs.awardtool.com/award-tool-api/real-time-award-flight-search/real-time-search-api-crawler-trigger

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /flight_trigger/search_real_time:
    post:
      operationId: Real-time Search API - Crawler Trigger
      summary: Real-time Search API - Crawler Trigger
      description: >-
        ## Overview


        ### Trigger a Flight Search


        Submits a flight search to the processing queue. Award availability is
        retrieved asynchronously.


        A `task_id` may be provided by the client, but it is not required. If
        omitted, the backend generates a `task_id` and returns it in the
        response. Use that identifier to retrieve the search results.


        A client-defined `task_id` is useful when multiple requests need to be
        grouped into a single search task.


        ### Recommended Sample Code


        [Real-Time Search API sample
        code](https://gist.github.com/awardtool/8947354e6a2f24469cf4a07ddb82bd9f)


        ## Query Constraints


        - Each request must search exactly one travel date. Date ranges are not
        supported.
            

        ## Request Fields


        ### `pax`


        - **Type:** Integer
            
        - **Required:** Yes
            
        - **Description:** Number of passengers included in the search.
            

        ### `programs`


        - **Type:** Array of strings
            
        - **Required:** Yes
            
        - **Description:** Loyalty-program codes to search.
            

        ### `cabins`


        - **Type:** Array of strings
            
        - **Required:** Yes
            
        - **Description:** Cabin classes to include.
            
        - **Supported values:**
            
            - `Economy`
                
            - `Premium Economy`
                
            - `Business`
                
            - `First`
                

        ### `origin`


        - **Type:** String
            
        - **Required:** Yes
            
        - **Description:** Origin airport’s three-letter IATA code, such as
        `SFO`.
            

        ### `arrival`


        - **Type:** String
            
        - **Required:** Yes
            
        - **Description:** Destination airport’s three-letter IATA code, such as
        `JFK`.
            

        ### `date`


        - **Type:** Object
            
        - **Required:** Yes
            
        - **Description:** Travel date to search.
            
        - **Constraint:** Must represent exactly one date. Date ranges are not
        supported.
            

        ### `task_id`


        - **Type:** String
            
        - **Required:** No
            
        - **Description:** Identifier used to track the search and retrieve its
        results from the backend.
            
        - **Usage:**
            
            - Provide your own `task_id` when you need to group multiple same-date requests, such as requests split across several program batches.
                
            - Omit `task_id` when submitting a standalone request. The backend will generate one and return it in the response.
                
            - Store the returned `task_id` and use it when calling the result-retrieval endpoint.
                
            - All requests using the same client-defined `task_id` must use the same travel date.
                

        When `task_id` is omitted, each request receives a separate
        backend-generated identifier. To combine multiple requests into one
        task, provide and reuse your own `task_id`.
      tags:
        - realTimeAwardFlightSearch
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/type_realTimeAwardFlightSearch:RealTimeSearchApiCrawlerTriggerRealTimeAwardFlightSearchResponse
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                origin:
                  type: string
                destination:
                  type: string
                programs:
                  type: array
                  items:
                    type: string
                cabins:
                  type: array
                  items:
                    type: string
                date:
                  type: string
                  format: date
                pax:
                  type: string
                api_key:
                  type: string
              required:
                - origin
                - destination
                - programs
                - cabins
                - date
                - pax
                - api_key
servers:
  - url: https://apisv2.awardtoolapi.com
    description: Default
components:
  schemas:
    type_realTimeAwardFlightSearch:RealTimeSearchApiCrawlerTriggerRealTimeAwardFlightSearchResponse:
      type: object
      properties:
        message:
          type: string
        status:
          type: integer
        task_id:
          type: string
      required:
        - message
        - status
        - task_id
      title: RealTimeSearchApiCrawlerTriggerRealTimeAwardFlightSearchResponse

```

## Examples

**Request**

```json
{
  "origin": "JFK",
  "destination": "LHR",
  "programs": [
    "QF",
    "AC",
    "UA",
    "AA",
    "AS",
    "AV",
    "B6",
    "VA",
    "VS"
  ],
  "cabins": [
    "Economy",
    "Premium Economy",
    "Business",
    "First"
  ],
  "date": "2026-12-25",
  "pax": "1",
  "api_key": "YOUR_API_KEY"
}
```

**Response**

```json
{
  "message": "request processed, exit early.",
  "status": 200,
  "task_id": "0092ca3e81f911f1b21e0a763c204a6a"
}
```

**SDK Code**

```python
import requests

url = "https://apisv2.awardtoolapi.com/flight_trigger/search_real_time"

payload = {
    "origin": "JFK",
    "destination": "LHR",
    "programs": ["QF", "AC", "UA", "AA", "AS", "AV", "B6", "VA", "VS"],
    "cabins": ["Economy", "Premium Economy", "Business", "First"],
    "date": "2026-12-25",
    "pax": "1",
    "api_key": "YOUR_API_KEY"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://apisv2.awardtoolapi.com/flight_trigger/search_real_time';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"origin":"JFK","destination":"LHR","programs":["QF","AC","UA","AA","AS","AV","B6","VA","VS"],"cabins":["Economy","Premium Economy","Business","First"],"date":"2026-12-25","pax":"1","api_key":"YOUR_API_KEY"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://apisv2.awardtoolapi.com/flight_trigger/search_real_time"

	payload := strings.NewReader("{\n  \"origin\": \"JFK\",\n  \"destination\": \"LHR\",\n  \"programs\": [\n    \"QF\",\n    \"AC\",\n    \"UA\",\n    \"AA\",\n    \"AS\",\n    \"AV\",\n    \"B6\",\n    \"VA\",\n    \"VS\"\n  ],\n  \"cabins\": [\n    \"Economy\",\n    \"Premium Economy\",\n    \"Business\",\n    \"First\"\n  ],\n  \"date\": \"2026-12-25\",\n  \"pax\": \"1\",\n  \"api_key\": \"YOUR_API_KEY\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://apisv2.awardtoolapi.com/flight_trigger/search_real_time")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"origin\": \"JFK\",\n  \"destination\": \"LHR\",\n  \"programs\": [\n    \"QF\",\n    \"AC\",\n    \"UA\",\n    \"AA\",\n    \"AS\",\n    \"AV\",\n    \"B6\",\n    \"VA\",\n    \"VS\"\n  ],\n  \"cabins\": [\n    \"Economy\",\n    \"Premium Economy\",\n    \"Business\",\n    \"First\"\n  ],\n  \"date\": \"2026-12-25\",\n  \"pax\": \"1\",\n  \"api_key\": \"YOUR_API_KEY\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://apisv2.awardtoolapi.com/flight_trigger/search_real_time")
  .header("Content-Type", "application/json")
  .body("{\n  \"origin\": \"JFK\",\n  \"destination\": \"LHR\",\n  \"programs\": [\n    \"QF\",\n    \"AC\",\n    \"UA\",\n    \"AA\",\n    \"AS\",\n    \"AV\",\n    \"B6\",\n    \"VA\",\n    \"VS\"\n  ],\n  \"cabins\": [\n    \"Economy\",\n    \"Premium Economy\",\n    \"Business\",\n    \"First\"\n  ],\n  \"date\": \"2026-12-25\",\n  \"pax\": \"1\",\n  \"api_key\": \"YOUR_API_KEY\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://apisv2.awardtoolapi.com/flight_trigger/search_real_time', [
  'body' => '{
  "origin": "JFK",
  "destination": "LHR",
  "programs": [
    "QF",
    "AC",
    "UA",
    "AA",
    "AS",
    "AV",
    "B6",
    "VA",
    "VS"
  ],
  "cabins": [
    "Economy",
    "Premium Economy",
    "Business",
    "First"
  ],
  "date": "2026-12-25",
  "pax": "1",
  "api_key": "YOUR_API_KEY"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://apisv2.awardtoolapi.com/flight_trigger/search_real_time");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"origin\": \"JFK\",\n  \"destination\": \"LHR\",\n  \"programs\": [\n    \"QF\",\n    \"AC\",\n    \"UA\",\n    \"AA\",\n    \"AS\",\n    \"AV\",\n    \"B6\",\n    \"VA\",\n    \"VS\"\n  ],\n  \"cabins\": [\n    \"Economy\",\n    \"Premium Economy\",\n    \"Business\",\n    \"First\"\n  ],\n  \"date\": \"2026-12-25\",\n  \"pax\": \"1\",\n  \"api_key\": \"YOUR_API_KEY\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "origin": "JFK",
  "destination": "LHR",
  "programs": ["QF", "AC", "UA", "AA", "AS", "AV", "B6", "VA", "VS"],
  "cabins": ["Economy", "Premium Economy", "Business", "First"],
  "date": "2026-12-25",
  "pax": "1",
  "api_key": "YOUR_API_KEY"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://apisv2.awardtoolapi.com/flight_trigger/search_real_time")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```