POST /api/yatra/hotels/search
Price: 20 credits
Search Yatra hotels in a city for given dates and guests: name, stars, guest rating, locality and coordinates, photos, amenities, nearby landmarks, total price of the stay before and after discount with tax, per-night price, promo code, room and rate plan, with star, guest rating, price band, property type, chain, locality and feature filters
Get the city name from yatra/places/search. Pass a returned id and city to yatra/hotels for the full description, rooms and reviews.
access-token string requiredtimeout integer — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)city string required — City name (examples: "Goa", "Manali"; minLength: 2)check_in integer required — Check-in date, unix seconds (examples: 1795113000; min: 0)check_out integer required — Check-out date, unix seconds (examples: 1795199400; min: 0)adults integer — Adult guests (default: 2; min: 1; max: 8)children integer — Child guests (default: 0; min: 0; max: 4)star_ratings array — Hotel star classes to keep (default: []; examples: [4,5])guest_ratings array — Guest rating bands to keep (default: []; examples: [4,5])price_ranges array — Nightly price bands in INR to keep (default: []; one of: "below_1000", "1001_2000", "2001_4000", "4001_7000", "7001_10000", "above_10000")property_types array — Property types to keep (default: []; examples: ["Resort","Villa"])chains array — Hotel chains to keep (default: []; examples: ["Treebo Hotels"])localities array — Localities to keep (default: []; examples: ["Calangute"])features array — Stay features to keep (default: []; examples: ["Free Cancellation","Free Breakfast"])sort string — Result order (default: "relevance"; one of: "relevance", "price_low", "price_high")count integer required — Max number of results (min: 1)@type string (default: "YatraHotelCard")id string requiredname string nullablealias string nullableproperty_type string nullablecategories array (default: [])star_rating number nullablechain string nullablecity string nullablearea string nullablesub_area string nullablezone string nullablearea_zone string nullablelatitude number nullablelongitude number nullablerooms_count integer nullablerank integer nullableguest_rating number nullablereview_count integer nullableimage string nullableimages array (default: [])themes array (default: [])amenities array (default: [])landmarks array (default: [])@type string (default: "YatraLandmark")name string requireddistance_km number nullableis_yatra_smart boolean (default: false)couple_friendly boolean (default: false)pet_friendly boolean (default: false)women_friendly boolean (default: false)eco_plus boolean (default: false)long_stay boolean (default: false)currency string nullableprice number nullablediscounted_price number nullablebase_price number nullabletax number nullableper_night_price number nullableper_night_discounted_price number nullabletotal_discount number nullablesavings_percent number nullablepromo_code string nullablepromo_discount number nullablefree_cancellation boolean nullablepay_later boolean nullablerooms_left integer nullableroom_name string nullablerate_plan_name string nullablemax_guests integer nullableinclusions array (default: [])highlights array (default: [])supplier string nullable422 — The request body did not validate Check the fields against this schema. A URN with the wrong prefix is the most common cause.408 — The request ran past its time limit Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.412 — The entity was not found, or a precondition failed Retrying will not help: either the entity does not exist, or the input points at a different one.429 — Too many requests: a rate limit or a usage window is exhausted When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.500 — Something broke on our side Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.529 — Rate limit reached, or the endpoint is overloaded Wait at least 30 seconds, then retry.X-Error — Error message text (present only on error)X-Request-ID — Unique request identifierX-Execution-Time — Execution time in secondsX-Result-Count — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.X-Total-Available-Results — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.X-Warning — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.X-Retry-After — Seconds to wait before retrying. Present only on 429.