Cleartrip Hotels
Per-room, per-rate prices as Cleartrip shows them, plus the hotel's profile and a destination walk. Cleartrip is the sixth hotel OTA on the shared endpoints — no new paths. Submit a job, receive a job_id, poll for the result.
/api/v1/scraper/ota-price/— submit/api/v1/scraper/ota-price/{job_id}/— pollBase URL: https://api.scrapeguys.com · Auth: X-API-Key: gsk_… · See the Overview.
"ota": "cleartrip" (aliases ct, cleartrip.com, or the numeric channel code 6) on the endpoints you already call. The envelope is the same as the other hotel OTAs; this page documents what is Cleartrip-specific.403 {"detail": "This API key does not have the 'ota:cleartrip' scope."}; where Cleartrip is not enabled for you, you get 400 before any job is created. Contact us to enable it.Where Cleartrip is available
| Endpoint | Cleartrip | Scope |
|---|---|---|
/ota-price/, /cheapest-room/ | Rooms × rates, per room / per night, before tax; tax split per rate | ota:cleartrip |
/hotel-details/ | Profile (rating, amenities, images, rules, policies) and room catalogue, no prices | details:cleartrip |
/destination-search/ | Destination walk, enabled separately | destination:cleartrip |
/rate-shop/ | Not offered | — |
GET /otas/ lists Cleartrip with code 6 and the endpoints it actually offers to your key.
Submit a job
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
ota | string | Required on /ota-price/ | — | "cleartrip", "ct", "cleartrip.com" or code 6. |
hotel_name, city | string | Conditional | — | Required together unless ota_hotel_id is given. |
ota_hotel_id | string | Optional | "" | Cleartrip's numeric hotel id (e.g. 4290277). A slug, a cleartrip.com/hotels/details/… URL, or the cleartrip.com/hotels/results?hotelId=… link Google Hotels shows is accepted too and read down to the id. A Cleartrip link may run to 1,000 characters (other OTAs' ids: 128); one longer than 128 is echoed back as the numeric id, and the link's own stay and party are not read — your request's are priced. An id or link that cannot be a Cleartrip hotel id is a 400; an unknown id returns quickly with a "no listing for hotel …" message. |
check_in, check_out | date | Required | — | YYYY-MM-DD; not past, ≤ 1 year ahead; ≤ 30 nights. |
adults | int | Optional | 2 | Party total across all rooms. |
rooms | int | Optional | 1 | 1–6. Above 6 is a 400 under rooms. Prices stay per room: the exact party is requested (adults split as evenly as they go, so 3 adults in 2 rooms is 2 + 1) and the total divided by rooms. |
children_ages | int[] | Optional | [] | One age per child. At most 2 children per room (and 4 adults); a party that cannot be seated is a 400 before any job runs. Children go to the rooms with fewer adults first. On destination search, a child aged 0 is searched as 1 (Cleartrip takes ages 1–17). |
device_type | string | Optional | desktop | desktop or mobile; echoed. app_android is rejected with a 400. |
The 202 Accepted body and polling are identical to the other OTAs: poll poll_url until status is completed or failed.
Response
The result is the shared room_types[] → offers[] structure (see the response schema). Cleartrip-specific points:
- Per room, per night, before tax.
priceis the figure for one room for one night excluding tax, whateverroomsyou asked for. - Tax is split per rate.
tax_and_feescomes from the rate's own line;tax_basis,tax_amountandfee_amountare reported per rate. - Uneven parties give an average room. When adults or children do not divide evenly across rooms, each offer is the booking's average room.
- Tax on
tax_onlyrates.fee_amountis0.0(the line is all tax); it isnullonly where the split is unknown. - Sold out. A sold-out result is re-checked once, and
unavailable_reasonexplains it where Cleartrip says why. - Stay and party are verified. If Cleartrip's page echoes a different stay or party than you asked for, the job fails rather than returning a price for a different search.
Hotel details and destination search
POST /hotel-details/ with "ota": "cleartrip" returns the hotel profile — rating, amenities, images, rules, policies — and the room catalogue, without prices. Review texts are not included. The room list covers one night, and the failure flags and incomplete sections say what was not delivered. Photos are capped at 60, shared across gallery sections. POST /destination-search/ with "ota": "cleartrip" walks a destination's hotels (unplaceable or made-up text is refused as an unresolved destination; star_ratings and sort=bayesian_review_score are supported; cards carry is_ad, country_code and landmark distance); see the Destination Search guide.
Result outcomes
- Refused requests: 7 or more rooms, or more than 4 adults or 2 children in one room, are a
400and cost nothing. - Search text Cleartrip refuses: the job ends after one attempt; send a plain hotel name.
- Cleartrip temporarily refuses the request: the job is retried before it is reported as failed.
- Not enabled:
400when Cleartrip is not enabled for you,403when the key lacks the scope.
Cleartrip-specific notes
- Place IDs:
place_id(a Google Place ID or a Maps link carrying one) is accepted to identify the hotel;ota_hotel_idis the most direct identity. For Cleartrip the value is checked strictly: free text ("Taj Mahal Palace Mumbai"), a link on a site other than Google Maps, or a value carrying two different Place IDs is a400underplace_id. The same id written twice, or a Maps link, is read as that id. - Misnamed fields: a near-miss field name is a
400naming the field you probably meant — e.g.starRatings→star_ratingson/destination-search/, andnum_adults→adults,num_rooms→rooms,kids→children_ageson/ota-price/and/cheapest-room/. An emptykids([]or0) is accepted. - Rate Shop: Cleartrip is not offered on Rate Shop.
tax_required: not needed on Cleartrip — the tax split above is already included on every rate at no cost, and sendingtax_requiredis a400.- For Cleartrip flights, see the Cleartrip Flights guide.