Quickstart

Make your first live accommodation search with the Direct Travel API in a few minutes.

This guide makes one working request to the Direct Travel API — a live search for hotels in Paris — and reads the response. Swap in any address or coordinates once it works.

Prerequisites

  • API token (optional to start) — create one in the Hub. You can skip it and use demo mode (5 req/min) for the first call.

Make a request

To search, call GET /v2/accommodations with a location and your key in the X-API-KEY header. provider is optional — omit it to search all suppliers at once.

curl -H "X-API-KEY: <API_KEY>" \
  "https://api.stay22.com/v2/accommodations?address=Paris"
# get <API_KEY> at hub.stay22.com — or omit the header for demo mode

Read the response

Each stay arrives in results[]. Every stay carries a top-level url (a Stay22 deeplink that already carries your aid) and a suppliers map keyed by supplier. Without dates the search is static — no prices yet.

{
  "meta": { "page": 1, "pageSize": 10, "total": 29758, "hasMore": true, "currency": "USD" },
  "results": [
    {
      "id": "42f1014f...0000",
      "name": "Appartement aux portes de Paris",
      "type": "Apartment",
      "url": "https://www.stay22.com/allez/roam/...?aid=<AID>",
      "suppliers": {
        "booking": { "id": "15711178", "link": "https://www.stay22.com/allez/booking/15711178?aid=<AID>" }
      }
    }
  ],
  "_links": { "next": "https://api.stay22.com/v2/accommodations?address=Paris&page=2" }
}

Each suppliers.<name> entry has that supplier's id, a booking link, and (with dates) a price. Follow _links.next to page through results. See Response & supplier model.

Add dates for live prices

Without dates, the search returns static results (no prices). Pass checkin/checkout to get a per-supplier price for each stay:

curl -H "X-API-KEY: <API_KEY>" \
  "https://api.stay22.com/v2/accommodations?address=Paris&checkin=2026-07-01&checkout=2026-07-04"

Each supplier now carries a price.total (full-stay total in meta.currency), and meta echoes your window:

{
  "meta": { "page": 1, "pageSize": 10, "total": 18342, "hasMore": true, "currency": "USD", "nights": 3 },
  "results": [
    { "suppliers": { "booking": { "price": { "total": 252 } } } }
  ]
}

See Pricing & quotes.

On this page