{
  "openapi": "3.0.1",
  "info": {
    "title": "Trip.com Things to Do Search",
    "description": "Search Trip.com's things-to-do catalogue by keyword, city or attraction. Get every tour, ticket and activity with its price, rating, review count, booking count, vendor, images and tags. It has four sort orders and rating, cancellation and category filters. $3.00 per 1,000 products.",
    "version": "1.0",
    "x-build-id": "ZL3E6FmxY1noibe4b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/boncross~tripcom-product-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-boncross-tripcom-product-search",
        "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/boncross~tripcom-product-search/runs": {
      "post": {
        "operationId": "runs-sync-boncross-tripcom-product-search",
        "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/boncross~tripcom-product-search/run-sync": {
      "post": {
        "operationId": "run-sync-boncross-tripcom-product-search",
        "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",
        "properties": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "What to search for: a city, a country or a phrase such as \"bangkok\", \"seoul\" or \"tokyo disneyland\".",
            "items": {
              "type": "string"
            }
          },
          "attractions": {
            "title": "Attractions",
            "type": "array",
            "description": "Search within one attraction instead of a destination. Trip.com attraction URLs or bare attraction ids.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max results per search",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many rows for each keyword or attraction. 0 means every result Trip.com returns.",
            "default": 90
          },
          "maxItems": {
            "title": "Maximum results for the whole run",
            "minimum": 0,
            "type": "integer",
            "description": "A run-wide ceiling across every target. The per-target limit above applies to each one separately, so ten targets at 50 each returns 500; set this to cap the total. Zero means no run-wide limit. Rows that report an input the actor could not resolve are not counted here and are never charged for.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "recommended",
              "rating_desc",
              "price_asc",
              "most_booked"
            ],
            "type": "string",
            "description": "Order the results come back in, using Trip.com's own four orders. \"Traveler rating\" is Trip.com's weighting of score and review volume: it favours well-reviewed, much-reviewed results rather than listing the highest score first.",
            "default": "recommended"
          },
          "minRating": {
            "title": "Minimum rating",
            "enum": [
              "",
              "4.0",
              "4.5"
            ],
            "type": "string",
            "description": "Keep only products rated at or above this. Trip.com's search offers these two thresholds.",
            "default": ""
          },
          "serviceFilters": {
            "title": "Service guarantees",
            "type": "array",
            "description": "Keep only products offering these.",
            "items": {
              "type": "string",
              "enum": [
                "free_cancellation",
                "instant_confirmation"
              ],
              "enumTitles": [
                "Free cancellation",
                "Instant confirmation"
              ]
            },
            "default": []
          },
          "categoryCodes": {
            "title": "Category codes",
            "type": "array",
            "description": "Keep only products in these Trip.com categories, for example WaterActivities or AerialTours. The codes available for a search are listed in that search's own filter block.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Travel date from",
            "type": "string",
            "description": "Only products you can book for this travel date, or for any day up to the end date below (YYYY-MM-DD). Leave empty for any date."
          },
          "endDate": {
            "title": "Travel date until",
            "type": "string",
            "description": "End of the travel-date window. Empty means the start date alone."
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Only return products whose price is at or above this, in the currency selected below. Set 0 for no minimum.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Only return products whose price is at or below this, in the currency selected below. Products with no price are excluded. Set 0 for no maximum.",
            "default": 0
          },
          "includeAttractionCards": {
            "title": "Include attraction cards",
            "type": "boolean",
            "description": "Trip.com mixes attraction pages into its product results. Keep them, marked as attractions, or drop them. Dropped rows are free.",
            "default": true
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO currency code. Prices come back quoted in it.",
            "default": "USD"
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Locale the names and tags come back in.",
            "default": "en-XX"
          },
          "includeRawData": {
            "title": "Include raw data",
            "type": "boolean",
            "description": "Attach the unparsed record to each row.",
            "default": false
          },
          "delayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause between calls.",
            "default": 700
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many requests run at once, each one paced by the delay above. The default is the fastest level measured clean; lower it only if a run reports refusals or errors.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}