Travel

Hotel Listing

/extract/json

Hotel or lodging property listing with pricing, amenities, and availability from a booking platform.

Download the schematravel/hotel-listing.json

hotel-listing.schema

// names marked ? are optional

property_name:string// Name of the hotel or lodging property. Commonly found in: Booking.com, Expedia, Hotels.com, hotel website.
chain_or_brand?:string// Hotel chain or brand affiliation. Commonly found in: Booking.com, hotel website.
property_type?:string// Type of lodging property. Commonly found in: Booking.com property type, listing metadata. One of: hotel, motel, resort, boutique, hostel, b_and_b, apartment_hotel, other.
star_rating?:number// Official star rating of the property. Commonly found in: Booking.com, hotel website, official classification.
address?:string// Street address of the property. Commonly found in: Booking.com, hotel website, Google Maps.
city:string// City where the property is located. Commonly found in: Booking.com, hotel website.
country:string// Country where the property is located. Commonly found in: Booking.com, hotel website.
latitude?:number// Latitude coordinate of the property. Commonly found in: Google Maps, geocoding API.
longitude?:number// Longitude coordinate of the property. Commonly found in: Google Maps, geocoding API.
amenities?:string[]// List of property amenities. Commonly found in: Booking.com amenities, hotel website facilities.
room_types?:object[]// Available room types with pricing. Commonly found in: Booking.com room options, hotel website rooms page.
name:string// Name of the room type.
sqft?:number// Room size in square feet.
beds?:string// Bed configuration description.
max_occupancy?:number// Maximum number of occupants.
base_price_usd?:number// Base nightly rate in USD.
availability?:boolean// Whether the room type is currently available.
cancellation_policy?:string// Cancellation policy description. Commonly found in: Booking.com policies, hotel website.
check_in_time?:string// Standard check-in time. Commonly found in: Booking.com hotel info, hotel website.
check_out_time?:string// Standard check-out time. Commonly found in: Booking.com hotel info, hotel website.
pet_policy?:string// Pet policy description. Commonly found in: Booking.com policies, hotel website.
parking_available?:boolean// Whether parking is available on-site. Commonly found in: Booking.com amenities, hotel website.
breakfast_included?:boolean// Whether breakfast is included in the rate. Commonly found in: Booking.com, hotel website.
review_score?:number// Overall guest review score. Commonly found in: Booking.com review score, TripAdvisor.
review_count?:number// Total number of guest reviews. Commonly found in: Booking.com, TripAdvisor.
platform:string// Booking platform where this listing was found. Commonly found in: scraper metadata, URL pattern.
page_title?:string// Title of the source page. Tabstack auto-fills this from page metadata when left empty.
favicon?:string// Favicon URL of the source page. Tabstack auto-fills this from page metadata when left empty.

Try it live

A sample Hotel Listing document, generated from the schema. Edit it, or paste a real response, and see it checked against the schema instantly. It runs in your browser, nothing is sent anywhere.

your-output.json
validation

Valid, matches Hotel Listing

Every required field is present and each value matches its type. Extra fields are allowed. A field the page does not carry is not guaranteed to come back as null, so check values rather than only checking for null.

/extract/json

Copy-paste usage

The same call in TypeScript, Python, and curl. Point it at your own URL and go. The schema drives the response, so you get back the fields you asked for instead of a page to parse.

Features

  • Typed TypeScript and Python SDKs
  • One call, no parsing code and no second LLM pass
  • The same field names on every request, even when the page layout changes
hotel-listing.ts
// curl -sfLO https://raw.githubusercontent.com/Mozilla-Ocho/tabstack-schemas/main/travel/hotel-listing.json
import Tabstack from '@tabstack/sdk'
import schema from './hotel-listing.json' with { type: 'json' }

const client = new Tabstack() // reads TABSTACK_API_KEY from the environment

try {
  const data = await client.extract.json({
    url: 'https://example.com/hotels/example-hotel',
    json_schema: schema,
    effort: 'standard', // 'min' | 'standard' | 'max'
  })

  console.log(data)
} catch (err) {
  console.error('Extraction failed:', err)
}

Ship this schema in one call.

Pass a URL, get matching JSON back. Free to start, no extraction layer to maintain.