{
  "openapi": "3.0.1",
  "info": {
    "title": "12Go Flights, Trains, Buses & Ferries Scraper – Worldwide Fares",
    "description": "Scrape 12go.asia travel prices worldwide: flights, trains, buses, ferries, vans and transfers. Search many origins, destinations and dates at once, with fares converted to your currency.",
    "version": "1.0",
    "x-build-id": "C5hHbPsqcYzgJEsBo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/boring_internet_explorer~12go-travel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-boring_internet_explorer-12go-travel-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/boring_internet_explorer~12go-travel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-boring_internet_explorer-12go-travel-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/boring_internet_explorer~12go-travel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-boring_internet_explorer-12go-travel-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "origins",
          "destinations"
        ],
        "properties": {
          "origins": {
            "title": "Origins",
            "type": "array",
            "description": "Departure cities, airports or stations. Use a name (Bangkok), an airport code (BKK) or a 12go place ID (1p). Add several to search each one.",
            "items": {
              "type": "string"
            }
          },
          "destinations": {
            "title": "Destinations",
            "type": "array",
            "description": "Arrival cities, airports or stations (Phuket, HKT, 73p...). Add several to search each one.",
            "items": {
              "type": "string"
            }
          },
          "departureDates": {
            "title": "Departure dates",
            "type": "array",
            "description": "Travel dates in YYYY-MM-DD format. Leave empty to search tomorrow.",
            "items": {
              "type": "string"
            }
          },
          "passengers": {
            "title": "Passengers",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of travelers (1-9). Prices are per passenger, except private transfers which are per vehicle.",
            "default": 1
          },
          "transportTypes": {
            "title": "Transport types",
            "type": "array",
            "description": "Only keep these transport types. Leave empty for all. A trip that mixes types is kept if any of its parts matches.",
            "items": {
              "type": "string",
              "enum": [
                "flight",
                "train",
                "bus",
                "ferry",
                "van",
                "taxi"
              ],
              "enumTitles": [
                "Flights",
                "Trains",
                "Buses",
                "Ferries",
                "Shared vans",
                "Taxis & private transfers"
              ]
            },
            "default": []
          },
          "country": {
            "title": "Your country",
            "enum": [
              "SA",
              "AE",
              "KW",
              "QA",
              "BH",
              "OM",
              "EG",
              "JO",
              "MA",
              "TR",
              "IN",
              "PK",
              "TH",
              "VN",
              "ID",
              "MY",
              "SG",
              "PH",
              "JP",
              "KR",
              "CN",
              "GB",
              "DE",
              "FR",
              "US",
              "CA",
              "AU",
              "OTHER"
            ],
            "type": "string",
            "description": "Used to pick the default currency and to label results (country / market fields). Choose Other for USD.",
            "default": "OTHER"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "AUTO",
              "AED",
              "ALL",
              "AMD",
              "ARS",
              "AUD",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BRL",
              "BYN",
              "CAD",
              "CHF",
              "CLP",
              "CNH",
              "CNY",
              "COP",
              "CZK",
              "DKK",
              "DOP",
              "EGP",
              "EUR",
              "GBP",
              "GEL",
              "HKD",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KRW",
              "KZT",
              "LAK",
              "LKR",
              "MAD",
              "MKD",
              "MMK",
              "MOP",
              "MXN",
              "MYR",
              "NGN",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PEN",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "RON",
              "RSD",
              "RUB",
              "SAR",
              "SEK",
              "SGD",
              "THB",
              "TRY",
              "TTD",
              "TWD",
              "UAH",
              "USD",
              "UZS",
              "VND",
              "XCD",
              "XCG",
              "ZAR"
            ],
            "type": "string",
            "description": "Currency for all prices. Auto uses the currency of your country, and falls back to USD when it is not supported by the site.",
            "default": "AUTO"
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "cheapest",
              "fastest",
              "earliest",
              "recommended"
            ],
            "type": "string",
            "description": "Applied before Max items is taken, so 'cheapest' returns the cheapest trips of each search.",
            "default": "cheapest"
          },
          "minPrice": {
            "title": "Minimum price",
            "type": "number",
            "description": "Only trips priced at or above this amount (in the selected currency)."
          },
          "maxPrice": {
            "title": "Maximum price",
            "type": "number",
            "description": "Only trips priced at or below this amount (in the selected currency)."
          },
          "departureAfter": {
            "title": "Departs after (HH:MM)",
            "type": "string",
            "description": "Earliest departure time, 24h format, e.g. 06:00."
          },
          "departureBefore": {
            "title": "Departs before (HH:MM)",
            "type": "string",
            "description": "Latest departure time, 24h format, e.g. 22:00."
          },
          "includeUnbookable": {
            "title": "Include sold-out / unbookable trips",
            "type": "boolean",
            "description": "Also return trips that cannot currently be booked (no price).",
            "default": false
          },
          "startUrls": {
            "title": "Search page URLs (optional)",
            "type": "array",
            "description": "Alternative to the fields above: 12go.asia search pages like https://12go.asia/en/travel/bangkok/phuket?date=2026-12-01",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max items per search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum trips returned for EACH origin / destination / date combination.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Your proxy configuration from Apify",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}