{
  "openapi": "3.0.1",
  "info": {
    "title": "Ctrip Scraper | Attractions, Tickets and Reviews",
    "description": "Ctrip scraper (携程) for attractions, tickets and reviews: type a city like Beijing and get 50 attractions in 19 seconds, 39 fields each. Chinese and English name, ticket price, rating, review count, heat score, A-grade, opening hours, address, coordinates, photos and latest reviews. No login.",
    "version": "1.0",
    "x-build-id": "wcj7L6vI0k1HL3Zu9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/silentflow~ctrip-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-silentflow-ctrip-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/silentflow~ctrip-scraper/runs": {
      "post": {
        "operationId": "runs-sync-silentflow-ctrip-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/silentflow~ctrip-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-silentflow-ctrip-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",
        "properties": {
          "searches": {
            "title": "📍 Cities or attractions",
            "type": "array",
            "description": "What to look for, one per line, in English or Chinese: a city or a region (<code>Beijing</code>, <code>成都</code>, <code>Yunnan</code>, <code>Tokyo</code>) gives its attractions in Ctrip's order, an exact attraction name (<code>故宫博物院</code>, <code>West Lake</code>) gives that attraction, any other words (<code>Great Wall</code>, <code>Disneyland</code>, <code>熊猫</code>) give the attractions Ctrip finds for them across the whole site, best match first. A big city lists thousands of attractions: set the cap to what you need.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Ctrip addresses",
            "type": "array",
            "description": "Or paste addresses copied from Ctrip: an attraction page (<code>https://you.ctrip.com/sight/beijing1/229.html</code>), a city's attraction list (<code>https://you.ctrip.com/sight/beijing1.html</code>), a destination page (<code>https://you.ctrip.com/place/chengdu104.html</code>) or a mobile attraction page (<code>https://m.ctrip.com/webapp/you/gspoi/sight/1/0.html?poiId=75595</code>).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "attractionIds": {
            "title": "🆔 Attraction ids",
            "type": "array",
            "description": "Or give Ctrip attraction ids, one per line: the number at the end of an attraction address (<code>229</code> is the Palace Museum in <code>you.ctrip.com/sight/beijing1/229.html</code>). Each id gives one row, the same as the <code>id</code> column of the results.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Max attractions per input",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many attractions to save for each line above. Every row is completed from the attraction's own page: <code>50</code> took 17 to 23 seconds and <code>100</code> 36 to 67 seconds on our test runs. An attraction id or address gives one row whatever the cap. Up to 10,000 per destination.",
            "default": 50
          },
          "category": {
            "title": "🏷️ Category",
            "enum": [
              "all",
              "museums",
              "art_galleries",
              "theme_parks",
              "water_parks",
              "parks_gardens",
              "zoos_aquariums",
              "beaches_islands"
            ],
            "type": "string",
            "description": "Keep one kind of attraction. <b>All</b> keeps everything Ctrip lists: sights, temples, old towns, shows and experiences included.",
            "default": "all"
          },
          "scenicLevel": {
            "title": "⭐ China scenic level",
            "enum": [
              "any",
              "4A",
              "5A"
            ],
            "type": "string",
            "description": "China grades its tourist sites from 1A to 5A. <b>5A</b> keeps the national top tier (Beijing has 10 on Ctrip), <b>4A and 5A</b> the two top tiers. Sites outside mainland China have no grade.",
            "default": "any"
          },
          "sortBy": {
            "title": "🔽 Sort by",
            "enum": [
              "recommended",
              "top_rated",
              "most_popular",
              "best_selling"
            ],
            "type": "string",
            "description": "<b>Recommended</b> is Ctrip's own ranking. <b>Top rated</b> weighs the score and the number of reviews, <b>most popular</b> follows Ctrip's heat score, <b>best selling</b> the tickets sold. The order decides which attractions fill the cap.",
            "default": "recommended"
          },
          "maxReviewsPerAttraction": {
            "title": "📝 Latest reviews per attraction",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How many of the newest reviews each row carries, in a <code>reviews</code> list. <code>0</code> adds none and keeps runs fastest. <code>200</code> reviews for 3 attractions took 20 seconds on our test run. An attraction with fewer reviews gives what it has, and Ctrip hides part of the reviews of some attractions.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}