How to search hotels and availability by location via API: resolve the destination, read the whole listing of a night (192 hotels for 0.32 credits) and check a hotel's calendar.

A hotel search API is a programmatic interface that, given a location and a night, returns the hotels on sale there together with their price, review score, star category, room type and cancellation terms — the same list a traveller sees on a booking site, delivered as structured JSON instead of a web page. Veetal Connect API exposes this as a data API: it resolves the destination for free, stores a scheduled snapshot of every property listed in that destination (192 hotels for 0.32 credits in the reference recipe), runs the same search live on demand, and lets you drill into a single hotel's day-by-day availability. This guide explains how to search hotels and availability by location via API, and when to use the Feed or the Real Time layer.

Two things people mean by "hotel search API"

The keyword hides two very different products, and choosing the wrong one wastes weeks.

  • A search API for booking. It returns reservable inventory: rooms you can hold and pay for through the provider (a GDS, a bed bank or an OTA's official affiliate programme). Its output is a shopping cart. If you are building a booking flow, that is what you need — and Veetal Connect API is not it.
  • A search API for data. It returns what the market is showing for a location and a night: which properties are listed, in what order, at what final price, with what score and conditions. Its output is a dataset. This is what a comparator, a revenue agency, a BI team or a market analyst needs, and what Veetal Connect API provides alongside the datasets described in what a hotel data API is.

The rest of this article is about the second kind: observation, not transaction.

Searching hotels by destination with Veetal Connect API is a chain of four calls, each one cheaper than building the equivalent yourself.

1. Resolve the location (free)

Every destination-level dataset is keyed on an identifier, not on a free-text string. The catalog_search reference endpoint resolves regions, countries, states, cities, airports and currencies at 0 credits, so "Barcelona" becomes a city id you can reuse across the hotel listing, the market demand dataset and the events feed for the same city.

2. Define the market as a location search entity

A location search entity is the destination plus the filters that define what you consider the market: star categories, accommodation type, board, minimum review score, distance to the centre, occupancy, currency and number of nights. The filters live on the entity, not on each query, so the market you read is exactly the market you configured — and the entity controls the size of each response and therefore its cost. A five-kilometre radius around a conference centre with 4–5 star properties is a micro-market of a few dozen hotels; a whole capital is several hundred and needs pagination.

3. Read the listing — Feed or Real Time

The Feed layer reads a snapshot written by a scheduled import; the Real Time layer runs the search at the moment of the request. Both return the same shape of data; the comparison below tells you which to use.

4. Drill into one hotel's availability

The listing tells you who is on sale for one night. To know whether a specific property is bookable across a range of dates, with its minimum-stay restrictions and closeouts, you switch to the hotel availability API: a day-by-day calendar for up to 365 days per hotel.

What a location search returns

The stored listing for a destination and a night is a paginated array of accommodations, in the order the source displays them. The array order is the rank, and it moves from day to day. Each item carries:

  • Identity: hotelName, slug, bookingHotelId, accType (hotel, apartment, hostel…), a photos block.
  • Price: priceFinal (the amount actually charged — use this one), priceOriginal and priceDiscount (a discount of 197 on 583 is common), currency (set by the entity), displayPrice (rounded, not suitable for averages).
  • Quality: stars, reviewScore, reviewCount.
  • Conditions: roomType, breakfastIncluded, freeCancellation, isClosed.
  • Location: locationDetails.address, displayLocation, distanceToCenter (a string, sometimes "Distance not available") and a plain-text publicTransportDistanceDescription.
  • Pagination: pagination.hasMore — a district returns ten properties in one page; a city returns hundreds and must be paged, or you are looking at a slice of the market.

The reference recipe Track the hotel market of a destination documents a real call that returned 192 hotels for 0.32 credits, in 457 ms and 232 KB of JSON. That single response is the whole visible market of the destination for that night — one request instead of 192.

Feed vs Real Time for hotel search by location

Feed · stored listingReal Time · live listing
EndpointGET /v2/feed/location-search/{location_search_id}/{target_date}/booking-location-searchGET /v2/real-time/location-search/{location_search_id}?target_date=YYYY-MM-DD
When the search runsOn a schedule you configure (e.g. daily)At the moment of your request (5–60 s+)
What target_date meansThe check-in date the import searched for — which, for a daily schedule, is the day the run executedAny check-in date, today or in the future
HistoryYes: every run is stored; read past runs with import_id + its own date, or a range of up to 30 days with target_end_dateNo: each call is a fresh observation
CostCheap reads; 192 properties ≈ 0.32 creditsConsumes credits per search; cache 0–24 h configurable, no_cache=true to force fresh data
Best forRanking monitors, price maps, time series, BI dashboardsAd-hoc research, a future date nobody is importing, checking a specific night right now

The rule that keeps budgets sane: Feed for what is recurrent and configured, Real Time for what is one-off and arbitrary. A daily snapshot of your city costs a fraction of a credit; re-running it live on every dashboard load would cost credits and seconds per page view.

The stored listing, step by step

HTTP
GET /v2/feed/location-search/6650a1…/2026-11-14/booking-location-search?page=1&limit=100
veetal-api-key: YOUR_KEY

Two contract details cost most first-time users a 404:

  1. The date is not "today". target_date is the check-in date the import searched; a future date has no stored data. List the existing runs first through the account imports endpoint (service=feed-booking-location-search).
  2. Without import_id, only the latest run exists. Earlier runs answer 404 unless you pass their import_id together with their own date.

The Micro-market monitor recipe wraps both rules: it lists the dates that have data, pages the full market, and diffs two dates to show who entered the listing, who disappeared, who moved the price and who climbed.

The live listing

HTTP
GET /v2/real-time/location-search/6650a1…?target_date=2026-12-31&rooms=1&currency=EUR
veetal-api-key: YOUR_KEY

Same entity, same fields, but the search runs now for the date you choose — including a New Year's Eve nobody has scheduled. The Hotel market research prompt recipe uses this endpoint through the MCP server to write a market briefing (supply by type and star band, price quartiles, score distribution, anchor properties) from a handful of live calls. The real-time hotel prices API post covers the cache and credit model of the whole Real Time layer.

From listing to availability

The listing answers "who is on sale tonight at what price". Availability answers "is this property bookable on these dates, and under which restrictions". The endpoint is per hotel:

HTTP
GET /v2/real-time/accommodation/{slug}/availability?from_date=2026-11-01&to_date=2026-11-30&adults=2

It returns one entry per day — bookable or not, room types on sale, minimum nights, closeouts — plus a summary, for up to 365 days per request (a full year takes one to two minutes). The Booking analytics signals recipe turns that calendar into compression signals: a competitor set that closes the same three nights is telling you something price alone would not.

A typical destination pipeline is therefore: resolve the location → configure the search entity → daily Feed snapshot of the listing → Real Time availability on the handful of properties that moved.

Why not scrape a results page yourself?

The case against maintaining your own scraper for hotel search results is purely an engineering one:

  • It breaks with the layout. Selectors that worked last month silently return nulls this month.
  • It is HTML, not data. You still have to turn 583 → 386 into priceOriginal, priceDiscount and priceFinal, normalise currencies and detect closed properties.
  • It does not scale. Travel platforms manage automated traffic; a script that works for ten requests rarely survives a city a day.
  • Ordering and history are lost unless you build the storage yourself; the Feed layer stores each run indexed by date and import.

A structured listing API replaces all of that with a JSON contract that stays stable while the source changes — see hotel API vs web scraping.

Why the destination listing is worth watching

Booking Holdings reported 1,235 million room nights booked in 2025, up 8% year over year, with alternative accommodation at roughly 36% of Booking.com's mix (Booking Holdings 10-K, 2025). The listing a traveller sees for a destination and a night is where a huge share of those decisions happens, and it changes daily in composition, order, price and conditions. A hotel listing API that captures it every day is the closest thing to a ground truth for a market. The Booking data source page lists the other datasets built on the same source.

Two real use cases

A revenue agency tracking its destination ranking

An agency manages twelve hotels across three coastal towns. Every morning a scheduled import stores each town's listing; a small job reads the Feed for the last date, pages it fully, finds each managed hotel's rank, priceFinal, reviewScore and freeCancellation, and appends a row to a table. The weekly report shows every hotel's position curve against the properties that entered and left the listing, and flags the days a competitor undercut by more than 10% while including breakfast. Cost: a fraction of a credit per town per day. When a hotel drops five places, the analyst runs one Real Time availability call on the neighbours that climbed to see whether they opened inventory or simply cut price.

A startup building a price map by neighbourhood

A travel startup wants a map of median nightly price per neighbourhood for ten European cities, refreshed daily. It creates one location search entity per neighbourhood (radius filter, all star bands), resolves each city once with catalog_search, and lets the Feed run. Each day the pipeline pages every entity, aggregates priceFinal by stars and accType, and writes medians and quartiles to the map. When a user asks about a specific future weekend, the app fires the Real Time listing for that entity and date, cached for the day so the next visitor does not pay again. The Booking location listing dataset page lists the filters available on the entity; the pricing page explains how credits map to both layers.

Frequently asked questions

What is a hotel search API?

A hotel search API returns, for a location and a check-in date, the list of hotels on sale with their price, score, stars, room type and cancellation terms as structured JSON. In Veetal Connect API it is a data API for analysis and comparison, not a booking API: it observes the market rather than reserving rooms.

How do I search hotels by location via API?

Resolve the destination with the free catalog_search endpoint, create a location search entity with your filters (stars, type, board, score, radius, occupancy), then read the listing either from the Feed (GET /v2/feed/location-search/{id}/{date}/booking-location-search) or live from Real Time (GET /v2/real-time/location-search/{id}?target_date=…).

How much does a destination search cost?

The documented Feed example returned 192 hotels for 0.32 credits in a single call. Real Time searches consume credits per request and can be cached for up to 24 hours. The free trial includes 1,000 credits.

What is the difference between the listing and availability?

The listing covers every property on sale in a destination for one night. Availability covers one property across a range of up to 365 days, day by day, with minimum-stay and closeout restrictions. Use the listing to see the market and availability to inspect a hotel.

Can I get historical listings for a destination?

Yes. Every scheduled Feed import is stored. Read a past run by passing its import_id together with the date it searched, or request a range of up to 30 days with target_end_date. Without import_id the endpoint returns only the latest run.

Does the API rank the results?

The array order is the order the source displayed, so the index is that day's rank. The destination-ranking recipe uses it directly to build a position curve per hotel. For a future date nobody has imported, run the Real Time search instead.

Start with 1,000 free credits

Create a location search for your city, launch the first import and read the whole listing in one call. The free trial includes 1,000 credits, no card required: start at dashboard.veetal.app/signup.