{
  "openapi": "3.0.1",
  "info": {
    "title": "Ctrip Attractions & Tickets Scraper 携程景点门票: Prices and Ratings",
    "description": "Ctrip 携程景点门票 scraper: attraction tickets by city with online and gate prices, discounts, ratings, review counts, 5A grades, free-cancellation and instant-entry flags, GPS coordinates, optional hours and reviews. Trip.com offers in 14 currencies. Filters plus a price-change feed. No login.",
    "version": "0.3",
    "x-build-id": "oB7Hh52QqwcMClp46"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~ctrip-attractions-ticket-catalog/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-ctrip-attractions-ticket-catalog",
        "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/getascraper~ctrip-attractions-ticket-catalog/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-ctrip-attractions-ticket-catalog",
        "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/getascraper~ctrip-attractions-ticket-catalog/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-ctrip-attractions-ticket-catalog",
        "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": {
          "destinations": {
            "title": "Destinations",
            "type": "array",
            "description": "Cities to read, one per row. Use an English name (Shanghai), a Chinese name (上海), a Ctrip city id (2), or a Ctrip listing link such as https://you.ctrip.com/sight/hangzhou14.html. Results are split evenly across the cities.",
            "default": [
              "Beijing"
            ],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Listing URLs (optional)",
            "type": "array",
            "description": "Optional Ctrip city listing links, for example https://you.ctrip.com/sight/beijing1.html. A page link such as .../s0-p3.html starts reading at that page. Works together with Destinations.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "themes": {
            "title": "Themes",
            "type": "array",
            "description": "Keep only attractions that match at least one of these themes. Matching uses Ctrip's own labels, rankings and attraction names. Leave empty for all themes.",
            "items": {
              "type": "string",
              "enum": [
                "museums",
                "historic",
                "nature",
                "parks_gardens",
                "theme_parks",
                "water",
                "zoos_aquariums",
                "family",
                "night",
                "flowers_seasonal",
                "hot_springs",
                "skiing",
                "outdoor",
                "events"
              ],
              "enumTitles": [
                "Museums and exhibitions 博物馆",
                "Historic sites and temples 名胜古迹",
                "Nature and scenery 自然风光",
                "Parks and gardens 公园园林",
                "Theme parks and resorts 主题乐园",
                "Water fun and rafting 玩水漂流",
                "Zoos and aquariums 动物园水族馆",
                "Family and kids 亲子",
                "Night views and night tours 夜游",
                "Flowers and seasonal scenery 赏花赏秋",
                "Hot springs and spas 温泉",
                "Skiing and snow parks 滑雪",
                "Outdoor and adventure 户外",
                "Events and shows 赛事演出"
              ]
            },
            "default": []
          },
          "keywords": {
            "title": "Name or tag keywords",
            "type": "array",
            "description": "Keep attractions whose name, tags or tagline contain any of these words. Chinese words work best, for example 博物馆 or 古镇.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "scenicLevels": {
            "title": "China scenic grade",
            "type": "array",
            "description": "Keep attractions with this official tourist-site grade (5A is the highest). Only mainland China sites carry a grade.",
            "items": {
              "type": "string",
              "enum": [
                "5A",
                "4A",
                "3A",
                "2A",
                "1A"
              ],
              "enumTitles": [
                "5A (top grade)",
                "4A",
                "3A",
                "2A",
                "1A"
              ]
            },
            "default": []
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep attractions rated at least this many stars out of 5. Use 0 for no minimum. Attractions without a rating are dropped when this is above 0.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum review count",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Keep attractions with at least this many Ctrip reviews. Use 0 for no minimum.",
            "default": 0
          },
          "minPrice": {
            "title": "Minimum ticket price (CNY)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Keep attractions whose online ticket price is at least this amount in Chinese yuan. Use 0 for no minimum.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum ticket price (CNY)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Keep attractions whose online ticket price is at most this amount in Chinese yuan. Use 0 for no maximum.",
            "default": 0
          },
          "admission": {
            "title": "Admission",
            "enum": [
              "any",
              "free",
              "paid"
            ],
            "type": "string",
            "description": "Choose all attractions, only free attractions, or only attractions that sell a ticket.",
            "default": "any"
          },
          "bookableToday": {
            "title": "Bookable for today",
            "type": "boolean",
            "description": "Keep only attractions that Ctrip marks as bookable for today.",
            "default": false
          },
          "instantEntryOnly": {
            "title": "Instant entry tickets only",
            "type": "boolean",
            "description": "Keep only attractions whose tickets can be used right after buying (Ctrip label: buy and use).",
            "default": false
          },
          "freeCancellationOnly": {
            "title": "Free cancellation only",
            "type": "boolean",
            "description": "Keep only attractions whose tickets can be refunded at any time (Ctrip label: refund anytime).",
            "default": false
          },
          "includeNonAttractions": {
            "title": "Include events and topic pages",
            "type": "boolean",
            "description": "Ctrip mixes events and editorial topics such as flower-viewing guides into its lists. Turn this on to keep them. Off keeps real attractions only.",
            "default": false
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "ctrip",
              "rating",
              "reviews",
              "popularity",
              "price_low",
              "price_high"
            ],
            "type": "string",
            "description": "Order of the rows. Ctrip order is Ctrip's own ranking. Other options sort every page that was read, so they work best with more pages per city.",
            "default": "ctrip"
          },
          "includeTicketOffers": {
            "title": "Add Trip.com ticket offers",
            "type": "boolean",
            "description": "Also read the public Trip.com listing for each city. Adds ticket and tour products with prices in your currency, free-cancellation and instant-confirmation flags, sold counts and ratings (up to 12 per city), plus English names and converted prices on matching attractions.",
            "default": false
          },
          "offerCurrency": {
            "title": "Offer currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CNY",
              "HKD",
              "JPY",
              "KRW",
              "SGD",
              "AUD",
              "CAD",
              "THB",
              "MYR",
              "INR",
              "CHF"
            ],
            "type": "string",
            "description": "Currency for Trip.com ticket offers and converted attraction prices.",
            "default": "USD"
          },
          "offerFreeCancellationOnly": {
            "title": "Offers with free cancellation only",
            "type": "boolean",
            "description": "Keep only ticket offers that show free cancellation.",
            "default": false
          },
          "offerInstantConfirmationOnly": {
            "title": "Offers with instant confirmation only",
            "type": "boolean",
            "description": "Keep only ticket offers that show instant confirmation.",
            "default": false
          },
          "includeDetails": {
            "title": "Add attraction details",
            "type": "boolean",
            "description": "Open each attraction's own Ctrip page to add address, phone numbers, description, opening hours, visit duration, child, senior and student ticket rules, facilities, photos, rating breakdown, review highlights and nearby attractions. Slower, about 2 seconds per attraction.",
            "default": false
          },
          "maxReviewsPerAttraction": {
            "title": "Reviews per attraction",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Newest public reviews to attach to each row, from 0 to 10. Each has rating, text, date, traveler type, sub-ratings and any owner reply. Use 0 to skip reviews.",
            "default": 0
          },
          "trackChanges": {
            "title": "Track changes between runs",
            "type": "boolean",
            "description": "Remember each attraction's ticket price and rating from the last run so every row says whether it is new, has a changed price or rating, or is unchanged. Best for scheduled runs.",
            "default": false
          },
          "changeFeed": {
            "title": "Rows to return",
            "enum": [
              "all",
              "onlyNew",
              "onlyChanged",
              "newOrChanged"
            ],
            "type": "string",
            "description": "With change tracking on, choose which rows are kept: everything, only attractions seen for the first time, only price or rating changes, or both.",
            "default": "all"
          },
          "monitorScope": {
            "title": "Tracking name",
            "type": "string",
            "description": "A short name for this watch list. Runs that use the same name share one memory of past prices. Use a different name for each separate monitoring job.",
            "default": "default"
          },
          "maxItems": {
            "title": "Maximum attractions",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stop after this many attraction rows in total, split evenly across the cities. Ticket offers are extra rows and do not count here.",
            "default": 10
          },
          "maxPagesPerDestination": {
            "title": "Listing pages per city",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "The most Ctrip listing pages (10 attractions each) to read per city. With Ctrip ranking order the run stops as soon as enough matches are found. Sorting or strict filters read all of these pages.",
            "default": 3
          },
          "dedupe": {
            "title": "Remove duplicates",
            "type": "boolean",
            "description": "Return each attraction only once, even when several cities list it.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. Ctrip's public pages normally load without one. Turn on Apify Proxy if a run reports that Ctrip asked for a verification step.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}